[Clfs-dev] GCC Host Requirement Issue

William Harrington kb0iic at berzerkula.org
Fri Sep 13 09:32:54 PDT 2013


On Aug 12, 2013, at 8:58 AM, Martin Ward wrote:

> On 12/08/13 06:07, William Harrington wrote:
>> 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
>> _______________________________________________
>> Clfs-dev mailing list
>> Clfs-dev at lists.cross-lfs.org
>> http://lists.cross-lfs.org/listinfo.cgi/clfs-dev-cross-lfs.org
>>
> Hmm just run through two builds, because i forgot the specs path  
> when compiling the final gcc and never ran into that
>
> I do remember seeing the line but is was as a  warning, rather than  
> and error, how about having
>
> |--disable-werror added?|
>
>
> martin

It was supposed to be fixed by now but it isn't. If the host compiler  
does not support Wno-narrowing or Wno-overlength-strings then the  
build will fail. In my case, I'm using the updated livecd, which uses  
GCC-4.1.2 and meets our host system requirements.

I found this which fixes the problem.

https://github.com/openembedded/oe-core/blob/master/meta/recipes-devtools/gcc/gcc-4.8/0038-gcc-4.8-build-args.patch

It looks we are going to need this or see if it is applied upstream.  
It is going to be an issue.

Sincerely,

William Harrington




More information about the Clfs-dev mailing list