diff mbox

Use arclinux_nps linker emulation for nps400

Message ID 1481569860-20872-1-git-send-email-graham.markall@embecosm.com
State New
Headers show

Commit Message

Graham Markall Dec. 12, 2016, 7:11 p.m. UTC
This proposed binutils patch adds an arclinux_nps linker emulation:

https://sourceware.org/ml/binutils/2016-12/msg00172.html

The arclinux_nps emulation provides some additional symbols in the
linker script, which are specific to the Mellanox NPS-400. The patch in
this message modifies the arc LINK_SPEC so that when mcpu=nps400, the
arclinux_nps emulation is used by default.

The indentation of LINK_SPEC also seemed to be out of keeping with the
indentation in the rest of arc.h, so it is modified in this patch.

This is my first contribution to GCC, but I believe Embecosm has a
copyright assignment on file. As I don't have write access to GCC, if
this patch is approved, could someone apply it please (once the
corresponding binutils patch is approved and applied)?


Many thanks,
Graham Markall.


2016-12-12  Graham Markall  <graham.markall@embecosm.com>

	* config/arc/arc.h (LINK_SPEC): Use arclinux_nps emulation when
	mcpu=nps400.

---
 gcc/ChangeLog        |  5 +++++
 gcc/config/arc/arc.h | 21 +++++++++++----------
 2 files changed, 16 insertions(+), 10 deletions(-)
diff mbox

Patch

diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index f9512c4..188249a 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -114,16 +114,17 @@  extern const char *arc_cpu_to_as (int argc, const char **argv);
 /* Note that the default is to link against dynamic libraries, if they are
    available.  Override with -static.  */
 #define LINK_SPEC "%{h*} \
-		   %{static:-Bstatic} \
-		   %{symbolic:-Bsymbolic} \
-		   %{rdynamic:-export-dynamic}\
-		   -dynamic-linker /lib/ld-uClibc.so.0 \
-		   -X %{mbig-endian:-EB} \
-		   %{EB} %{EL} \
-		   %{marclinux*} \
-		   %{!marclinux*: %{pg|p|profile:-marclinux_prof;: -marclinux}} \
-		   %{!z:-z max-page-size=0x2000 -z common-page-size=0x2000} \
-		   %{shared:-shared}"
+   %{static:-Bstatic} \
+   %{symbolic:-Bsymbolic} \
+   %{rdynamic:-export-dynamic}\
+   -dynamic-linker /lib/ld-uClibc.so.0 \
+   -X %{mbig-endian:-EB} \
+   %{EB} %{EL} \
+   %{marclinux*} \
+   %{!marclinux*: %{pg|p|profile:-marclinux_prof; mcpu=nps400:-marclinux_nps; \
+   :-marclinux}} \
+   %{!z:-z max-page-size=0x2000 -z common-page-size=0x2000} \
+   %{shared:-shared}"
 #else
 #define LINK_SPEC "%{mbig-endian:-EB} %{EB} %{EL}\
   %{pg|p:-marcelf_prof;mA7|mARC700|mcpu=arc700|mcpu=ARC700: -marcelf}"