From fabb80e6f622e7e90df96a97cf3a3b3c11ab619c Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Sat, 22 Aug 2009 18:30:05 +0000 Subject: [PATCH] - Disable use of position-independent code on 32-bit platforms (buggy in LLVM <= 2.5) --- .cvsignore | 2 +- llvm-2.5-gcc44.patch | 20 ++++++++++++++++++++ llvm.spec | 18 ++++++++++++++---- sources | 2 +- 4 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 llvm-2.5-gcc44.patch diff --git a/.cvsignore b/.cvsignore index 07c17b1..29a9f45 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -llvm-2.3.tar.gz +llvm-2.5.tar.gz diff --git a/llvm-2.5-gcc44.patch b/llvm-2.5-gcc44.patch new file mode 100644 index 0000000..d478dd0 --- /dev/null +++ b/llvm-2.5-gcc44.patch @@ -0,0 +1,20 @@ +--- llvm-2.5/lib/System/Unix/Signals.inc.gcc44 2008-12-05 18:39:24.000000000 -0500 ++++ llvm-2.5/lib/System/Unix/Signals.inc 2009-03-04 13:56:32.804820443 -0500 +@@ -78,7 +78,7 @@ + for (int i = 0; i < depth; ++i) { + Dl_info dlinfo; + dladdr(StackTrace[i], &dlinfo); +- char* name = strrchr(dlinfo.dli_fname, '/'); ++ const char* name = strrchr(dlinfo.dli_fname, '/'); + + int nwidth; + if (name == NULL) nwidth = strlen(dlinfo.dli_fname); +@@ -93,7 +93,7 @@ + + fprintf(stderr, "%-3d", i); + +- char* name = strrchr(dlinfo.dli_fname, '/'); ++ const char* name = strrchr(dlinfo.dli_fname, '/'); + if (name == NULL) fprintf(stderr, " %-*s", width, dlinfo.dli_fname); + else fprintf(stderr, " %-*s", width, name+1); + diff --git a/llvm.spec b/llvm.spec index 6658383..222b3c8 100644 --- a/llvm.spec +++ b/llvm.spec @@ -14,7 +14,7 @@ %define debug_package %{nil} Name: llvm -Version: 2.4 +Version: 2.5 Release: 4%{?dist} Summary: The Low Level Virtual Machine @@ -23,10 +23,12 @@ License: NCSA URL: http://llvm.org/ Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tar.gz %if %{?_with_gcc:1}%{!?_with_gcc:0} -Source1: http://llvm.org/releases/%{version}/llvm-gcc%{lgcc_version}-%{version}.source.tar.gz +Source1: http://llvm.org/releases/%{version}/llvm-gcc-%{lgcc_version}-%{version}.source.tar.gz %endif Patch0: llvm-2.1-fix-sed.patch Patch1: llvm-2.4-fix-ocaml.patch +# http://llvm.org/bugs/show_bug.cgi?id=3726 +Patch2: llvm-2.5-gcc44.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -143,9 +145,12 @@ for developing applications that use %{name}-ocaml. %patch0 -p1 -b .fix-sed %patch1 -p1 -b .fix-ocaml +%patch2 -p1 -b .gcc44 %build # Note: --enable-pic can be turned off when 2.6 comes out +# and up to 2.5, unsafe on 32-bit archs (in our case, +# anything but x86_64) %configure \ --libdir=%{_libdir}/%{name} \ --datadir=%{_datadir}/%{name}-%{version} \ @@ -154,8 +159,9 @@ for developing applications that use %{name}-ocaml. --enable-debug-runtime \ --enable-jit \ --enable-optimized \ - --enable-pic \ - --with-pic +%ifarch x86_64 + --enable-pic +%endif # --enable-targets=host-only \ make %{_smp_mflags} OPTIMIZE_OPTION='%{optflags}' @@ -346,6 +352,10 @@ rm -rf %{buildroot} %changelog +* Sat Aug 22 2009 Michel Salim - 2.5-4 +- Disable use of position-independent code on 32-bit platforms + (buggy in LLVM <= 2.5) + * Wed Mar 4 2009 Michel Salim - 2.4-4 - Remove build scripts; they require the build directory to work diff --git a/sources b/sources index 43aa49f..c4ac878 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bf43eee98c364fd79c7d2b72e645a15e llvm-2.4.tar.gz +55df2ea8665c8094ad2ef85187b9fc74 llvm-2.5.tar.gz