OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 7:18 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Can't Build ld (OS-Specific Toolchain)
PostPosted: Sat Mar 13, 2021 2:22 am 
Offline
Member
Member

Joined: Thu Feb 18, 2021 3:07 am
Posts: 28
Hi.
I'm currently trying to create a toolchain for my OS (following the tutorial from the wiki), and making ld fails:
Code:
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:
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.


Top
 Profile  
 
 Post subject: Re: Can't Build ld (OS-Specific Toolchain)
PostPosted: Sat Mar 13, 2021 2:30 am 
Offline
Member
Member

Joined: Mon Feb 02, 2015 7:11 pm
Posts: 898
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).

_________________
https://github.com/kiznit/rainbow-os


Top
 Profile  
 
 Post subject: Re: Can't Build ld (OS-Specific Toolchain)
PostPosted: Sat Mar 13, 2021 2:47 am 
Offline
Member
Member

Joined: Thu Feb 18, 2021 3:07 am
Posts: 28
Changed it, same result.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 156 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