This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Buidling binutils in gcc source directory
- From: Michael Darling <darlingm at gmail dot com>
- To: binutils at sourceware dot org
- Date: Thu, 21 May 2015 21:25:48 -0400
- Subject: Buidling binutils in gcc source directory
- Authentication-results: sourceware.org; auth=none
I saw that you can build binutils in the gcc source directory. So, I ran:
git clone git://gcc.gnu.org/git/gcc.git git.git
cd git.git
./contrib/download_prerequisites
clone git://sourceware.org/git/binutils-gdb.git binutils
mkdir ../gcc.build
cd ../gcc.build
../gcc.git/configure --disable-multilib && make -j11
Runs for a few minutes, then errors with:
/bin/sh: line 7:
/home/mdarling/sourceInstallation/gcc.build.gcc.with.binutils/.binutils/ar:
No such file or directory
ln -s /home/mdarling/sourceInstallation/gcc.build.gcc.with.binutils/binutils/binutils/ar
binutils/ar
Then have to
ln -s /home/mdarling/sourceInstallation/gcc.build.gcc.with.binutils/binutils/binutils/ranlib
binutils/ranlib
Then, it errors with:
/home/mdarling/sourceInstallation/gcc.build.gcc.with.binutils/./gcc/nm:
line 106: exec: -p: invalid option
gcc/nm is a 3168 byte shell script, unlike /usr/bin/nm, a 42432 byte executable.
gcc/nm (shell script) has no -p option, not even a --help option. nm
(/usr/bin executable) has a -p option, visible through --help
So my questions are are:
1. Why is it expecting the binutils binaries to be in
top-source-dir/binutils/ when they are all in
top-source-dir/binutils/binutils/ ? I'm not supposed to check out
binutils git into the base gcc directory, am I? There's a bunch of
files that will conflict.
2. I got the git directory from http://www.gnu.org/software/binutils/
--- and it's binutils-gdb.git. Gdb isn't involved, yet. Am I
checking out the wrong thing?
3. How do I get past the nm issue?