* Buidling binutils in gcc source directory
@ 2015-05-22 1:25 Michael Darling
2015-05-22 3:10 ` Alan Modra
0 siblings, 1 reply; 3+ messages in thread
From: Michael Darling @ 2015-05-22 1:25 UTC (permalink / raw)
To: binutils
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Buidling binutils in gcc source directory
2015-05-22 1:25 Buidling binutils in gcc source directory Michael Darling
@ 2015-05-22 3:10 ` Alan Modra
2015-05-22 11:24 ` Matt Rice
0 siblings, 1 reply; 3+ messages in thread
From: Alan Modra @ 2015-05-22 3:10 UTC (permalink / raw)
To: Michael Darling; +Cc: binutils
On Thu, May 21, 2015 at 09:25:48PM -0400, Michael Darling wrote:
> 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.
It's been a while since I bothered with a combined build, but yes, you
need to merge the binutils source tree with the gcc source tree.
google gcc binutils combined build.
> 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?
binutils-gdb is the correct repository. If you don't want to build gdb,
configure with -disable-gdb --disable-sim --disable-readline (and
--disable-libdecnumber if building binutils stand-alone).
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Buidling binutils in gcc source directory
2015-05-22 3:10 ` Alan Modra
@ 2015-05-22 11:24 ` Matt Rice
0 siblings, 0 replies; 3+ messages in thread
From: Matt Rice @ 2015-05-22 11:24 UTC (permalink / raw)
To: Michael Darling, Binutils
On Thu, May 21, 2015 at 8:10 PM, Alan Modra <amodra@gmail.com> wrote:
> On Thu, May 21, 2015 at 09:25:48PM -0400, Michael Darling wrote:
>> 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.
>
> It's been a while since I bothered with a combined build, but yes, you
> need to merge the binutils source tree with the gcc source tree.
> google gcc binutils combined build.
been a long time since I tried this as well, but I believe you want to
check out gcc last,
and IIRC something to the effect of the following can work for
checking out into a combined working directory (not really tested)
GIT_DIR=~/git/binutils-gdb/.git git read-tree master
GIT_DIR=~/git/binutils-gdb/.git git checkout-index -u -f -a
GIT_DIR=~/git/gcc/.git git read-tree master
GIT_DIR=~/git/gcc/.git git checkout-index -u -f -a
>> 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?
>
> binutils-gdb is the correct repository. If you don't want to build gdb,
> configure with -disable-gdb --disable-sim --disable-readline (and
> --disable-libdecnumber if building binutils stand-alone).
>
> --
> Alan Modra
> Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-22 11:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-22 1:25 Buidling binutils in gcc source directory Michael Darling
2015-05-22 3:10 ` Alan Modra
2015-05-22 11:24 ` Matt Rice
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).