problem building gcc-4.3 snapshot in home dir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to build a recent gcc-4.3 snapshot in my home dir, and am
having build problems because some libraries are installed in my home
directory too... I'm not really sure if this this is my error, or a
problem with the gcc build system.

I was going to submit the following as a gcc bug report, but thought I'd
check here first and see if anyone knows how to do this:


I'm trying to build gcc for installing in my home directory.  I've also
installed some of the gcc prerequisites (in particular, libgmp and
libmpfr) in my home dir, so I need to tell gcc to search $HOME/lib for
libraries.

Usually I do this by giving CFLAGS=$HOME/include LDFLAGS=$HOME/lib as
configure arguments (actually I have a config.site file that does this
by default).  In gcc's case, that seems to work for the stage1 build --
it builds state one correctly.  However, building stage2 fails, with a
linker error saying it can't find -lgmp.

Looking at the Makefile, it seems that for stage2 and stage3, it uses
the value of BOOT_LDFLAGS instead of the value of LDFLAGS given to
configure, and I can't see any obvious way to override this, or to
specify what it should use for BOOT_LDFLAGS.

I tried changing the Makefile directly, changing the line which sets
BOOT_LDFLAGS (in the top-level Makefile) to "BOOT_LDFLAGS =
-L$(HOME)/lib", but then compiling fails with this error:

configure: loading cache ./config.cache
configure: error: `LDFLAGS' has changed since the previous run:
configure:   former value:  
configure:   current value: -L/home/m/miles/lib

That's particularly surprising because LDFLAGS was initially _not_ empty...

Version: gcc-4.3-20071026
configure:  $HOME/src/gcc-4.3-20071026/configure --prefix=$HOME  --disable-multilib BOOT_LDFLAGS=-L$HOME/lib
host:  x86_64-unknown-linux-gnu

[As you can see I tried to set BOOT_LDFLAGS via configure, but it seemed to have no effect.]

Thanks,

-Miles

-- 
Freedom's just another word, for nothing left to lose   --Janis Joplin

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux