[LLVMdev] llvm-gcc4 PATCH for README.LLVM

Reid Spencer rspencer at reidspencer.com
Mon Jun 19 14:35:41 PDT 2006


Building llvm-gcc4 on Linux requires a little modification to a
Makefile. Attached is a patch to insert the following notice into the
README.LLVM in llvm-gcc4.

Here's the text of the patch, for those that are building llvm-gcc4:

On more recent systems (e.g. Fedora Core 5), where the version of
libgcc_s.so
used by libstdc++.so is more recent than the version used by llvm-gcc,
you
will get an error when building llvm-gcc that looks like:
  xgcc: .../gcc/libgcc_s.so.1: version `GCC_4.2.0' not found 
  (required by /usr/lib/libstdc++.so.6)

This happens because the xgcc program dynamically links in libstdc
++.so.6 which
requires libgcc_s.so. When xgcc was built, it found the libgcc_so that
your
compiler uses. But, when xgcc runs, it finds the version that llvm-gcc
just
built which is incompatible, version wise. This happens because the
llvm-gcc
makefile (unwisely) sets the LD_LIBRARY_PATH to its own directory. It
basically
shoots itself in the foot.  To correct this problem, just comment out
that line.
You will find it at obj/gcc/Makefile, about line 1160. The line looks
like:

export LD_LIBRARY_PATH=/proj/llvm/cfe/svnbuild/gcc

Change it to:

#export LD_LIBRARY_PATH=/proj/llvm/cfe/svnbuild/gcc

That is, put a # as the first character to comment it out. The path
might be
different on your machine, but the action is the same: comment it out.
After
this is fixed, your build should work again.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: README.LLVM.patch
Type: text/x-patch
Size: 1768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060619/c95e1874/attachment.bin>


More information about the llvm-dev mailing list