OS custom toolchain: gcc libraries

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
Crumble14
Posts: 16
Joined: Tue Jan 01, 2019 4:10 pm
Location: Normandy, France

OS custom toolchain: gcc libraries

Post by Crumble14 »

Hello

I'm currently trying to create an OS specific toolchain according to https://wiki.osdev.org/OS_Specific_Toolchain. However I ran into troubles:
When I try to compile gcc, I have this message while running ./configure:

Code: Select all

*** This configuration is not supported in the following subdirectories:
     target-libgomp target-libatomic target-libitm target-libsanitizer target-libvtv target-libphobos gnattools gotools target-libada target-libhsail-rt target-zlib target-libbacktrace target-libgfortran target-libgo target-libffi target-libobjc target-liboffloadmic
    (Any other directories should still work fine.)
After searching for a while, I figured out it came (probably) from the configure.tgt files:

Code: Select all

gcc/libgomp/configure.tgt
gcc/libitm/configure.tgt
gcc/libsanitizer/configure.tgt
gcc/libhsail-rt/configure.tgt
gcc/libphobos/configure.tgt
gcc/libvtv/configure.tgt
gcc/libatomic/configure.tgt
gcc/liboffloadmic/configure.tgt
As I understand it, those files are used to check if a target is supported by the library. So I believe I have to patch them to add my target (i386-unknown-maestro).
However I haven't seen anything in the wiki mentioning this. Am I wrong to assume this is the correct way to make it work or is there a better way?

Thanks in advance :)
Student at School 42 Paris (FR: https://42.fr/)
Octocontrabass
Member
Member
Posts: 5563
Joined: Mon Mar 25, 2013 7:01 pm

Re: OS custom toolchain: gcc libraries

Post by Octocontrabass »

Do you need those libraries?
Crumble14
Posts: 16
Joined: Tue Jan 01, 2019 4:10 pm
Location: Normandy, France

Re: OS custom toolchain: gcc libraries

Post by Crumble14 »

Octocontrabass wrote:Do you need those libraries?
When I try to compile ncurses and bash, the compilation fails because it seems to require symbols coming from thoses libraries. So I guess I need them?
Student at School 42 Paris (FR: https://42.fr/)
Octocontrabass
Member
Member
Posts: 5563
Joined: Mon Mar 25, 2013 7:01 pm

Re: OS custom toolchain: gcc libraries

Post by Octocontrabass »

I don't think you need all of them. You may be able to remove the dependencies by passing some flags to the build scripts.

For the ones you do need to port, you're on the right track: look at how configure.tgt decides whether your OS is supported, and make changes as needed.
Crumble14
Posts: 16
Joined: Tue Jan 01, 2019 4:10 pm
Location: Normandy, France

Re: OS custom toolchain: gcc libraries

Post by Crumble14 »

I'll try this. Thank's for your help :)
Student at School 42 Paris (FR: https://42.fr/)
Post Reply