Page 1 of 1

Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LABEL

Posted: Sun Oct 29, 2017 11:01 am
by Haoud
Hello everybody,
For a while I've been trying to compile gcc (7.2.0) by following this site's tutorial (Hosted GCC Cross Compiler) and I'm blocking when compiling gcc:

Code: Select all

make all-gcc
I get this error:

Code: Select all

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-7.2.0/gcc -I../../gcc-7.2.0/gcc/. -I../../gcc-7.2.0/gcc/../include -I../../gcc-7.2.0/gcc/../libcpp/include -I/home/haoud/Téléchargements/src/build-gcc/./gmp -I/home/haoud/Téléchargements/src/gcc-7.2.0/gmp -I/home/haoud/Téléchargements/src/build-gcc/./mpfr/src -I/home/haoud/Téléchargements/src/gcc-7.2.0/mpfr/src -I/home/haoud/Téléchargements/src/gcc-7.2.0/mpc/src  -I../../gcc-7.2.0/gcc/../libdecnumber -I../../gcc-7.2.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-7.2.0/gcc/../libbacktrace -I/home/haoud/Téléchargements/src/build-gcc/./isl/include -I/home/haoud/Téléchargements/src/gcc-7.2.0/isl/include  -o context.o -MT context.o -MMD -MP -MF ./.deps/context.TPo ../../gcc-7.2.0/gcc/context.c
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-7.2.0/gcc -I../../gcc-7.2.0/gcc/. -I../../gcc-7.2.0/gcc/../include -I../../gcc-7.2.0/gcc/../libcpp/include -I/home/haoud/Téléchargements/src/build-gcc/./gmp -I/home/haoud/Téléchargements/src/gcc-7.2.0/gmp -I/home/haoud/Téléchargements/src/build-gcc/./mpfr/src -I/home/haoud/Téléchargements/src/gcc-7.2.0/mpfr/src -I/home/haoud/Téléchargements/src/gcc-7.2.0/mpc/src  -I../../gcc-7.2.0/gcc/../libdecnumber -I../../gcc-7.2.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-7.2.0/gcc/../libbacktrace -I/home/haoud/Téléchargements/src/build-gcc/./isl/include -I/home/haoud/Téléchargements/src/gcc-7.2.0/isl/include  -o convert.o -MT convert.o -MMD -MP -MF ./.deps/convert.TPo ../../gcc-7.2.0/gcc/convert.c
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-7.2.0/gcc -I../../gcc-7.2.0/gcc/. -I../../gcc-7.2.0/gcc/../include -I../../gcc-7.2.0/gcc/../libcpp/include -I/home/haoud/Téléchargements/src/build-gcc/./gmp -I/home/haoud/Téléchargements/src/gcc-7.2.0/gmp -I/home/haoud/Téléchargements/src/build-gcc/./mpfr/src -I/home/haoud/Téléchargements/src/gcc-7.2.0/mpfr/src -I/home/haoud/Téléchargements/src/gcc-7.2.0/mpc/src  -I../../gcc-7.2.0/gcc/../libdecnumber -I../../gcc-7.2.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-7.2.0/gcc/../libbacktrace -I/home/haoud/Téléchargements/src/build-gcc/./isl/include -I/home/haoud/Téléchargements/src/gcc-7.2.0/isl/include  -o coverage.o -MT coverage.o -MMD -MP -MF ./.deps/coverage.TPo ../../gcc-7.2.0/gcc/coverage.c
../../gcc-7.2.0/gcc/coverage.c: In function ‘bool coverage_obj_init()’:
../../gcc-7.2.0/gcc/coverage.c:1155:51: error: ‘ASM_GENERATE_INTERNAL_LABEL’ was not declared in this scope
   ASM_GENERATE_INTERNAL_LABEL (name_buf, "LPBX", 0);
Do not hesitate to ask me for more details if necessary
How to solve this problem? Thank you!

PS: Sorry for my bad English but i'm french

Re: Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LA

Posted: Sun Oct 29, 2017 11:42 am
by Korona
Most likely your config.gcc or one of your target header files (i.e. gcc/config/foo.h) is broken.

Does tm_file in your config.gcc include i386/att.h and elfos.h?

EDIT: I'm assuming that you're building GCC for your own OS' user space and not a generic ELF compiler (?).

Re: Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LA

Posted: Sun Oct 29, 2017 11:55 am
by Haoud
Yes, I'm building GCC for your own OS' user space. I tried with gcc 6.4.0 and it works perfectly, so I'm going to use GCC 6.4 :). But I don't now why it doesn't work with gcc 6.4 (I did the same things as with gcc 7.2)
But thank you for your response.

EDIT: i'v found the att.h: it's ok but i's located in gcc/config/i386: i try to copy its in gcc and rebuild

Re: Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LA

Posted: Mon Oct 30, 2017 1:27 am
by Korona
The file should be in gcc/config/i386, that is correct.

Your tm_file variable should include it though.

I'm using a GCC 7 port on my OS, that GCC version should not be a problem.

Re: Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LA

Posted: Tue Oct 31, 2017 5:08 am
by Haoud
OK, my file include ASM_GENERATE_INTERNAL_LABEL in tm_file but i does'nt work... I try to redownload source ,remodify and recompile