summaryrefslogtreecommitdiff
path: root/libre-multilib/lib32-clang
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-09-08 23:54:35 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-09-08 23:54:35 -0300
commita62246727ea06b0d8ba24fb8e150fe7e4327cd3a (patch)
tree135444d41ac6372043efe7ca79bea049ea86f82b /libre-multilib/lib32-clang
parent352ad5176b2d5ec44d6f12855be783ef7b3c7cda (diff)
downloadabslibre-a62246727ea06b0d8ba24fb8e150fe7e4327cd3a.tar.gz
abslibre-a62246727ea06b0d8ba24fb8e150fe7e4327cd3a.tar.bz2
abslibre-a62246727ea06b0d8ba24fb8e150fe7e4327cd3a.zip
lib32-clang-3.5.0-1: updating version
Diffstat (limited to 'libre-multilib/lib32-clang')
-rw-r--r--libre-multilib/lib32-clang/PKGBUILD33
-rw-r--r--libre-multilib/lib32-clang/clang-3.4-fstack-protector-strong.patch165
-rw-r--r--libre-multilib/lib32-clang/llvm-3.5.0-force-link-pass.o.patch28
3 files changed, 43 insertions, 183 deletions
diff --git a/libre-multilib/lib32-clang/PKGBUILD b/libre-multilib/lib32-clang/PKGBUILD
index ae840cf9e..9f1a3cbf0 100644
--- a/libre-multilib/lib32-clang/PKGBUILD
+++ b/libre-multilib/lib32-clang/PKGBUILD
@@ -2,25 +2,25 @@
# Maintainer: André Silva <emulatorman@parabola.nu>
pkgname=lib32-clang
-pkgver=3.4.2
-_base_ver=3.4
+pkgver=3.5.0
+_base_ver=3.5.0
pkgrel=1
arch=('x86_64')
url="http://llvm.org/"
license=('custom:University of Illinois/NCSA Open Source License')
makedepends=('lib32-libffi' 'lib32-zlib' 'python2' 'gcc-multilib' 'clang' 'lib32-llvm' 'bc')
-source=(http://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.gz{,.sig}
- http://llvm.org/releases/$pkgver/cfe-$pkgver.src.tar.gz{,.sig}
- http://llvm.org/releases/$_base_ver/compiler-rt-$_base_ver.src.tar.gz{,.sig}
- clang-3.4-fstack-protector-strong.patch)
-sha256sums=('17038d47069ad0700c063caed76f0c7259628b0e79651ce2b540d506f2f1efd7'
+options=('staticlibs')
+source=(http://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
+ http://llvm.org/releases/$pkgver/cfe-$pkgver.src.tar.xz{,.sig}
+ http://llvm.org/releases/$pkgver/compiler-rt-$pkgver.src.tar.xz{,.sig}
+ llvm-3.5.0-force-link-pass.o.patch)
+sha256sums=('28e199f368ef0a4666708f31c7991ad3bcc3a578342b0306526dd35f07595c03'
'SKIP'
- '5ba6f5772f8d00f445209356a7daf83c5bca2da5acd10de517ad2359ae95bc10'
+ 'fc80992e004b06f6c7afb612de1cdaa9ac9d25811c55f94fcf7331d9b81cdb8b'
'SKIP'
- 'f37c89b1383ce462d47537a0245ac798600887a9be9f63073e16b79ed536ab5c'
+ 'a4b3e655832bf8d9a357ea2c771db347237460e131988cbb96cda40ff39a8136'
'SKIP'
- '7a2a1ddc94f67e643c1ab74601ec07deb6d5d344d4b19ed17c900afb2f6f2863')
-options=('staticlibs')
+ '5702053503d49448598eda1b8dc8c263f0df9ad7486833273e3987b5dec25a19')
prepare() {
# Change directory names to release names so we don't need to change the
@@ -35,7 +35,7 @@ prepare() {
rm -rf projects/compiler-rt
- mv "$srcdir/compiler-rt-$_base_ver" projects/compiler-rt
+ mv "$srcdir/compiler-rt-$_base_ver.src" projects/compiler-rt
# Fix installation directories, ./configure doesn't seem to set them right
sed -i -e 's:\$(PROJ_prefix)/lib:$(PROJ_prefix)/lib32:' \
@@ -47,18 +47,15 @@ prepare() {
autoconf/configure.ac \
configure
- # Fix insecure rpath (http://bugs.archlinux.org/task/14017)
- sed -i 's:$(RPATH) -Wl,$(\(ToolDir\|LibDir\|ExmplDir\))::g' Makefile.rules
-
# Use system lib32-llvm
install -d $srcdir/llvm-$pkgver/Release/lib
for file in ` pacman -Ql lib32-llvm |grep /lib32/ |awk '{print $2}' |sed '/\/$/d'`; do
ln -sf $file $srcdir/llvm-$pkgver/Release/lib/
done
- # Add command line option -fstack-protector-strong
- # http://reviews.llvm.org/rL201120
- patch -d tools/clang -Np0 -i "$srcdir/clang-3.4-fstack-protector-strong.patch"
+ # Fix build with GCC 4.9 (patch from Debian)
+ # http://llvm.org/bugs/show_bug.cgi?id=20067
+ patch -Np1 -i "$srcdir/llvm-3.5.0-force-link-pass.o.patch"
}
build() {
diff --git a/libre-multilib/lib32-clang/clang-3.4-fstack-protector-strong.patch b/libre-multilib/lib32-clang/clang-3.4-fstack-protector-strong.patch
deleted file mode 100644
index bda41fe1b..000000000
--- a/libre-multilib/lib32-clang/clang-3.4-fstack-protector-strong.patch
+++ /dev/null
@@ -1,165 +0,0 @@
-Index: test/Driver/stack-protector.c
-===================================================================
---- test/Driver/stack-protector.c (revision 201119)
-+++ test/Driver/stack-protector.c (revision 201120)
-@@ -15,3 +15,11 @@
-
- // RUN: %clang -target i386-pc-openbsd -fno-stack-protector -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD_OFF
- // OPENBSD_OFF-NOT: "-stack-protector"
-+
-+// RUN: %clang -fstack-protector-strong -### %s 2>&1 | FileCheck %s -check-prefix=SSP-STRONG
-+// SSP-STRONG: "-stack-protector" "2"
-+// SSP-STRONG-NOT: "-stack-protector-buffer-size"
-+
-+// RUN: %clang -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=SSP-ALL
-+// SSP-ALL: "-stack-protector" "3"
-+// SSP-ALL-NOT: "-stack-protector-buffer-size"
-Index: test/CodeGen/stack-protector.c
-===================================================================
---- test/CodeGen/stack-protector.c (revision 201119)
-+++ test/CodeGen/stack-protector.c (revision 201120)
-@@ -2,7 +2,9 @@
- // NOSSP: define void @test1(i8* %msg) #0 {
- // RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 1 | FileCheck -check-prefix=WITHSSP %s
- // WITHSSP: define void @test1(i8* %msg) #0 {
--// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 2 | FileCheck -check-prefix=SSPREQ %s
-+// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 2 | FileCheck -check-prefix=SSPSTRONG %s
-+// SSPSTRONG: define void @test1(i8* %msg) #0 {
-+// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 3 | FileCheck -check-prefix=SSPREQ %s
- // SSPREQ: define void @test1(i8* %msg) #0 {
-
- typedef __SIZE_TYPE__ size_t;
-@@ -21,4 +23,6 @@
-
- // WITHSSP: attributes #{{.*}} = { nounwind ssp{{.*}} }
-
-+// SSPSTRONG: attributes #{{.*}} = { nounwind sspstrong{{.*}} }
-+
- // SSPREQ: attributes #{{.*}} = { nounwind sspreq{{.*}} }
-Index: include/clang/Basic/LangOptions.h
-===================================================================
---- include/clang/Basic/LangOptions.h (revision 201119)
-+++ include/clang/Basic/LangOptions.h (revision 201120)
-@@ -58,7 +58,7 @@
- typedef clang::Visibility Visibility;
-
- enum GCMode { NonGC, GCOnly, HybridGC };
-- enum StackProtectorMode { SSPOff, SSPOn, SSPReq };
-+ enum StackProtectorMode { SSPOff, SSPOn, SSPStrong, SSPReq };
-
- enum SignedOverflowBehaviorTy {
- SOB_Undefined, // Default C standard behavior.
-Index: include/clang/Driver/ToolChain.h
-===================================================================
---- include/clang/Driver/ToolChain.h (revision 201119)
-+++ include/clang/Driver/ToolChain.h (revision 201120)
-@@ -196,7 +196,7 @@
- virtual bool UseObjCMixedDispatch() const { return false; }
-
- /// GetDefaultStackProtectorLevel - Get the default stack protector level for
-- /// this tool chain (0=off, 1=on, 2=all).
-+ /// this tool chain (0=off, 1=on, 2=strong, 3=all).
- virtual unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const {
- return 0;
- }
-Index: include/clang/Driver/Options.td
-===================================================================
---- include/clang/Driver/Options.td (revision 201119)
-+++ include/clang/Driver/Options.td (revision 201120)
-@@ -675,7 +675,8 @@
- Flags<[CC1Option]>, HelpText<"Do not include source location information with diagnostics">;
- def fno_spell_checking : Flag<["-"], "fno-spell-checking">, Group<f_Group>,
- Flags<[CC1Option]>, HelpText<"Disable spell-checking">;
--def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group<f_Group>;
-+def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group<f_Group>,
-+ HelpText<"Disable the use of stack protectors">;
- def fno_strict_aliasing : Flag<["-"], "fno-strict-aliasing">, Group<f_Group>;
- def fstruct_path_tbaa : Flag<["-"], "fstruct-path-tbaa">, Group<f_Group>;
- def fno_struct_path_tbaa : Flag<["-"], "fno-struct-path-tbaa">, Group<f_Group>;
-@@ -773,8 +774,12 @@
- def fno_signed_char : Flag<["-"], "fno-signed-char">, Flags<[CC1Option]>,
- Group<clang_ignored_f_Group>, HelpText<"Char is unsigned">;
- def fsplit_stack : Flag<["-"], "fsplit-stack">, Group<f_Group>;
--def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group<f_Group>;
--def fstack_protector : Flag<["-"], "fstack-protector">, Group<f_Group>;
-+def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group<f_Group>,
-+ HelpText<"Force the usage of stack protectors for all functions">;
-+def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, Group<f_Group>,
-+ HelpText<"Use a strong heuristic to apply stack protectors to functions">;
-+def fstack_protector : Flag<["-"], "fstack-protector">, Group<f_Group>,
-+ HelpText<"Enable stack protectors for functions potentially vulnerable to stack smashing">;
- def fstrict_aliasing : Flag<["-"], "fstrict-aliasing">, Group<f_Group>;
- def fstrict_enums : Flag<["-"], "fstrict-enums">, Group<f_Group>, Flags<[CC1Option]>,
- HelpText<"Enable optimizations based on the strict definition of an enum's "
-Index: lib/Frontend/CompilerInvocation.cpp
-===================================================================
---- lib/Frontend/CompilerInvocation.cpp (revision 201119)
-+++ lib/Frontend/CompilerInvocation.cpp (revision 201120)
-@@ -1435,7 +1435,8 @@
- break;
- case 0: Opts.setStackProtector(LangOptions::SSPOff); break;
- case 1: Opts.setStackProtector(LangOptions::SSPOn); break;
-- case 2: Opts.setStackProtector(LangOptions::SSPReq); break;
-+ case 2: Opts.setStackProtector(LangOptions::SSPStrong); break;
-+ case 3: Opts.setStackProtector(LangOptions::SSPReq); break;
- }
-
- // Parse -fsanitize= arguments.
-Index: lib/Frontend/InitPreprocessor.cpp
-===================================================================
---- lib/Frontend/InitPreprocessor.cpp (revision 201119)
-+++ lib/Frontend/InitPreprocessor.cpp (revision 201120)
-@@ -695,8 +695,10 @@
-
- if (LangOpts.getStackProtector() == LangOptions::SSPOn)
- Builder.defineMacro("__SSP__");
-+ else if (LangOpts.getStackProtector() == LangOptions::SSPStrong)
-+ Builder.defineMacro("__SSP_STRONG__", "2");
- else if (LangOpts.getStackProtector() == LangOptions::SSPReq)
-- Builder.defineMacro("__SSP_ALL__", "2");
-+ Builder.defineMacro("__SSP_ALL__", "3");
-
- if (FEOpts.ProgramAction == frontend::RewriteObjC)
- Builder.defineMacro("__weak", "__attribute__((objc_gc(weak)))");
-Index: lib/Driver/Tools.cpp
-===================================================================
---- lib/Driver/Tools.cpp (revision 201119)
-+++ lib/Driver/Tools.cpp (revision 201120)
-@@ -10,6 +10,7 @@
- #include "Tools.h"
- #include "InputInfo.h"
- #include "ToolChains.h"
-+#include "clang/Basic/LangOptions.h"
- #include "clang/Basic/ObjCRuntime.h"
- #include "clang/Basic/Version.h"
- #include "clang/Driver/Action.h"
-@@ -3114,11 +3115,14 @@
- unsigned StackProtectorLevel = 0;
- if (Arg *A = Args.getLastArg(options::OPT_fno_stack_protector,
- options::OPT_fstack_protector_all,
-+ options::OPT_fstack_protector_strong,
- options::OPT_fstack_protector)) {
- if (A->getOption().matches(options::OPT_fstack_protector))
-- StackProtectorLevel = 1;
-+ StackProtectorLevel = LangOptions::SSPOn;
-+ else if (A->getOption().matches(options::OPT_fstack_protector_strong))
-+ StackProtectorLevel = LangOptions::SSPStrong;
- else if (A->getOption().matches(options::OPT_fstack_protector_all))
-- StackProtectorLevel = 2;
-+ StackProtectorLevel = LangOptions::SSPReq;
- } else {
- StackProtectorLevel =
- getToolChain().GetDefaultStackProtectorLevel(KernelOrKext);
-Index: lib/CodeGen/CodeGenModule.cpp
-===================================================================
---- lib/CodeGen/CodeGenModule.cpp (revision 201119)
-+++ lib/CodeGen/CodeGenModule.cpp (revision 201120)
-@@ -651,6 +651,8 @@
-
- if (LangOpts.getStackProtector() == LangOptions::SSPOn)
- B.addAttribute(llvm::Attribute::StackProtect);
-+ else if (LangOpts.getStackProtector() == LangOptions::SSPStrong)
-+ B.addAttribute(llvm::Attribute::StackProtectStrong);
- else if (LangOpts.getStackProtector() == LangOptions::SSPReq)
- B.addAttribute(llvm::Attribute::StackProtectReq);
-
diff --git a/libre-multilib/lib32-clang/llvm-3.5.0-force-link-pass.o.patch b/libre-multilib/lib32-clang/llvm-3.5.0-force-link-pass.o.patch
new file mode 100644
index 000000000..acc4c1339
--- /dev/null
+++ b/libre-multilib/lib32-clang/llvm-3.5.0-force-link-pass.o.patch
@@ -0,0 +1,28 @@
+Index: llvm-toolchain-snapshot-3.5~svn211313/tools/bugpoint/Makefile
+===================================================================
+--- llvm-toolchain-snapshot-3.5~svn211313.orig/tools/bugpoint/Makefile
++++ llvm-toolchain-snapshot-3.5~svn211313/tools/bugpoint/Makefile
+@@ -12,6 +12,9 @@ TOOLNAME := bugpoint
+ LINK_COMPONENTS := asmparser instrumentation scalaropts ipo linker bitreader \
+ bitwriter irreader vectorize objcarcopts codegen
+
++# Crappy workaround to make sure it links correctly.
++LLVMLibsOptions := ../../lib/IR/Release*/Pass.o
++
+ # Support plugins.
+ NO_DEAD_STRIP := 1
+
+Index: llvm-toolchain-snapshot-3.5~svn211313/tools/opt/Makefile
+===================================================================
+--- llvm-toolchain-snapshot-3.5~svn211313.orig/tools/opt/Makefile
++++ llvm-toolchain-snapshot-3.5~svn211313/tools/opt/Makefile
+@@ -10,7 +10,9 @@
+ LEVEL := ../..
+ TOOLNAME := opt
+ LINK_COMPONENTS := bitreader bitwriter asmparser irreader instrumentation scalaropts objcarcopts ipo vectorize all-targets codegen
++# Crappy workaround to make sure it links correctly.
+
++LLVMLibsOptions := ../../lib/IR/Release*/Pass.o
+ # Support plugins.
+ NO_DEAD_STRIP := 1
+