All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: "989453@bugs.debian.org" <989453@bugs.debian.org>
Cc: arcml <linux-snps-arc@lists.infradead.org>,
	Helmut Grohne <helmut@subdivi.de>,
	Guillem Jover <guillem@debian.org>
Subject: Debian: gcc: add support for ARC
Date: Fri, 4 Jun 2021 14:57:02 +0000	[thread overview]
Message-ID: <efef130b-ba69-fac0-3d34-9d9852ab6804@synopsys.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 46 bytes --]

Missed attaching patches in original report.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ARC-upstream-gcc-driver-default-to-hard-float.patch --]
[-- Type: text/x-patch; name="0001-ARC-upstream-gcc-driver-default-to-hard-float.patch", Size: 1814 bytes --]

From b2bb3ff341a43a1abe033daa9d6fbf8bb6f86fab Mon Sep 17 00:00:00 2001
From: Vineet Gupta <vgupta@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 <vgupta@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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-ARC-debian-rules2-gcc-disable-multilib.patch --]
[-- Type: text/x-patch; name="0002-ARC-debian-rules2-gcc-disable-multilib.patch", Size: 892 bytes --]

From c42aba1683087c2287f4f289270207ebe24e4a7f Mon Sep 17 00:00:00 2001
From: Vineet Gupta <vgupta@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 <vgupta@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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-ARC-debian-gcc-defines-for-multilib-multiarch-enabli.patch --]
[-- Type: text/x-patch; name="0003-ARC-debian-gcc-defines-for-multilib-multiarch-enabli.patch", Size: 1794 bytes --]

From fd969fd2af9a7d97f8ac6762ccb621380ea15943 Mon Sep 17 00:00:00 2001
From: Vineet Gupta <vgupta@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 <vgupta@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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-ARC-debian-gcc-add-build-toogles-as-for-other-arches.patch --]
[-- Type: text/x-patch; name="0004-ARC-debian-gcc-add-build-toogles-as-for-other-arches.patch", Size: 1823 bytes --]

From 34ee1efe6c89da1b021f355382b94c909480d079 Mon Sep 17 00:00:00 2001
From: Vineet Gupta <vgupta@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 <vgupta@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


[-- Attachment #6: Type: text/plain, Size: 170 bytes --]

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

             reply	other threads:[~2021-06-04 14:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 14:57 Vineet Gupta [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-06-05 11:12 Debian: gcc: add support for ARC Matthias Klose
2021-06-04 17:02 Vineet Gupta
2021-06-04 16:44 Vineet Gupta
2021-06-04  5:17 Vineet Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=efef130b-ba69-fac0-3d34-9d9852ab6804@synopsys.com \
    --to=vineet.gupta1@synopsys.com \
    --cc=989453@bugs.debian.org \
    --cc=guillem@debian.org \
    --cc=helmut@subdivi.de \
    --cc=linux-snps-arc@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.