Hi, On Mon, Oct 14, 2019 at 11:27 AM DELUGE <[email protected]> wrote: > When I build gcc 6.2 following > http://clfs.org/view/clfs-embedded/x86/cross-tools/gcc-static.html on Ubuntu > 19.04 using gcc 8.3, > The error below occurred. Can anyone tell me how can I resolve this problem? > Thanks. > > make[1]: Nothing to be done for 'all'. > make[1]: Leaving directory '/mnt/clfs/sources/gcc-build/fixincludes' > make[1]: Entering directory '/mnt/clfs/sources/gcc-build/gcc' > g++ -fno-PIE -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE > -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall > -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute > -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros > -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc-6.2.0/gcc > -I../../gcc-6.2.0/gcc/. -I../../gcc-6.2.0/gcc/../include > -I../../gcc-6.2.0/gcc/../libcpp/include -I/mnt/clfs/sources/gcc-build/./gmp > -I/mnt/clfs/sources/gcc-6.2.0/gmp > -I/mnt/clfs/sources/gcc-build/../gcc-6.2.0/mpfr/src > -I/mnt/clfs/sources/gcc-6.2.0/mpc/src -I../../gcc-6.2.0/gcc/../libdecnumber > -I../../gcc-6.2.0/gcc/../libdecnumber/dpd -I../libdecnumber > -I../../gcc-6.2.0/gcc/../libbacktrace -o ubsan.o -MT ubsan.o -MMD -MP -MF > ./.deps/ubsan.TPo ../../gcc-6.2.0/gcc/ubsan.c > ../../gcc-6.2.0/gcc/ubsan.c: In function 'bool > ubsan_use_new_style_p(location_t)': > ../../gcc-6.2.0/gcc/ubsan.c:1472:23: error: ISO C++ forbids comparison > between pointer and integer [-fpermissive] > || xloc.file == '\0' || xloc.file[0] == '\xff' > ^~~~ > make[1]: *** [Makefile:1085: ubsan.o] Error 1 > make[1]: Leaving directory '/mnt/clfs/sources/gcc-build/gcc' > make: *** [Makefile:4121: all-gcc] Error 2
Newer versions of GCC have different default settings for what is considered an error or a warning as compared to older versions of GCC. I believe that GCC releases from version 7 onwards will hit this issue when building GCC 6.3. I believe that newer releases of GCC version 6 (like version 6.4 or 6.5) should fix this. You could try using a newer version of GCC 6. Or you can have a try at applying this patch from OpenEmbedded: https://patchwork.openembedded.org/patch/138884/ Sorry, I don't have a better or more detailed answer for you right now. Thanks, Andrew _______________________________________________ Clfs-support mailing list [email protected] http://lists.clfs.org/listinfo.cgi/clfs-support-clfs.org
