OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 1:19 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LABEL
PostPosted: Sun Oct 29, 2017 11:01 am 
Offline
Member
Member

Joined: Wed Aug 10, 2016 3:07 am
Posts: 31
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:
make all-gcc

I get this error:
Code:
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


Top
 Profile  
 
 Post subject: Re: Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LA
PostPosted: Sun Oct 29, 2017 11:42 am 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 999
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].


Top
 Profile  
 
 Post subject: Re: Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LA
PostPosted: Sun Oct 29, 2017 11:55 am 
Offline
Member
Member

Joined: Wed Aug 10, 2016 3:07 am
Posts: 31
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


Top
 Profile  
 
 Post subject: Re: Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LA
PostPosted: Mon Oct 30, 2017 1:27 am 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 999
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].


Top
 Profile  
 
 Post subject: Re: Hosted GCC Cross Compile Error: ASM_GENERATE_INTERNAL_LA
PostPosted: Tue Oct 31, 2017 5:08 am 
Offline
Member
Member

Joined: Wed Aug 10, 2016 3:07 am
Posts: 31
OK, my file include ASM_GENERATE_INTERNAL_LABEL in tm_file but i does'nt work... I try to redownload source ,remodify and recompile


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 175 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group