Page 1 of 1

OS custom toolchain: gcc libraries

Posted: Tue Jan 11, 2022 1:04 pm
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 :)

Re: OS custom toolchain: gcc libraries

Posted: Tue Jan 11, 2022 1:37 pm
by Octocontrabass
Do you need those libraries?

Re: OS custom toolchain: gcc libraries

Posted: Tue Jan 11, 2022 1:42 pm
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?

Re: OS custom toolchain: gcc libraries

Posted: Tue Jan 11, 2022 2:45 pm
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.

Re: OS custom toolchain: gcc libraries

Posted: Wed Jan 12, 2022 10:17 am
by Crumble14
I'll try this. Thank's for your help :)