OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Jun 13, 2021 8:49 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Link tests are not allowed after GCC_NO_EXECUTABLES
PostPosted: Sun Jan 10, 2016 8:24 am 
Offline

Joined: Thu Jan 21, 2010 9:31 pm
Posts: 16
I am trying to get GCC up and running so that I can add C++ STL support to my kernel. I have my own custom ELF loader to load my kernel already working, as well as some basic libc code, global constructor support, no-red-zone turned off, basic first fit memory manager, and a bunch of C++ specific symbols that were needed to get C++ working. As a result I already have a bunch of C++ code starting up and working great.

I'd rather not recreate the STL if I don't have to, but it makes sense to me add support for things like std::unique_map, std::vector, etc.... so I am in the process of trying to get libstdc++-v3 to compile. I am using: http://wiki.osdev.org/Hosted_GCC_Cross-Compiler as my current guide but I am running into the following issue:

Code:
make all-target-libstdc++-v3
...
checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.


I will admit that at the moment, I have only included the bare minimum that this tutorial calls for as I am just interested in seeing what it takes to get libstc++v3 working. Does anyone have an idea as to why this would be occurring?

Here is my current script for setting up GCC: https://github.com/Bareflank/hypervisor ... ompiler.sh

The only change to this script so far is I have added --with-sysroot=$HOME/sysroot to the binutils and gcc configure options, and I have added to my sysroot, the header files defined in the above link for setting up GCC.

Anyone have any idea why I might be getting this error?

Thanks a ton
- Rian


Attachments:
config.log.txt [28.97 KiB]
Downloaded 38 times
Top
 Profile  
 
 Post subject: Re: Link tests are not allowed after GCC_NO_EXECUTABLES
PostPosted: Mon Jun 06, 2016 10:10 am 
Offline
Member
Member

Joined: Sat Mar 28, 2015 11:23 am
Posts: 103
rianquinn wrote:
I am trying to get GCC up and running so that I can add C++ STL support to my kernel. I have my own custom ELF loader to load my kernel already working, as well as some basic libc code, global constructor support, no-red-zone turned off, basic first fit memory manager, and a bunch of C++ specific symbols that were needed to get C++ working. As a result I already have a bunch of C++ code starting up and working great.

I'd rather not recreate the STL if I don't have to, but it makes sense to me add support for things like std::unique_map, std::vector, etc.... so I am in the process of trying to get libstdc++-v3 to compile. I am using: http://wiki.osdev.org/Hosted_GCC_Cross-Compiler as my current guide but I am running into the following issue:

Code:
make all-target-libstdc++-v3
...
checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.


I will admit that at the moment, I have only included the bare minimum that this tutorial calls for as I am just interested in seeing what it takes to get libstc++v3 working. Does anyone have an idea as to why this would be occurring?

Here is my current script for setting up GCC: https://github.com/Bareflank/hypervisor ... ompiler.sh

The only change to this script so far is I have added --with-sysroot=$HOME/sysroot to the binutils and gcc configure options, and I have added to my sysroot, the header files defined in the above link for setting up GCC.

Anyone have any idea why I might be getting this error?

Thanks a ton
- Rian


I think you are very early in development to have a hosted GCC compiler. A hosted GCC compiler is for compiling user programs that target your OS. Unless you already have user-space support, you should use a bare-bones instead. You can compile the kernel with a hosted gcc, but as it's more targeted to user-space, you should do it later when you are adding support for user-space.

Now for the error part. You are compiling libstdc++v3. It has a bunch of dependencies, you are not able to satisfy. One critical example is the heap. Your problem is that you don't have dlopen(), and it's a dependency for libstdc++v3. You can go hack around the makefiles, but once you solve that error, certainly more errors will come up.

Better explanation (gcc mailing list): https://gcc.gnu.org/ml/gcc/2008-03/msg00515.html

_________________
If some of you people keep insisting on having backwards compatibitity with the stone age, we'll have stone tools forever.
My Hobby OS: https://github.com/heatd/Onyx


Top
 Profile  
 
 Post subject: Re: Link tests are not allowed after GCC_NO_EXECUTABLES
PostPosted: Mon Jun 06, 2016 10:48 am 
Offline
Member
Member

Joined: Fri Jan 30, 2015 4:57 pm
Posts: 215
Location: Germany
I have the same problem when configuring libstdc++ to build just libsupc++. Is anybody here who has successfully built libsupc++ and reveal details?


Top
 Profile  
 
 Post subject: Re: Link tests are not allowed after GCC_NO_EXECUTABLES
PostPosted: Mon Dec 07, 2020 11:16 pm 
Offline
User avatar

Joined: Tue Nov 24, 2020 10:17 am
Posts: 24
Location: Perm, Russia
I have the same problem. The following messages seemed to help me:


Just comment out AC_LIBTOOL_DLOPEN in file libstdc++-v3/configure.ac.

UPD: No, this doesn't help.

UPD2: No, commenting out GCC_NO_EXECUTABLES doesn't help too.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 6 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