[Clfs-dev] GCC Host Requirement Issue

William Harrington kb0iic at berzerkula.org
Sun Aug 11 22:07:56 PDT 2013


Greetings devs,

We have a slight problem in gcc temp system:

g++ -c   -g -O2 -DIN_GCC   -fno-exceptions -fno-rtti -fasynchronous- 
unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual - 
Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic- 
macros -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE -I. - 
Ibuild -I../../gcc-4.8.1/gcc -I../../gcc-4.8.1/gcc/build -I../../ 
gcc-4.8.1/gcc/../include -I../../gcc-4.8.1/gcc/../libcpp/include -I/ 
cross-tools/include -I/cross-tools/include -I/cross-tools/include  - 
I../../gcc-4.8.1/gcc/../libdecnumber -I../../gcc-4.8.1/gcc/../ 
libdecnumber/dpd -I../libdecnumber -I../../gcc-4.8.1/gcc/../ 
libbacktrace -DCLOOG_INT_GMP -I/cross-tools/include -I/cross-tools/ 
include  \
                 -o build/genconstants.o ../../gcc-4.8.1/gcc/ 
genconstants.c
cc1plus: error: unrecognized command line option "-Wno-narrowing"
cc1plus: error: unrecognized command line option "-Wno-overlength- 
strings"

The host compiler is used to create some host build tools for the gcc  
build.

Thus, it'll run g++ which will be the host's gcc.

I was using the updated lfs livecd I recently put linux 3.10.5 onto,  
and it seems moving to gcc-4.8.1 we have Wno error checking going bad.

The following dialect options are only available starting with gcc 4.7:

-Wno-narrowing  and -Wno-overlength-strings


This is going to cause some problems with hosts using GCC < 4.7.

In config/warnings.m4 there is this change that is already in gcc 4.8.1:

for real_option in $1; do
   # Do the check with the no- prefix removed since gcc silently
   # accepts any -Wno-* option on purpose
   case $real_option in
-    -Wno-*) option=-W`expr $real_option : '-Wno-\(.*\)'` ;;
+   -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
     *) option=$real_option ;;
   esac

I tried the old Wno line but it didn't help.

Any ideas how we will get past this?

We can remove -Wno-narrowing and -Wno-overlength-strings from gcc/ 
Makefile

Upping the host system requirements to gcc 4.7 is a bit extreme.

Sincerely,

WIlliam Harrington



More information about the Clfs-dev mailing list