This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: Question on -Werror usage in Makefiles...


Eric Botcazou <ebotcazou@libertysurf.fr> writes:

>> We now can add also the -Werror patch from Kaveh to the Makefile...
>
> Hum...
>
> ./xgcc -B./ -B/opt/build/eric/gcc34/sparc-sun-solaris2.5.1/bin/ -isystem 
> /opt/build/eric/gcc34/sparc-sun-solaris2.5.1/include -isystem 
> /opt/build/eric/gcc34/sparc-sun-solaris2.5.1/sys-include 
> -L/opt/build/eric/gcc/gcc/../ld -O2  -DIN_GCC    -W -Wall -Wwrite-strings 
> -Wstrict-prototypes -Wmissing-prototypes -Werror -isystem ./include  -fPIC 
> -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. 
> -I../src/gcc -I../src/gcc/. -I../src/gcc/../include -I../intl  
> -DL_trampoline -c ../src/gcc/libgcc2.c -o libgcc/./_trampoline.o
> ../src/gcc/libgcc2.c: In function `__enable_execute_stack':
>
> ../src/gcc/libgcc2.c:1607: warning: implicit declaration of function 
> `mprotect'
> gmake[3]: *** [libgcc/./_trampoline.o] Error 1
>
> mprotect is in sys/mman.h on Solaris 2 but take a look at the comment at the 
> end of config/sol2.h

Then add a -Wno-error or -Wno-strict-prototypes to the correct
makefile for this file...

>
> Then:
>
> ./xgcc -B./ -B/opt/build/eric/gcc34/sparc-sun-solaris2.5.1/bin/ -isystem 
> /opt/build/eric/gcc34/sparc-sun-solaris2.5.1/include -isystem 
> /opt/build/eric/gcc34/sparc-sun-solaris2.5.1/sys-include 
> -L/opt/build/eric/gcc/gcc/../ld -O2  -DIN_GCC    -W -Wall -Wwrite-strings 
> -Wstrict-prototypes -Wmissing-prototypes -Werror -isystem ./include  -fPIC 
> -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. 
> -I../src/gcc -I../src/gcc/. -I../src/gcc/../include -I../intl -fexceptions 
> -c ../src/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
> ../src/gcc/unwind-dw2.c: In function `uw_init_context_1':
>
> ../src/gcc/unwind-dw2.c:1286: warning: missing braces around initializer
> ../src/gcc/unwind-dw2.c:1286: warning: (near initialization for 
> `once_regsizes.pthread_once_pad')
> gmake[3]: *** [libgcc/./unwind-dw2.o] Error 1

Please try adding 
unwind-dw2.c-warn = -Wno-error
to Makefile.in

> How can such a patch have been accepted during stage3?

To catch the introduction of additional warnings and thereby making
GCC better,

Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature


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