Debian: gcc: add support for ARC
Missed attaching patches in original report.
From b2bb3ff341a43a1abe033daa9d6fbf8bb6f86fab Mon Sep 17 00:00:00 2001
From: Vineet Gupta <[email protected]>
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"
--- 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
debian/patches/arc-hf-default.diff new file +18 -0
@@ -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 */ +
debian/rules.patch +1 -0
@@ -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
Signature · 1 line
2.25.1
From c42aba1683087c2287f4f289270207ebe24e4a7f Mon Sep 17 00:00:00 2001
From: Vineet Gupta <[email protected]>
Date: Wed, 24 Mar 2021 16:37:01 -0700
Subject: [PATCH 2/4] ARC/debian/rules2: gcc disable multilib
--- debian/rules2 | 4 ++++ 1 file changed, 4 insertions(+)
debian/rules2 +4 -0
@@ -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))
Signature · 1 line
2.25.1
From fd969fd2af9a7d97f8ac6762ccb621380ea15943 Mon Sep 17 00:00:00 2001
From: Vineet Gupta <[email protected]>
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
--- 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
debian/patches/gcc-multiarch-arc.diff new file +12 -0
@@ -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)
debian/rules.patch +1 -1
@@ -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)
Signature · 1 line
2.25.1
From 34ee1efe6c89da1b021f355382b94c909480d079 Mon Sep 17 00:00:00 2001
From: Vineet Gupta <[email protected]>
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
--- 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
debian/patches/gcc-hash-style-gnu-arc.diff new file +17 -0
@@ -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} \
debian/rules.patch +1 -0
@@ -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
Signature · 1 line
2.25.1
_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc