[arch-commits] Commit in llvm/trunk (4 files)

Evangelos Foutras foutrelis at archlinux.org
Fri Mar 9 13:25:17 UTC 2018


    Date: Friday, March 9, 2018 @ 13:25:14
  Author: foutrelis
Revision: 318319

upgpkg: llvm 6.0.0-1

- New upstream release
- Start split of subpackages into separate PKGBUILDs
- Specify host triplet (new: x86_64-pc-linux-gnu, old: x86_64-unknown-linux-gnu)

Modified:
  llvm/trunk/PKGBUILD
Deleted:
  llvm/trunk/0001-GCC-compatibility-Ignore-the-fno-plt-flag.patch
  llvm/trunk/0002-Enable-SSP-and-PIE-by-default.patch
  llvm/trunk/disable-llvm-symbolizer-test.patch

------------------------------------------------------+
 0001-GCC-compatibility-Ignore-the-fno-plt-flag.patch |   37 --
 0002-Enable-SSP-and-PIE-by-default.patch             |  268 -----------------
 PKGBUILD                                             |  193 +-----------
 disable-llvm-symbolizer-test.patch                   |   26 -
 4 files changed, 21 insertions(+), 503 deletions(-)

Deleted: 0001-GCC-compatibility-Ignore-the-fno-plt-flag.patch
===================================================================
--- 0001-GCC-compatibility-Ignore-the-fno-plt-flag.patch	2018-03-09 11:05:58 UTC (rev 318318)
+++ 0001-GCC-compatibility-Ignore-the-fno-plt-flag.patch	2018-03-09 13:25:14 UTC (rev 318319)
@@ -1,37 +0,0 @@
-From fedcf1d9691bf669d8cd771a032e851d8247aff9 Mon Sep 17 00:00:00 2001
-From: Evangelos Foutras <evangelos at foutrelis.com>
-Date: Thu, 6 Jul 2017 18:53:05 +0300
-Subject: [PATCH 1/2] GCC compatibility: Ignore the -fno-plt flag
-
----
- include/clang/Driver/Options.td | 1 +
- test/Driver/clang_f_opts.c      | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td
-index 05dc9d7eb3..c93e6cc08c 100644
---- a/include/clang/Driver/Options.td
-+++ b/include/clang/Driver/Options.td
-@@ -2505,6 +2505,7 @@ defm ivopts : BooleanFFlag<"ivopts">, Group<clang_ignored_gcc_optimization_f_Gro
- defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group<clang_ignored_f_Group>;
- defm peel_loops : BooleanFFlag<"peel-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
- defm permissive : BooleanFFlag<"permissive">, Group<clang_ignored_f_Group>;
-+defm plt : BooleanFFlag<"plt">, Group<clang_ignored_f_Group>;
- defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">, Group<clang_ignored_gcc_optimization_f_Group>;
- defm printf : BooleanFFlag<"printf">, Group<clang_ignored_f_Group>;
- defm profile : BooleanFFlag<"profile">, Group<clang_ignored_f_Group>;
-diff --git a/test/Driver/clang_f_opts.c b/test/Driver/clang_f_opts.c
-index c17cec6eba..d9480c915e 100644
---- a/test/Driver/clang_f_opts.c
-+++ b/test/Driver/clang_f_opts.c
-@@ -277,6 +277,7 @@
- // RUN:     -fno-caller-saves -fcaller-saves                                  \
- // RUN:     -fno-reorder-blocks -freorder-blocks                              \
- // RUN:     -fno-schedule-insns2 -fschedule-insns2                            \
-+// RUN:     -fno-plt -fplt                                                    \
- // RUN:     -fno-stack-check                                                  \
- // RUN:     -fno-check-new -fcheck-new                                        \
- // RUN:     -ffriend-injection                                                \
--- 
-2.14.1
-

Deleted: 0002-Enable-SSP-and-PIE-by-default.patch
===================================================================
--- 0002-Enable-SSP-and-PIE-by-default.patch	2018-03-09 11:05:58 UTC (rev 318318)
+++ 0002-Enable-SSP-and-PIE-by-default.patch	2018-03-09 13:25:14 UTC (rev 318319)
@@ -1,268 +0,0 @@
-From 60fa751da239e592b31bde2533342dac64359e7f Mon Sep 17 00:00:00 2001
-From: Evangelos Foutras <evangelos at foutrelis.com>
-Date: Thu, 6 Jul 2017 18:15:43 +0300
-Subject: [PATCH 2/2] Enable SSP and PIE by default
-
-This is a minimal set of changes needed to make clang use SSP and PIE by
-default on Arch Linux. Tests that were easy to adjust have been changed
-accordingly; only test/Driver/linux-ld.c has been marked as "expected
-failure" due to the number of changes it would require (mostly replacing
-crtbegin.o with crtbeginS.o).
-
-Doing so is needed in order to align clang with the new default GCC
-behavior in Arch which generates PIE executables by default and also
-defaults to -fstack-protector-strong. It is not meant to be a long term
-solution, but a simple temporary fix.
-
-Hopefully these changes will be obsoleted by the introduction upstream
-of a compile-time option (https://bugs.llvm.org/show_bug.cgi?id=13410)
----
- lib/Driver/ToolChains/Gnu.cpp       |  1 +
- lib/Driver/ToolChains/Linux.cpp     | 14 +++++++++++++-
- lib/Driver/ToolChains/Linux.h       |  1 +
- test/Driver/cross-linux.c           | 16 ++++++++--------
- test/Driver/env.c                   |  2 +-
- test/Driver/fsanitize.c             | 18 ++++++++++--------
- test/Driver/gcc-toolchain.cpp       |  2 +-
- test/Driver/hexagon-toolchain-elf.c |  2 +-
- test/Driver/linux-as.c              |  4 ++--
- test/Driver/linux-ld.c              |  2 ++
- test/Driver/stack-protector.c       |  4 ++--
- 11 files changed, 42 insertions(+), 24 deletions(-)
-
-diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
-index 72a9f85ba3..4fd567b03b 100644
---- a/lib/Driver/ToolChains/Gnu.cpp
-+++ b/lib/Driver/ToolChains/Gnu.cpp
-@@ -417,6 +417,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
-   const bool IsIAMCU = ToolChain.getTriple().isOSIAMCU();
-   const bool IsPIE =
-       !Args.hasArg(options::OPT_shared) && !Args.hasArg(options::OPT_static) &&
-+      !Args.hasArg(options::OPT_nopie) &&
-       (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault());
-   const bool HasCRTBeginEndFiles =
-       ToolChain.getTriple().hasEnvironment() ||
-diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
-index 08a27fa7fe..1dd70b115d 100644
---- a/lib/Driver/ToolChains/Linux.cpp
-+++ b/lib/Driver/ToolChains/Linux.cpp
-@@ -810,7 +810,19 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs,
-   }
- }
- 
--bool Linux::isPIEDefault() const { return getSanitizerArgs().requiresPIE(); }
-+bool Linux::isPIEDefault() const {
-+  const bool IsMips = tools::isMipsArch(getTriple().getArch());
-+  const bool IsAndroid = getTriple().isAndroid();
-+
-+  if (IsMips || IsAndroid)
-+    return getSanitizerArgs().requiresPIE();
-+
-+  return true;
-+}
-+
-+unsigned Linux::GetDefaultStackProtectorLevel(bool KernelOrKext) const {
-+  return 2;
-+}
- 
- SanitizerMask Linux::getSupportedSanitizers() const {
-   const bool IsX86 = getTriple().getArch() == llvm::Triple::x86;
-diff --git a/lib/Driver/ToolChains/Linux.h b/lib/Driver/ToolChains/Linux.h
-index 9778c1832c..ddd46a1d58 100644
---- a/lib/Driver/ToolChains/Linux.h
-+++ b/lib/Driver/ToolChains/Linux.h
-@@ -36,6 +36,7 @@ public:
-   void AddIAMCUIncludeArgs(const llvm::opt::ArgList &DriverArgs,
-                            llvm::opt::ArgStringList &CC1Args) const override;
-   bool isPIEDefault() const override;
-+  unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override;
-   SanitizerMask getSupportedSanitizers() const override;
-   void addProfileRTLibs(const llvm::opt::ArgList &Args,
-                         llvm::opt::ArgStringList &CmdArgs) const override;
-diff --git a/test/Driver/cross-linux.c b/test/Driver/cross-linux.c
-index a5ea832e77..1949c05a60 100644
---- a/test/Driver/cross-linux.c
-+++ b/test/Driver/cross-linux.c
-@@ -42,8 +42,8 @@
- // CHECK-MULTI32-I386: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/bin{{/|\\\\}}ld"
- // CHECK-MULTI32-I386: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]"
- // CHECK-MULTI32-I386: "-m" "elf_i386"
--// CHECK-MULTI32-I386: "crti.o" "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]{{/|\\\\}}crtbegin.o"
--// CHECK-MULTI32-I386: "-L[[gcc_install]]"
-+// CHECK-MULTI32-I386: "crti.o" "crtbeginS.o"
-+// CHECK-MULTI32-I386: "-L[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]"
- // CHECK-MULTI32-I386: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib/../lib32"
- // CHECK-MULTI32-I386: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib"
- // CHECK-MULTI32-I386: "-L[[sysroot]]/lib"
-@@ -59,8 +59,8 @@
- // CHECK-MULTI32-X86-64: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/bin{{/|\\\\}}ld"
- // CHECK-MULTI32-X86-64: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]"
- // CHECK-MULTI32-X86-64: "-m" "elf_x86_64"
--// CHECK-MULTI32-X86-64: "crti.o" "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]/64{{/|\\\\}}crtbegin.o"
--// CHECK-MULTI32-X86-64: "-L[[gcc_install]]/64"
-+// CHECK-MULTI32-X86-64: "crti.o" "crtbeginS.o"
-+// CHECK-MULTI32-X86-64: "-L[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]/64"
- // CHECK-MULTI32-X86-64: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib/../lib64"
- // CHECK-MULTI32-X86-64: "-L[[gcc_install]]"
- // CHECK-MULTI32-X86-64: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib"
-@@ -77,8 +77,8 @@
- // CHECK-MULTI64-I386: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/bin{{/|\\\\}}ld"
- // CHECK-MULTI64-I386: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]"
- // CHECK-MULTI64-I386: "-m" "elf_i386"
--// CHECK-MULTI64-I386: "crti.o" "[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0]]/32{{/|\\\\}}crtbegin.o"
--// CHECK-MULTI64-I386: "-L[[gcc_install]]/32"
-+// CHECK-MULTI64-I386: "crti.o" "crtbeginS.o"
-+// CHECK-MULTI64-I386: "-L[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0]]/32"
- // CHECK-MULTI64-I386: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib/../lib32"
- // CHECK-MULTI64-I386: "-L[[gcc_install]]"
- // CHECK-MULTI64-I386: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib"
-@@ -95,8 +95,8 @@
- // CHECK-MULTI64-X86-64: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/bin{{/|\\\\}}ld"
- // CHECK-MULTI64-X86-64: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]"
- // CHECK-MULTI64-X86-64: "-m" "elf_x86_64"
--// CHECK-MULTI64-X86-64: "crti.o" "[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0]]{{/|\\\\}}crtbegin.o"
--// CHECK-MULTI64-X86-64: "-L[[gcc_install]]"
-+// CHECK-MULTI64-X86-64: "crti.o" "crtbeginS.o"
-+// CHECK-MULTI64-X86-64: "-L[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0]]"
- // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib/../lib64"
- // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib"
- // CHECK-MULTI64-X86-64: "-L[[sysroot]]/lib"
-diff --git a/test/Driver/env.c b/test/Driver/env.c
-index 0371bc91c4..ea89f52512 100644
---- a/test/Driver/env.c
-+++ b/test/Driver/env.c
-@@ -20,7 +20,7 @@
- //
- // CHECK-LD-32-NOT: warning:
- // CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
--// CHECK-LD-32: "{{.*}}/usr/lib/gcc/i386-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o"
-+// CHECK-LD-32: "crtbeginS.o"
- // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0"
- // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib"
- // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.."
-diff --git a/test/Driver/fsanitize.c b/test/Driver/fsanitize.c
-index 0752ef6df0..5d1e211b24 100644
---- a/test/Driver/fsanitize.c
-+++ b/test/Driver/fsanitize.c
-@@ -192,13 +192,13 @@
- // RUN: %clang -target x86_64-linux-gnu -fsanitize=vptr -fno-sanitize=vptr -fsanitize=undefined,address %s -### 2>&1
- // OK
- 
--// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PIE
--// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PIE
-+// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE
-+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE
- // RUN: %clang -target x86_64-unknown-freebsd -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE
- // RUN: %clang -target aarch64-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE
- // RUN: %clang -target arm-linux-androideabi -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE
--// RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PIE
--// RUN: %clang -target i386-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PIE
-+// RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE
-+// RUN: %clang -target i386-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE
- 
- // CHECK-NO-PIE-NOT: "-pie"
- // CHECK-NO-PIE: "-mrelocation-model" "static"
-@@ -491,12 +491,12 @@
- // RUN: %clang -fno-sanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NOSP
- // NOSP-NOT: "-fsanitize=safe-stack"
- 
--// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
--// RUN: %clang -target x86_64-linux-gnu -fsanitize=address,safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP-ASAN
-+// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP
-+// RUN: %clang -target x86_64-linux-gnu -fsanitize=address,safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP-ASAN
- // RUN: %clang -target x86_64-linux-gnu -fstack-protector -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP
- // RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=SP
--// RUN: %clang -target arm-linux-androideabi -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
--// RUN: %clang -target aarch64-linux-android -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
-+// RUN: %clang -target arm-linux-androideabi -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP
-+// RUN: %clang -target aarch64-linux-android -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP
- // RUN: %clang -target i386-contiki-unknown -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
- // NO-SP-NOT: stack-protector
- // NO-SP: "-fsanitize=safe-stack"
-@@ -506,6 +506,8 @@
- 
- // NO-SP-ASAN-NOT: stack-protector
- // NO-SP-ASAN: "-fsanitize=address,safe-stack"
-+// SP-ASAN: "-fsanitize=address,safe-stack"
-+// SP-ASAN: -stack-protector
- // NO-SP-ASAN-NOT: stack-protector
- 
- // RUN: %clang -target powerpc64-unknown-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-SANM
-diff --git a/test/Driver/gcc-toolchain.cpp b/test/Driver/gcc-toolchain.cpp
-index ca96757a2b..ae1c25e989 100644
---- a/test/Driver/gcc-toolchain.cpp
-+++ b/test/Driver/gcc-toolchain.cpp
-@@ -24,6 +24,6 @@
- // the same precise formatting of the path as the '-internal-system' flags
- // above, so we just blanket wildcard match the 'crtbegin.o'.
- // CHECK: "{{[^"]*}}ld{{(.exe)?}}"
--// CHECK: "{{[^"]*}}/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5{{/|\\\\}}crtbegin.o"
-+// CHECK: "crtbeginS.o"
- // CHECK: "-L[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5"
- // CHECK: "-L[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../.."
-diff --git a/test/Driver/hexagon-toolchain-elf.c b/test/Driver/hexagon-toolchain-elf.c
-index 98582450e3..b2da01eaf5 100644
---- a/test/Driver/hexagon-toolchain-elf.c
-+++ b/test/Driver/hexagon-toolchain-elf.c
-@@ -449,7 +449,7 @@
- // RUN:   %s 2>&1 \
- // RUN:   | FileCheck -check-prefix=CHECK042 %s
- // CHECK042:      "-cc1"
--// CHECK042:      "-mrelocation-model" "static"
-+// CHECK042:      "-mrelocation-model" "pic"
- // CHECK042:      "-mllvm" "-hexagon-small-data-threshold=8"
- // CHECK042-NEXT: llvm-mc
- // CHECK042:      "-gpsize=8"
-diff --git a/test/Driver/linux-as.c b/test/Driver/linux-as.c
-index c5cb1cd600..1ad86d8ead 100644
---- a/test/Driver/linux-as.c
-+++ b/test/Driver/linux-as.c
-@@ -133,7 +133,7 @@
- // CHECK-PPC-NO-MCPU-NOT: as{{.*}} "-mcpu=invalid-cpu"
- //
- // RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \
--// RUN:   -no-integrated-as -c %s 2>&1 \
-+// RUN:   -no-integrated-as -fno-pic -c %s 2>&1 \
- // RUN:   | FileCheck -check-prefix=CHECK-SPARCV9 %s
- // CHECK-SPARCV9: as
- // CHECK-SPARCV9: -64
-@@ -142,7 +142,7 @@
- // CHECK-SPARCV9: -o
- //
- // RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \
--// RUN:   -no-integrated-as -fpic -c %s 2>&1 \
-+// RUN:   -no-integrated-as -c %s 2>&1 \
- // RUN:   | FileCheck -check-prefix=CHECK-SPARCV9PIC %s
- // CHECK-SPARCV9PIC: as
- // CHECK-SPARCV9PIC: -64
-diff --git a/test/Driver/linux-ld.c b/test/Driver/linux-ld.c
-index 1c5f1a4556..2885f78045 100644
---- a/test/Driver/linux-ld.c
-+++ b/test/Driver/linux-ld.c
-@@ -1,3 +1,5 @@
-+// XFAIL: linux
-+
- // General tests that ld invocations on Linux targets sane. Note that we use
- // sysroot to make these tests independent of the host system.
- //
-diff --git a/test/Driver/stack-protector.c b/test/Driver/stack-protector.c
-index 6769b65f63..180e26f3ea 100644
---- a/test/Driver/stack-protector.c
-+++ b/test/Driver/stack-protector.c
-@@ -3,11 +3,11 @@
- // NOSSP-NOT: "-stack-protector-buffer-size" 
- 
- // RUN: %clang -target i386-unknown-linux -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=SSP
--// SSP: "-stack-protector" "1"
-+// SSP: "-stack-protector" "2"
- // SSP-NOT: "-stack-protector-buffer-size" 
- 
- // RUN: %clang -target i386-unknown-linux -fstack-protector --param ssp-buffer-size=16 -### %s 2>&1 | FileCheck %s -check-prefix=SSP-BUF
--// SSP-BUF: "-stack-protector" "1"
-+// SSP-BUF: "-stack-protector" "2"
- // SSP-BUF: "-stack-protector-buffer-size" "16" 
- 
- // RUN: %clang -target i386-pc-openbsd -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD
--- 
-2.14.1
-

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-03-09 11:05:58 UTC (rev 318318)
+++ PKGBUILD	2018-03-09 13:25:14 UTC (rev 318319)
@@ -1,80 +1,37 @@
 # $Id$
 # Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
 # Contributor: Jan "heftig" Steffens <jan.steffens at gmail.com>
-# Contributor: Sebastian Nowicki <sebnow at gmail.com>
-# Contributor: Devin Cofer <ranguvar{AT]archlinux[DOT}us>
-# Contributor: Tobias Kieslich <tobias at justdreams.de>
-# Contributor: Geoffroy Carrier <geoffroy.carrier at aur.archlinux.org>
-# Contributor: Tomas Lindquist Olsen <tomas at famolsen.dk>
-# Contributor: Roberto Alsina <ralsina at kde.org>
-# Contributor: Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar>
 
-pkgname=('llvm' 'llvm-libs' 'llvm-ocaml' 'lld' 'lldb' 'clang' 'clang-tools-extra')
-pkgver=5.0.1
-pkgrel=2
+pkgname=('llvm' 'llvm-libs' 'llvm-ocaml')
+pkgver=6.0.0
+pkgrel=1
 _ocaml_ver=4.06.0
 arch=('x86_64')
-url="http://llvm.org/"
+url="https://llvm.org/"
 license=('custom:University of Illinois/NCSA Open Source License')
-makedepends=('cmake' 'libffi' 'python2' "ocaml=$_ocaml_ver" 'python-sphinx'
-             'ocaml-ctypes' 'ocaml-findlib' 'libedit' 'swig')
-# Build 32-bit compiler-rt libraries on x86_64 (FS#41911)
-makedepends_x86_64=('lib32-gcc-libs')
+makedepends=('cmake' 'ninja' 'libffi' 'libedit' 'ncurses' 'libxml2' 'python-sphinx'
+             "ocaml=$_ocaml_ver" 'ocaml-ctypes' 'ocaml-findlib')
 options=('staticlibs')
 source=(https://releases.llvm.org/$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
-        https://releases.llvm.org/$pkgver/cfe-$pkgver.src.tar.xz{,.sig}
-        https://releases.llvm.org/$pkgver/clang-tools-extra-$pkgver.src.tar.xz{,.sig}
-        https://releases.llvm.org/$pkgver/compiler-rt-$pkgver.src.tar.xz{,.sig}
-        https://releases.llvm.org/$pkgver/lld-$pkgver.src.tar.xz{,.sig}
-        https://releases.llvm.org/$pkgver/lldb-$pkgver.src.tar.xz{,.sig}
-        0001-GCC-compatibility-Ignore-the-fno-plt-flag.patch
-        0002-Enable-SSP-and-PIE-by-default.patch
-        disable-llvm-symbolizer-test.patch
         llvm-config.h)
-sha256sums=('5fa7489fc0225b11821cab0362f5813a05f2bcf2533e8a4ea9c9c860168807b0'
+sha256sums=('1ff53c915b4e761ef400b803f07261ade637b0c269d99569f18040f3dcee4408'
             'SKIP'
-            '135f6c9b0cd2da1aff2250e065946258eb699777888df39ca5a5b4fe5e23d0ff'
-            'SKIP'
-            '9aada1f9d673226846c3399d13fab6bba4bfd38bcfe8def5ee7b0ec24f8cd225'
-            'SKIP'
-            '4edd1417f457a9b3f0eb88082530490edf3cf6a7335cdce8ecbc5d3e16a895da'
-            'SKIP'
-            'd5b36c0005824f07ab093616bdff247f3da817cae2c51371e1d1473af717d895'
-            'SKIP'
-            'b7c1c9e67975ca219089a3a6a9c77c2d102cead2dc38264f2524aa3326da376a'
-            'SKIP'
-            'a1ba7fb859ac157c4b4342435cd656e29b1e1d9bddcb8ae0158a91c0a8ba6203'
-            '186f2d10b013395f2dd6e1fd3baf4961a2e40c403f115517c9b253682934f50f'
-            '6fff47ab5ede79d45fe64bb4903b7dfc27212a38e6cd5d01e60ebd24b7557359'
             '597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48')
-validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D'
-              '11E521D646982372EB577A1F8F0871F202119294')
+validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans at chromium.org>
+validpgpkeys+=('11E521D646982372EB577A1F8F0871F202119294') # Tom Stellard <tom at stellard.net>
 
 prepare() {
   cd "$srcdir/llvm-$pkgver.src"
   mkdir build
-
-  mv "$srcdir/cfe-$pkgver.src" tools/clang
-  mv "$srcdir/clang-tools-extra-$pkgver.src" tools/clang/tools/extra
-  mv "$srcdir/compiler-rt-$pkgver.src" projects/compiler-rt
-  mv "$srcdir/lld-$pkgver.src" tools/lld
-  mv "$srcdir/lldb-$pkgver.src" tools/lldb
-
-  # Disable test that fails when compiled as PIE
-  # https://bugs.llvm.org/show_bug.cgi?id=31870
-  patch -Np1 <../disable-llvm-symbolizer-test.patch
-
-  # Enable SSP and PIE by default
-  patch -Np1 -d tools/clang <../0001-GCC-compatibility-Ignore-the-fno-plt-flag.patch
-  patch -Np1 -d tools/clang <../0002-Enable-SSP-and-PIE-by-default.patch
 }
 
 build() {
   cd "$srcdir/llvm-$pkgver.src/build"
 
-  cmake \
+  cmake .. -G Ninja \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DLLVM_HOST_TRIPLE=$CHOST \
     -DLLVM_BUILD_LLVM_DYLIB=ON \
     -DLLVM_LINK_LLVM_DYLIB=ON \
     -DLLVM_INSTALL_UTILS=ON \
@@ -86,30 +43,22 @@
     -DLLVM_ENABLE_DOXYGEN=OFF \
     -DSPHINX_WARNINGS_AS_ERRORS=OFF \
     -DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \
-    -DLLVM_BINUTILS_INCDIR=/usr/include \
-    ..
-
-  make
-  make ocaml_doc
-
-  # Disable automatic installation of components that go into subpackages
-  sed -i '/\(clang\|lld\|lldb\)\/cmake_install.cmake/d' tools/cmake_install.cmake
-  sed -i '/extra\/cmake_install.cmake/d' tools/clang/tools/cmake_install.cmake
-  sed -i '/compiler-rt\/cmake_install.cmake/d' projects/cmake_install.cmake
+    -DLLVM_BINUTILS_INCDIR=/usr/include
+  ninja all ocaml_doc
 }
 
 check() {
   cd "$srcdir/llvm-$pkgver.src/build"
-  make check-{llvm,clang,clang-tools,lld}
+  ninja check
 }
 
 package_llvm() {
-  pkgdesc="Low Level Virtual Machine"
+  pkgdesc="Collection of modular and reusable compiler and toolchain technologies"
   depends=('llvm-libs' 'perl')
 
-  cd "$srcdir/llvm-$pkgver.src"
+  cd "$srcdir/llvm-$pkgver.src/build"
 
-  make -C build DESTDIR="$pkgdir" install
+  DESTDIR="$pkgdir" ninja install
 
   # Remove documentation sources
   rm -r "$pkgdir"/usr/share/doc/$pkgname/html/{_sources,.buildinfo}
@@ -130,12 +79,12 @@
     cp "$srcdir/llvm-config.h" "$pkgdir/usr/include/llvm/Config/llvm-config.h"
   fi
 
-  install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
 
 package_llvm-libs() {
-  pkgdesc="Low Level Virtual Machine (runtime libraries)"
-  depends=('gcc-libs' 'zlib' 'libffi' 'libedit' 'ncurses')
+  pkgdesc="LLVM runtime libraries"
+  depends=('gcc-libs' 'zlib' 'libffi' 'libedit' 'ncurses' 'libxml2')
 
   install -d "$pkgdir/usr/lib"
   cp -P \
@@ -156,112 +105,12 @@
   pkgdesc="OCaml bindings for LLVM"
   depends=('llvm' "ocaml=$_ocaml_ver" 'ocaml-ctypes')
 
-  cd "$srcdir/llvm-$pkgver.src"
-
   install -d "$pkgdir"/{usr/lib,usr/share/doc/$pkgname}
   cp -a "$srcdir/ocaml.lib" "$pkgdir/usr/lib/ocaml"
   cp -a "$srcdir/ocaml.doc" "$pkgdir/usr/share/doc/$pkgname/html"
 
-  install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-package_lld() {
-  pkgdesc="Linker from the LLVM project"
-  url="http://lld.llvm.org/"
-  depends=('llvm-libs')
-
-  cd "$srcdir/llvm-$pkgver.src"
-
-  make -C build/tools/lld DESTDIR="$pkgdir" install
-
-  # Remove documentation sources
-  rm -r "$pkgdir"/usr/share/doc/$pkgname/html/{_sources,.buildinfo}
-
-  install -Dm644 tools/$pkgname/LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-package_lldb() {
-  pkgdesc="Next generation, high-performance debugger"
-  url="http://lldb.llvm.org/"
-  depends=('llvm-libs' 'libxml2' 'python2' 'python2-six')
-
-  cd "$srcdir/llvm-$pkgver.src"
-
-  make -C build/tools/lldb DESTDIR="$pkgdir" install
-
-  # https://bugs.archlinux.org/task/50759
-  sed -i "/import_module('_lldb')/s/_lldb/lldb.&/" \
-    "$pkgdir/usr/lib/python2.7/site-packages/lldb/__init__.py"
-
-  # Remove bundled six library
-  rm "$pkgdir/usr/lib/python2.7/site-packages/six.py"
-
-  # Compile Python scripts
-  python2 -m compileall "$pkgdir/usr/lib/python2.7/site-packages/lldb"
-  python2 -O -m compileall "$pkgdir/usr/lib/python2.7/site-packages/lldb"
-
-  install -Dm644 tools/$pkgname/LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-package_clang() {
-  pkgdesc="C language family frontend for LLVM"
-  url="http://clang.llvm.org/"
-  depends=('llvm-libs' 'gcc' 'libxml2')
-  optdepends=('openmp: OpenMP support in clang with -fopenmp'
-              'python2: for scan-view and git-clang-format')
-  provides=("clang-analyzer=$pkgver")
-  conflicts=('clang-analyzer')
-  replaces=('clang-analyzer')
-
-  cd "$srcdir/llvm-$pkgver.src"
-
-  make -C build/tools/clang DESTDIR="$pkgdir" install
-  make -C build/projects/compiler-rt DESTDIR="$pkgdir" install
-
-  # Remove documentation sources
-  rm -r "$pkgdir"/usr/share/doc/$pkgname/html/{_sources,.buildinfo}
-
-  # Move analyzer scripts out of /usr/libexec
-  mv "$pkgdir"/usr/libexec/{ccc,c++}-analyzer "$pkgdir/usr/lib/clang/"
-  rmdir "$pkgdir/usr/libexec"
-  sed -i 's|libexec|lib/clang|' "$pkgdir/usr/bin/scan-build"
-
-  # Install Python bindings
-  install -d "$pkgdir/usr/lib/python2.7/site-packages"
-  cp -a tools/clang/bindings/python/clang "$pkgdir/usr/lib/python2.7/site-packages/"
-
-  # Use Python 2
-  sed -i 's|/usr/bin/env python|&2|' \
-    "$pkgdir/usr/bin/scan-view" \
-    "$pkgdir/usr/bin/git-clang-format" \
-    "$pkgdir/usr/share/$pkgname/clang-format-diff.py"
-
-  # Compile Python scripts
-  python2 -m compileall "$pkgdir"
-  python2 -O -m compileall "$pkgdir"
-
-  install -Dm644 tools/$pkgname/LICENSE.TXT \
+  install -Dm644 "$srcdir/llvm-$pkgver.src/LICENSE.TXT" \
     "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
 
-package_clang-tools-extra() {
-  pkgdesc="Extra tools built using clang's tooling APIs"
-  url="http://clang.llvm.org/"
-  depends=('clang')
-
-  cd "$srcdir/llvm-$pkgver.src"
-
-  make -C build/tools/clang/tools/extra DESTDIR="$pkgdir" install
-
-  # Remove documentation sources
-  rm -r "$pkgdir"/usr/share/doc/clang-tools/html/{_sources,.buildinfo}
-
-  # Use Python 2
-  sed -i 's|/usr/bin/env python|&2|' \
-    "$pkgdir"/usr/share/clang/{clang-tidy-diff,run-clang-tidy,run-find-all-symbols}.py
-
-  install -Dm644 tools/clang/tools/extra/LICENSE.TXT \
-    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
 # vim:set ts=2 sw=2 et:

Deleted: disable-llvm-symbolizer-test.patch
===================================================================
--- disable-llvm-symbolizer-test.patch	2018-03-09 11:05:58 UTC (rev 318318)
+++ disable-llvm-symbolizer-test.patch	2018-03-09 13:25:14 UTC (rev 318319)
@@ -1,26 +0,0 @@
-Description: Silent a test failing on yakkety amd64
- /tmp/buildd/llvm-toolchain-snapshot-4.0~svn279801/test/tools/llvm-symbolizer/print_context.c:16:11: error: expected string not found in input
- // CHECK: inc
-          ^
- <stdin>:1:1: note: scanning from here
- _fini
- ^
- <stdin>:1:3: note: possible intended match here
- _fini
-  ^
-Author: Sylvestre <sylvestre at debian.org>
-Last-Update: 2016-08-26
-
-Index: llvm-toolchain-3.9-3.9~+rc1/test/tools/llvm-symbolizer/print_context.c
-===================================================================
---- llvm-toolchain-3.9-3.9~+rc1.orig/test/tools/llvm-symbolizer/print_context.c
-+++ llvm-toolchain-3.9-3.9~+rc1/test/tools/llvm-symbolizer/print_context.c
-@@ -1,7 +1,7 @@
- // REQUIRES: x86_64-linux
- // RUN: %host_cc -O0 -g %s -o %t 2>&1
- // RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s
--
-+// XFAIL: *
- #include <stdio.h>
- 
- int inc(int a) {



More information about the arch-commits mailing list