Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LABEL

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Haoud
Member
Member
Posts: 31
Joined: Wed Aug 10, 2016 3:07 am
Libera.chat IRC: Haoud

Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LABEL

Post 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
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Re: Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LA

Post 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 (?).
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
Haoud
Member
Member
Posts: 31
Joined: Wed Aug 10, 2016 3:07 am
Libera.chat IRC: Haoud

Re: Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LA

Post 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
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Re: Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LA

Post 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.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
Haoud
Member
Member
Posts: 31
Joined: Wed Aug 10, 2016 3:07 am
Libera.chat IRC: Haoud

Re: Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LA

Post 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
Post Reply