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
used by libstdc++.so is more recent than the version used by llvm-gcc,
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
requires libgcc_s.so. When xgcc was built, it found the libgcc_so that
compiler uses. But, when xgcc runs, it finds the version that llvm-gcc
built which is incompatible, version wise. This happens because the
makefile (unwisely) sets the LD_LIBRARY_PATH to its own directory. It
shoots itself in the foot. To correct this problem, just comment out
You will find it at obj/gcc/Makefile, about line 1160. The line looks
Change it to:
That is, put a # as the first character to comment it out. The path
different on your machine, but the action is the same: comment it out.
this is fixed, your build should work again.
README.LLVM.patch (1.73 KB)