Can't Build ld (OS-Specific Toolchain)

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
SKC
Member
Member
Posts: 28
Joined: Thu Feb 18, 2021 3:07 am

Can't Build ld (OS-Specific Toolchain)

Post by SKC »

Hi.
I'm currently trying to create a toolchain for my OS (following the tutorial from the wiki), and making ld fails:

Code: Select all

make[2]: Entering directory '/home/skc/src/build-binutils/ld'
Makefile:1646: *** multiple target patterns.  Stop.
make[2]: Leaving directory '/home/skc/src/build-binutils/ld'
make[1]: *** [Makefile:7213: all-ld] Error 2
make[1]: Leaving directory '/home/skc/src/build-binutils'
make: *** [Makefile:853: all] Error 2
I have no idea why this happens. It looks like the rest of the building process goes fine. I also tried building on Cygwin (my main environment is WSL) but the same thing happened (so it's probably not because I'm using Windows).
What am I doing wrong?
My build script:

Code: Select all

export PREFIX="$HOME/opt/HardOS_Cross"
export TARGET=x86_64-hardos
export PATH="$PREFIX/bin:$PATH"
export SYSROOT="$HOME/HardOS/sysroot"

clear

cd $HOME/src

rm -R -f build-binutils
mkdir build-binutils
cd build-binutils
../binutils-2.36.1/configure --target=$TARGET --prefix=$PREFIX --with-sysroot=$SYSROOT --disable-werror
make # fails here
Thanks in advance to anyone who helps me with this.
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: Can't Build ld (OS-Specific Toolchain)

Post by kzinti »

I am not sure if binutils will be happy with "x86_64-hardos". Try "x86_64-hardos-elf" just for kick. It looks like "x86_64-hardos" is matching multiple targets and binutils doesn't know what to do.

I use "x86_64-rainbow-elf" and have no problems (binutils 2.35).
SKC
Member
Member
Posts: 28
Joined: Thu Feb 18, 2021 3:07 am

Re: Can't Build ld (OS-Specific Toolchain)

Post by SKC »

Changed it, same result.
Post Reply