public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Installation question
@ 2021-02-23 21:07 Gary Oblock
  2021-02-23 22:50 ` Albert Chin
  2021-02-24  1:28 ` Alan Modra
  0 siblings, 2 replies; 7+ messages in thread
From: Gary Oblock @ 2021-02-23 21:07 UTC (permalink / raw)
  To: binutils

A little background. I'm a compiler developer working on
a fairly hairy optimization to run during LTO. After many
months my optimization it's at the point when running
SPEC17 intrate works except for x264_r which dies
during build. On the gcc mailing list Martin Liška looked
at my log and said it seemed to be a "linker" error.
When I provided him with my vendor branch, he got x264_r
to work with my sources. This leads me to believe that
my binutils might be obsolete. I'm using Ubuntu 18.04
with binutils 2.30.

How do I go about installing binutils in my own directory
instead of /usr/local and what do I need to do to get
my compiler under development to use them.

This is my current attempt at an installation script

cd binutils_build
touch build install
rm -rf build install
mkdir build install
cd build
../binutils-2.36/configure
make tooldir=/home/gary/binutils_build/install
make tooldir=/home/gary/binutils_build/install install

Please be detailed with your suggestions because
binutils is something I'm not very familiar with.

Thanks,

Gary Oblock







CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and contains information that is confidential and proprietary to Ampere Computing or its subsidiaries. It is to be used solely for the purpose of furthering the parties' business relationship. Any unauthorized review, copying, or distribution of this email (or any attachments thereto) is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Installation question
  2021-02-23 21:07 Installation question Gary Oblock
@ 2021-02-23 22:50 ` Albert Chin
  2021-02-24  1:28 ` Alan Modra
  1 sibling, 0 replies; 7+ messages in thread
From: Albert Chin @ 2021-02-23 22:50 UTC (permalink / raw)
  To: Gary Oblock; +Cc: binutils

On Tue, Feb 23, 2021 at 09:07:37PM +0000, Gary Oblock via Binutils wrote:
> How do I go about installing binutils in my own directory
> instead of /usr/local and what do I need to do to get
> my compiler under development to use them.
> 
> This is my current attempt at an installation script
> 
> cd binutils_build
> touch build install
> rm -rf build install
> mkdir build install
> cd build
> ../binutils-2.36/configure
> make tooldir=/home/gary/binutils_build/install
> make tooldir=/home/gary/binutils_build/install install

$ tar Jxf binutils-2.36.1.tar.xz
$ cd binutils-2.36.1
$ ./configure --prefix=<dir>
$ make
$ make install

If you *only* want to install the linker, run the following instead of
"make install":
  $ make -C ld install

-- 
albert chin (china@thewrittenword.com)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Installation question
  2021-02-23 21:07 Installation question Gary Oblock
  2021-02-23 22:50 ` Albert Chin
@ 2021-02-24  1:28 ` Alan Modra
  2021-02-24  6:16   ` Gary Oblock
  1 sibling, 1 reply; 7+ messages in thread
From: Alan Modra @ 2021-02-24  1:28 UTC (permalink / raw)
  To: Gary Oblock; +Cc: binutils

On Tue, Feb 23, 2021 at 09:07:37PM +0000, Gary Oblock via Binutils wrote:
> How do I go about installing binutils in my own directory
> instead of /usr/local and what do I need to do to get
> my compiler under development to use them.

If you want things to go as smoothly as possible, configure both gcc
and binutils with exactly the same --prefix specifying the root of
their installation tree.  Always configure from the top of the source
tree, ie. don't run ld/configure or gas/configure etc.  You may avoid
building gdb with --disable-gdb --disable-gdbserver --disable-sim
--disable-readline --disable-libdecnumber if using binutils-gdb git
sources.

> CONFIDENTIALITY NOTICE: This e-mail message [snip]
Posting this sort of legal nonsense to a public mailing list isn't
clever.  To put it bluntly, it is the email etiquette equivalent of
going into a public square and shouting "Do not listen to me"!  With
an unsaid "I am an idiot".  Some people will follow the instructions
and immediately delete such a message, resulting in your emails being
unanswered.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Installation question
  2021-02-24  1:28 ` Alan Modra
@ 2021-02-24  6:16   ` Gary Oblock
  2021-02-24 23:39     ` Alan Modra
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Oblock @ 2021-02-24  6:16 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils

My current gcc build is this:

cd $1
BASE=`pwd`
echo BASE = $BASE
touch objdir install
rm -rf objdir install
mkdir objdir install
cd objdir
echo BUILDING IN `pwd`
../sources/configure --prefix=$BASE/install --disable-bootstrap -enable-language=c,c++,lto --disable-multilib --enable-valgrind-annotations
make CFLAGS='-O2 -g' CXXFLAGS='-O2 -g' -j 12
make install

So change it to be??

cd $1
BASE=`pwd`
echo BASE = $BASE
touch gcc_objdir binutils_objdir install
rm -rf *_objdir install
mkdir gcc_objdir binutils_objdir install
cd gcc_objdir
echo BUILDING GCC IN `pwd`
../gcc_sources/configure --prefix=$BASE/install --disable-bootstrap -enable-language=c,c++,lto --disable-multilib --enable-valgrind-annotations
make CFLAGS='-O2 -g' CXXFLAGS='-O2 -g' -j 12
make install
cd ../binutils_ojbdir
echo BUILDING BINUTILS IN `pwd`
../gcc_sources/configure --prefix=$BASE/install
make CFLAGS='-O2 -g' CXXFLAGS='-O2 -g' -j 12
make install

It's late at night here and I'll try this tomorrow if I don't
see flaming arrows raining down at me. 😉

Thanks,

Gary
________________________________
From: Alan Modra <amodra@gmail.com>
Sent: Tuesday, February 23, 2021 5:28 PM
To: Gary Oblock <gary@amperecomputing.com>
Cc: binutils@sourceware.org <binutils@sourceware.org>
Subject: Re: Installation question

[EXTERNAL EMAIL NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.]


On Tue, Feb 23, 2021 at 09:07:37PM +0000, Gary Oblock via Binutils wrote:
> How do I go about installing binutils in my own directory
> instead of /usr/local and what do I need to do to get
> my compiler under development to use them.

If you want things to go as smoothly as possible, configure both gcc
and binutils with exactly the same --prefix specifying the root of
their installation tree.  Always configure from the top of the source
tree, ie. don't run ld/configure or gas/configure etc.  You may avoid
building gdb with --disable-gdb --disable-gdbserver --disable-sim
--disable-readline --disable-libdecnumber if using binutils-gdb git
sources.

> CONFIDENTIALITY NOTICE: This e-mail message [snip]
Posting this sort of legal nonsense to a public mailing list isn't
clever.  To put it bluntly, it is the email etiquette equivalent of
going into a public square and shouting "Do not listen to me"!  With
an unsaid "I am an idiot".  Some people will follow the instructions
and immediately delete such a message, resulting in your emails being
unanswered.

--
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Installation question
  2021-02-24  6:16   ` Gary Oblock
@ 2021-02-24 23:39     ` Alan Modra
  2021-02-25 19:40       ` Gary Oblock
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Modra @ 2021-02-24 23:39 UTC (permalink / raw)
  To: Gary Oblock; +Cc: binutils

It is better to build and install binutils first, so that the gcc
configure sees an up-to-date assembler and linker.  New gcc features
might not be enabled otherwise.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Installation question
  2021-02-24 23:39     ` Alan Modra
@ 2021-02-25 19:40       ` Gary Oblock
  2021-02-26 11:57         ` Alan Modra
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Oblock @ 2021-02-25 19:40 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils

Alan,

Actually, building gcc second seems to result in gcc cleaning out
the binutils content from the install directory!

Does anybody out there know how I'd go about debugging the
linker myself? I ask this because the one who tried to help
can't seem to duplicate the problem on their machine...

Gary
________________________________
From: Alan Modra <amodra@gmail.com>
Sent: Wednesday, February 24, 2021 3:39 PM
To: Gary Oblock <gary@amperecomputing.com>
Cc: binutils@sourceware.org <binutils@sourceware.org>
Subject: Re: Installation question

[EXTERNAL EMAIL NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.]


It is better to build and install binutils first, so that the gcc
configure sees an up-to-date assembler and linker.  New gcc features
might not be enabled otherwise.

--
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Installation question
  2021-02-25 19:40       ` Gary Oblock
@ 2021-02-26 11:57         ` Alan Modra
  0 siblings, 0 replies; 7+ messages in thread
From: Alan Modra @ 2021-02-26 11:57 UTC (permalink / raw)
  To: Gary Oblock; +Cc: binutils

On Thu, Feb 25, 2021 at 07:40:21PM +0000, Gary Oblock wrote:
> Alan,
> 
> Actually, building gcc second seems to result in gcc cleaning out
> the binutils content from the install directory!

Sounds like something silly you did in a script.  I have installed
binutils and gcc myself countless times without seeing anything like
this.  So have many other people.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-02-26 11:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 21:07 Installation question Gary Oblock
2021-02-23 22:50 ` Albert Chin
2021-02-24  1:28 ` Alan Modra
2021-02-24  6:16   ` Gary Oblock
2021-02-24 23:39     ` Alan Modra
2021-02-25 19:40       ` Gary Oblock
2021-02-26 11:57         ` Alan Modra

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).