Module Name: src
Committed By: maya
Date: Mon Apr 15 18:49:07 UTC 2019
Modified Files:
src/external/gpl3/gcc/dist/gcc/config/riscv: netbsd.h
Log Message:
Re-do previous:
emulate the addition of NETBSD_SUBTARGET_EXTRA_SPECS usually done by
SUBTARGET_EXTRA_SPECS (not used in risc-v) with EXTRA_SPECS.
Go back to using %(netbsd_link_spec) in our link spec, now that it's
a valid string.
Try to mimic other riscv OSes in our LINK_SPEC. they all start with
"-melf" XLEN_SPEC "lriscv" LD_EMUL_SUFFIX
and a definition of LD_EMUL_SUFFIX,
let's copy the LD_EMUL_SUFFIX linux uses.
Now we can link executables.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h:1.8 src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h:1.9
--- src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h:1.8 Mon Apr 15 14:19:20 2019
+++ src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h Mon Apr 15 18:49:07 2019
@@ -48,17 +48,20 @@ Boston, MA 02111-1307, USA. */
#undef LIB_SPEC
#define LIB_SPEC NETBSD_LIB_SPEC
-#undef LINK_SPEC
-#define LINK_SPEC NETBSD_LINK_SPEC_ELF
-/* Provide a LINK_SPEC appropriate for a NetBSD/mips target.
- This is a copy of LINK_SPEC from <netbsd-elf.h> tweaked for
- the MIPS target. */
+#define EXTRA_SPECS NETBSD_SUBTARGET_EXTRA_SPECS
+
+#define LD_EMUL_SUFFIX \
+ "%{mabi=lp64d:}" \
+ "%{mabi=lp64f:_lp64f}" \
+ "%{mabi=lp64:_lp64}" \
+ "%{mabi=ilp32d:}" \
+ "%{mabi=ilp32f:_ilp32f}" \
+ "%{mabi=ilp32:_ilp32}"
#undef LINK_SPEC
-#define LINK_SPEC \
- "%{m64:-m elf64lriscv} \
- %{m32:-m elf32lriscv}" \
- NETBSD_LINK_SPEC_ELF
+#define LINK_SPEC "\
+-melf" XLEN_SPEC "lriscv" LD_EMUL_SUFFIX " \
+%(netbsd_link_spec)"
#undef NETBSD_ENTRY_POINT
#define NETBSD_ENTRY_POINT "_start"