From 4b5a3e57f23b8732dce61deb792137c7cc86ff01 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 26 Jan 2018 22:19:40 +0000 Subject: [PATCH] Ignore -fstack-clash-protection option instead of giving an error This is required now that Fedora uses -fstack-clash-protection in the default CFLAGS. --- ...ility-Ignore-fstack-clash-protection.patch | 42 +++++++++++++++++++ clang.spec | 7 +++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 0001-GCC-compatibility-Ignore-fstack-clash-protection.patch diff --git a/0001-GCC-compatibility-Ignore-fstack-clash-protection.patch b/0001-GCC-compatibility-Ignore-fstack-clash-protection.patch new file mode 100644 index 0000000..5683b71 --- /dev/null +++ b/0001-GCC-compatibility-Ignore-fstack-clash-protection.patch @@ -0,0 +1,42 @@ +From 428ca4520a79ec5a6df9c6adc8b8069623868cdb Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Fri, 26 Jan 2018 11:38:04 -0800 +Subject: [PATCH] GCC compatibility: Ignore -fstack-clash-protection + +Reviewers: sylvestre.ledru + +Subscribers: cfe-commits + +Differential Revision: https://reviews.llvm.org/D42593 +--- + 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 41f31cf..e9078a2 100644 +--- a/include/clang/Driver/Options.td ++++ b/include/clang/Driver/Options.td +@@ -2705,6 +2705,7 @@ defm single_precision_constant : BooleanFFlag<"single-precision-constant">, + Group; + defm spec_constr_count : BooleanFFlag<"spec-constr-count">, Group; + defm stack_check : BooleanFFlag<"stack-check">, Group; ++defm stack_clash_protection : BooleanFFlag<"stack-clash-protection">, Group; + defm strength_reduce : + BooleanFFlag<"strength-reduce">, Group; + defm tls_model : BooleanFFlag<"tls-model">, Group; +diff --git a/test/Driver/clang_f_opts.c b/test/Driver/clang_f_opts.c +index 5755c5d..8710ff4 100644 +--- a/test/Driver/clang_f_opts.c ++++ b/test/Driver/clang_f_opts.c +@@ -284,6 +284,7 @@ + // RUN: -ffriend-injection \ + // RUN: -fno-implement-inlines -fimplement-inlines \ + // RUN: -fstack-check \ ++// RUN: -fstack-clash-protection \ + // RUN: -fforce-addr \ + // RUN: -malign-functions=100 \ + // RUN: -malign-loops=100 \ +-- +1.8.3.1 + diff --git a/clang.spec b/clang.spec index 71b6026..4cac5c5 100644 --- a/clang.spec +++ b/clang.spec @@ -38,7 +38,7 @@ Name: clang Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 0.2.rc%{rc_ver}%{?dist} +Release: 0.3.rc%{rc_ver}%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -50,6 +50,7 @@ Source2: http://llvm.org/releases/%{version}/%{test_suite_srcdir}.tar.xz Source100: clang-config.h Patch0: 0001-lit.cfg-Add-hack-so-lit-can-find-not-and-FileCheck.patch +Patch1: 0001-GCC-compatibility-Ignore-fstack-clash-protection.patch BuildRequires: cmake BuildRequires: llvm-devel = %{version} @@ -168,6 +169,7 @@ Requires: python2 %setup -q -n %{clang_srcdir} %patch0 -p1 -b .lit-search-path +%patch1 -p1 -b .fstack-clash-protection mv ../%{clang_tools_srcdir} tools/extra @@ -303,6 +305,9 @@ make %{?_smp_mflags} check || : %{python2_sitelib}/clang/ %changelog +* Fri Jan 26 2018 Tom Stellard - 6.0.0-0.3.rc1 +- Ignore -fstack-clash-protection option instead of giving an error + * Fri Jan 26 2018 Tom Stellard - 6.0.0-0.2.rc1 - Package emacs integration files