This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/409: build failures for targets that should build with -Werror



>Number:         409
>Category:       gdb
>Synopsis:       build failures for targets that should build with -Werror
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 08 09:18:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Richard Earnshaw
>Release:        unknown-1.0
>Organization:
>Environment:
Linux cam-linux16.cambridge.arm.com 2.4.3-12enterprise #1 SMP Fri Jun 8 14:12:05 EDT 2001 i686 unknown
Red Hat Linux release 7.1 (Seawolf)
>Description:
The MAINTAINERS file says that many targets should build with
-Werror, but they fail when the host is Red Hat linux 7.1

The reason is that configure looks for a function called 
canonicalize_file_name which is declared in stdlib.h, but only 
if __USE_GNU is defined.

Hence we use this function without a prototype and then get cast
without pointer or no-prototype errors during compilation:

cc1: warnings being treated as errors
/home/rearnsha/gnusrc/utils/src/gdb/utils.c: In function `gdb_realpath':
/home/rearnsha/gnusrc/utils/src/gdb/utils.c:2536: warning: implicit declaration of function `canonicalize_file_name'
/home/rearnsha/gnusrc/utils/src/gdb/utils.c:2536: warning: return makes pointer from integer without a cast
gnumake[1]: *** [utils.o] Error 1
>How-To-Repeat:
Try to build any gdb target as described in the MAINTAINERS file
as requiring -Werror on a redhat 7 release of linux

>Fix:
Make sure the prototype is in scope (either by defining __USE_GNU)
or by adding one ourselves.

configure should be made to check for this.
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]