Missed attaching patches in original report.
From b2bb3ff341a43a1abe033daa9d6fbf8bb6f86fab Mon Sep 17 00:00:00 2001 From: Vineet Gupta <vgu...@synopsys.com> Date: Wed, 3 Mar 2021 16:36:44 -0500 Subject: [PATCH 1/4] ARC/upstream: gcc driver default to hard-float
This change is already merged in mainline gcc as of 2021-06-02 commit 46d04271a498 "ARC: gcc driver default to hs38_linux" Signed-off-by: Vineet Gupta <vgu...@synopsys.com> --- debian/patches/arc-hf-default.diff | 18 ++++++++++++++++++ debian/rules.patch | 1 + 2 files changed, 19 insertions(+) create mode 100755 debian/patches/arc-hf-default.diff diff --git a/debian/patches/arc-hf-default.diff b/debian/patches/arc-hf-default.diff new file mode 100755 index 000000000000..d162d20d9ec3 --- /dev/null +++ b/debian/patches/arc-hf-default.diff @@ -0,0 +1,18 @@ +#DP: build for hf as default (implied by -mcpu=hs38_linux) + +--- + gcc/config/arc/arc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/gcc/config/arc/arc.h ++++ b/src/gcc/config/arc/arc.h +@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3. If not see + #define SYMBOL_FLAG_CMEM (SYMBOL_FLAG_MACH_DEP << 3) + + #ifndef TARGET_CPU_DEFAULT +-#define TARGET_CPU_DEFAULT PROCESSOR_arc700 ++#define TARGET_CPU_DEFAULT PROCESSOR_hs38_linux + #endif + + /* Check if this symbol has a long_call attribute in its declaration */ + diff --git a/debian/rules.patch b/debian/rules.patch index c4ae7a04c1a2..65fcbf8e4087 100644 --- a/debian/rules.patch +++ b/debian/rules.patch @@ -83,6 +83,7 @@ debian_patches += \ pr97250-3 \ pr97250-4 \ pr97714 \ + arc-hf-default \ ifneq (,$(filter $(distrelease),wheezy jessie stretch buster lucid precise trusty xenial bionic cosmic disco eoan)) debian_patches += pr85678-revert -- 2.25.1
From c42aba1683087c2287f4f289270207ebe24e4a7f Mon Sep 17 00:00:00 2001 From: Vineet Gupta <vgu...@synopsys.com> Date: Wed, 24 Mar 2021 16:37:01 -0700 Subject: [PATCH 2/4] ARC/debian/rules2: gcc disable multilib Signed-off-by: Vineet Gupta <vgu...@synopsys.com> --- debian/rules2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debian/rules2 b/debian/rules2 index 6a402f086592..cb07b861a35f 100644 --- a/debian/rules2 +++ b/debian/rules2 @@ -533,6 +533,10 @@ ifneq (,$(findstring riscv64-linux,$(DEB_TARGET_GNU_TYPE))) CONFARGS += --with-arch=rv64imafdc --with-abi=lp64d endif +ifneq (,$(findstring arc-linux,$(DEB_TARGET_GNU_TYPE))) + CONFARGS += --disable-multilib +endif + ifneq (,$(findstring s390x-linux,$(DEB_TARGET_GNU_TYPE))) ifeq ($(derivative),Ubuntu) ifneq (,$(filter $(distrelease),xenial bionic disco eoan focal)) -- 2.25.1
From fd969fd2af9a7d97f8ac6762ccb621380ea15943 Mon Sep 17 00:00:00 2001 From: Vineet Gupta <vgu...@synopsys.com> Date: Fri, 26 Mar 2021 14:46:54 -0700 Subject: [PATCH 3/4] ARC/debian: gcc: defines for multilib/multiarch enabling This is equivalent of following for arc - debian/patches/gcc-multiarch.diff - debian/patches/gcc-multilib-multiarch.diff Signed-off-by: Vineet Gupta <vgu...@synopsys.com> --- debian/patches/gcc-multiarch-arc.diff | 12 ++++++++++++ debian/rules.patch | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 debian/patches/gcc-multiarch-arc.diff diff --git a/debian/patches/gcc-multiarch-arc.diff b/debian/patches/gcc-multiarch-arc.diff new file mode 100644 index 000000000000..936883ae2285 --- /dev/null +++ b/debian/patches/gcc-multiarch-arc.diff @@ -0,0 +1,12 @@ +DP: ARC: inhibit multilibs, define MULTILIB_OSDIRNAMES/MULTIARCH_DIRNAME + +--- +--- a/src/gcc/config/arc/t-multilib-linux ++++ b/src/gcc/config/arc/t-multilib-linux +@@ -23,3 +23,6 @@ MULTILIB_DIRNAMES = hs archs hs38 hs38_linux arc700 nps400 + # Aliases: + MULTILIB_MATCHES += mcpu?arc700=mA7 + MULTILIB_MATCHES += mcpu?arc700=mARC700 ++ ++MULTILIB_OSDIRNAMES = ++MULTIARCH_DIRNAME = $(call if_multiarch,arc-linux-gnu) diff --git a/debian/rules.patch b/debian/rules.patch index 65fcbf8e4087..5c8aa1cd90f7 100644 --- a/debian/rules.patch +++ b/debian/rules.patch @@ -228,7 +228,7 @@ ifeq (,$(filter 2.1%, $(shell dpkg-query -l libc-bin | awk '/^.i/ {print $$3}')) #debian_patches += pr67899 endif -debian_patches += gcc-multiarch +debian_patches += gcc-multiarch gcc-multiarch-arc debian_patches += config-ml ifneq ($(single_package),yes) ifeq ($(with_multiarch_cxxheaders),yes) -- 2.25.1
From 34ee1efe6c89da1b021f355382b94c909480d079 Mon Sep 17 00:00:00 2001 From: Vineet Gupta <vgu...@synopsys.com> Date: Thu, 1 Apr 2021 14:57:49 -0700 Subject: [PATCH 4/4] ARC/debian: gcc: add build toogles as for other arches This is equivalent of following for arc - debian/patches/gcc-hash-style-gnu.diff - debian/patches/gcc-as-needed.diff Signed-off-by: Vineet Gupta <vgu...@synopsys.com> --- debian/patches/gcc-hash-style-gnu-arc.diff | 17 +++++++++++++++++ debian/rules.patch | 1 + 2 files changed, 18 insertions(+) create mode 100644 debian/patches/gcc-hash-style-gnu-arc.diff diff --git a/debian/patches/gcc-hash-style-gnu-arc.diff b/debian/patches/gcc-hash-style-gnu-arc.diff new file mode 100644 index 000000000000..dae6d77198b1 --- /dev/null +++ b/debian/patches/gcc-hash-style-gnu-arc.diff @@ -0,0 +1,17 @@ +#DP: Add updates for ARC as needed for other arches + + - debian/patches/gcc-hash-style-gnu.diff + - debian/patches/gcc-as-needed.diff + +--- +--- a/src/gcc/config/arc/linux.h ++++ b/src/gcc/config/arc/linux.h +@@ -37,6 +37,8 @@ along with GCC; see the file COPYING3. If not see + available. Override with -static. */ + #undef LINK_SPEC + #define LINK_SPEC "%{h*} \ ++ -hash-style=gnu \ ++ -as-needed \ + %{static:-Bstatic} \ + %{shared:-shared} \ + %{symbolic:-Bsymbolic} \ diff --git a/debian/rules.patch b/debian/rules.patch index 5c8aa1cd90f7..f00699636c10 100644 --- a/debian/rules.patch +++ b/debian/rules.patch @@ -84,6 +84,7 @@ debian_patches += \ pr97250-4 \ pr97714 \ arc-hf-default \ + gcc-hash-style-gnu-arc \ ifneq (,$(filter $(distrelease),wheezy jessie stretch buster lucid precise trusty xenial bionic cosmic disco eoan)) debian_patches += pr85678-revert -- 2.25.1