From 11d13e679e87aa010b7fca03846101d3b2458bb018c93370749f00f556b34abc Mon Sep 17 00:00:00 2001 From: Guillaume GARDET Date: Wed, 25 Nov 2020 15:10:28 +0000 Subject: [PATCH] Accepting request 850763 from home:Guillaume_G:branches:openSUSE:Factory:ARM - Fix aarch64 build: Drop '-mbranch-protection=standard' option as llvm7 does not support it OBS-URL: https://build.opensuse.org/request/show/850763 OBS-URL: https://build.opensuse.org/package/show/devel:languages:D/ldc?expand=0&rev=43 --- ldc.changes | 6 ++++++ ldc.spec | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/ldc.changes b/ldc.changes index 0ccc357..ee09a87 100644 --- a/ldc.changes +++ b/ldc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 25 15:09:09 UTC 2020 - Guillaume GARDET + +- Fix aarch64 build: Drop '-mbranch-protection=standard' option + as llvm7 does not support it + ------------------------------------------------------------------- Thu Oct 1 09:04:59 UTC 2020 - Guillaume GARDET diff --git a/ldc.spec b/ldc.spec index 2ea4dfc..3e5bba4 100644 --- a/ldc.spec +++ b/ldc.spec @@ -172,6 +172,13 @@ popd %endif %build +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 +%ifarch aarch64 +# llvm7 does not support '-mbranch-protection=standard' option +export CFLAGS=`echo "%{optflags}" |sed 's/-mbranch-protection=standard//'` +export CXXFLAGS=`echo "%{optflags}" |sed 's/-mbranch-protection=standard//'` +%endif +%endif %if %{with ldc_bootstrap} pushd ldc-0.17.6-src #Needs to be compiled with clang, but opensuse_rules.cmake forces gcc so disable rule