This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Configuring gcc for pure 64bit x86_64


On Mon, Nov 29, 2004 at 11:29:36AM +0000, Andrew Walrond wrote:
> I want to build a pure 64bit gcc on x86_64, with the 64bit gcc libs ending up 
> in /lib rather than the /lib /lib64. I am not interested in the -m32 
> capability.
> 
> Is this possible/easy? I would accept /lib32 /lib as an alternative if a pure 
> 64bit gcc is not easy to achieve.
> 
> Any help appreciated. Google didn't help this time :(

We do this. But, it's not pretty. We build GCC as usual, then, after
'make install', we:
  $ mv $prefix/lib64/* $prefix/lib
  $ rmdir $prefix/lib64

And then we rebuild all the GCC libs using $prefix/lib as the library
path. This doesn't disable -m32 but -m32 won't work after what we do.
We rebuild the GCC libs like so:
  $ cd $builddir/i686-pc-linux-gnu/libstdc++-v3/src
  $ rm libstdc++.la
  $ gmake install LDFLAGS="-Wl,-rpath,$prefix/lib"
    toolexeclibdir="$prefix/lib"
  $ cd $builddir
  $ sed -i -e "\
s!^glibcpp_toolexeclibdir = .*!\
glibcpp_toolexeclibdir = $prefix/lib!; \
s!^toolexeclibdir = .*!\
toolexeclibdir = $prefix/lib!; \
s!^LIBGCJ_LDFLAGS =.*!\
LIBGCJ_LDFLAGS = -Wl,-rpath,$prefix/lib!" i686-pc-linux-gnu/libjava/Makefile
  $ rm i686-pc-linux-gnu/libjava/libgcj.la
  $ (gmake all-target-libjava install-target-libjava)

I think the above should fix the .la files as well.

-- 
albert chin (china@thewrittenword.com)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]