Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/binutils - use the same set of emulations for ...



details:   https://anonhg.NetBSD.org/src/rev/0a7ae1cb9cd8
branches:  trunk
changeset: 840806:0a7ae1cb9cd8
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Apr 18 10:07:24 2019 +0000

description:
- use the same set of emulations for riscv* on netbsd as linux does
- for riscv64-*netbsd* hosts and 32 bit target, set LIB_PATH
- build the other target emulations for riscv32 on riscv64
- regen riscv64 mknative for ld updates

diffstat:

 external/gpl3/binutils/dist/ld/configure.tgt                    |   6 +++-
 external/gpl3/binutils/dist/ld/emulparams/elf32lriscv.sh        |   9 +++++++
 external/gpl3/binutils/dist/ld/emulparams/elf32lriscv_ilp32.sh  |   9 +++++++
 external/gpl3/binutils/dist/ld/emulparams/elf32lriscv_ilp32f.sh |   9 +++++++
 external/gpl3/binutils/usr.bin/ld/Makefile                      |   3 +-
 external/gpl3/binutils/usr.bin/ld/arch/riscv64/defs.mk          |   4 +-
 external/gpl3/binutils/usr.bin/ld/arch/riscv64/ldemul-list.h    |  12 ++++++++-
 7 files changed, 45 insertions(+), 7 deletions(-)

diffs (131 lines):

diff -r e0a89c781a38 -r 0a7ae1cb9cd8 external/gpl3/binutils/dist/ld/configure.tgt
--- a/external/gpl3/binutils/dist/ld/configure.tgt      Thu Apr 18 10:07:07 2019 +0000
+++ b/external/gpl3/binutils/dist/ld/configure.tgt      Thu Apr 18 10:07:24 2019 +0000
@@ -669,14 +669,16 @@
 powerpc-*-windiss*)    targ_emul=elf32ppcwindiss ;;
 powerpc-*-lynxos*)     targ_emul=ppclynx ;;
 pru*-*-*)              targ_emul=pruelf ;;
-riscv32*-*-linux*)     targ_emul=elf32lriscv
+riscv32*-*-linux* | riscv-*-netbsd* | riscv32*-*-netbsd*)
+                       targ_emul=elf32lriscv
                        targ_extra_emuls="elf32lriscv_ilp32f elf32lriscv_ilp32 elf64lriscv elf64lriscv_lp64f elf64lriscv_lp64"
                        targ_extra_libpath=$targ_extra_emuls ;;
 riscv-*-* | riscv32*-*-*)
                        targ_emul=elf32lriscv
                        targ_extra_emuls="elf64lriscv"
                        targ_extra_libpath=$targ_extra_emuls ;;
-riscv64*-*-linux*)     targ_emul=elf64lriscv
+riscv64*-*-linux* | riscv64*-*-netbsd*)
+                       targ_emul=elf64lriscv
                        targ_extra_emuls="elf64lriscv_lp64f elf64lriscv_lp64 elf32lriscv elf32lriscv_ilp32f elf32lriscv_ilp32"
                        targ_extra_libpath=$targ_extra_emuls ;;
 riscv64*-*-*)          targ_emul=elf64lriscv
diff -r e0a89c781a38 -r 0a7ae1cb9cd8 external/gpl3/binutils/dist/ld/emulparams/elf32lriscv.sh
--- a/external/gpl3/binutils/dist/ld/emulparams/elf32lriscv.sh  Thu Apr 18 10:07:07 2019 +0000
+++ b/external/gpl3/binutils/dist/ld/emulparams/elf32lriscv.sh  Thu Apr 18 10:07:24 2019 +0000
@@ -12,4 +12,13 @@
        LIBPATH_SUFFIX="/ilp32d" ;;
     esac
     ;;
+  # NetBSD puts IPL32 libraries in rv32 subdirectory.
+  # XXX d vs f vs ""
+  riscv64-*-netbsd*)
+    case "$EMULATION_NAME" in
+      *32*)
+       LIB_PATH='=/usr/lib/rv32'
+       ;;
+    esac
+    ;;
 esac
diff -r e0a89c781a38 -r 0a7ae1cb9cd8 external/gpl3/binutils/dist/ld/emulparams/elf32lriscv_ilp32.sh
--- a/external/gpl3/binutils/dist/ld/emulparams/elf32lriscv_ilp32.sh    Thu Apr 18 10:07:07 2019 +0000
+++ b/external/gpl3/binutils/dist/ld/emulparams/elf32lriscv_ilp32.sh    Thu Apr 18 10:07:24 2019 +0000
@@ -11,4 +11,13 @@
        LIBPATH_SUFFIX="/ilp32" ;;
     esac
     ;;
+  # NetBSD puts IPL32 libraries in rv32 subdirectory.
+  # XXX d vs f vs ""
+  riscv64-*-netbsd*)
+    case "$EMULATION_NAME" in
+      *32*)
+       LIB_PATH='=/usr/lib/rv32'
+       ;;
+    esac
+    ;;
 esac
diff -r e0a89c781a38 -r 0a7ae1cb9cd8 external/gpl3/binutils/dist/ld/emulparams/elf32lriscv_ilp32f.sh
--- a/external/gpl3/binutils/dist/ld/emulparams/elf32lriscv_ilp32f.sh   Thu Apr 18 10:07:07 2019 +0000
+++ b/external/gpl3/binutils/dist/ld/emulparams/elf32lriscv_ilp32f.sh   Thu Apr 18 10:07:24 2019 +0000
@@ -11,4 +11,13 @@
        LIBPATH_SUFFIX="/ilp32f" ;;
     esac
     ;;
+  # NetBSD puts IPL32 libraries in rv32 subdirectory.
+  # XXX d vs f vs ""
+  riscv64-*-netbsd*)
+    case "$EMULATION_NAME" in
+      *32*)
+       LIB_PATH='=/usr/lib/rv32'
+       ;;
+    esac
+    ;;
 esac
diff -r e0a89c781a38 -r 0a7ae1cb9cd8 external/gpl3/binutils/usr.bin/ld/Makefile
--- a/external/gpl3/binutils/usr.bin/ld/Makefile        Thu Apr 18 10:07:07 2019 +0000
+++ b/external/gpl3/binutils/usr.bin/ld/Makefile        Thu Apr 18 10:07:24 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.30 2019/02/25 19:55:35 joerg Exp $
+#      $NetBSD: Makefile,v 1.31 2019/04/18 10:07:24 mrg Exp $
 
 CPPFLAGS+=     -I${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH} \
                -I${DIST}/ld \
@@ -74,6 +74,7 @@
 
 . if ${BINUTILS_MACHINE_ARCH} == "x86_64" || \
     ${BINUTILS_MACHINE_ARCH} == "sparc64" || \
+    ${BINUTILS_MACHINE_ARCH} == "riscv64" || \
     !empty(BINUTILS_MACHINE_ARCH:Maarch64*) || \
     !empty(BINUTILS_MACHINE_ARCH:Mearm*) || \
     !empty(BINUTILS_MACHINE_ARCH:Marm*) || \
diff -r e0a89c781a38 -r 0a7ae1cb9cd8 external/gpl3/binutils/usr.bin/ld/arch/riscv64/defs.mk
--- a/external/gpl3/binutils/usr.bin/ld/arch/riscv64/defs.mk    Thu Apr 18 10:07:07 2019 +0000
+++ b/external/gpl3/binutils/usr.bin/ld/arch/riscv64/defs.mk    Thu Apr 18 10:07:24 2019 +0000
@@ -4,9 +4,9 @@
 #
 G_DEFS=-DHAVE_CONFIG_H
 G_EMUL=elf64lriscv
-G_EMULATION_OFILES=eelf64lriscv.o eelf32lriscv.o
+G_EMULATION_OFILES=eelf64lriscv.o eelf64lriscv_lp64f.o eelf64lriscv_lp64.o eelf32lriscv.o eelf32lriscv_ilp32f.o eelf32lriscv_ilp32.o
 G_INCLUDES=
-G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o  mri.o ldctor.o ldmain.o plugin.o  ldwrite.o ldexp.o  ldemul.o ldver.o ldmisc.o  ldfile.o ldcref.o eelf64lriscv.o eelf32lriscv.o   ldbuildid.o
+G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o  mri.o ldctor.o ldmain.o plugin.o  ldwrite.o ldexp.o  ldemul.o ldver.o ldmisc.o  ldfile.o ldcref.o eelf64lriscv.o eelf64lriscv_lp64f.o 
eelf64lriscv_lp64.o eelf32lriscv.o eelf32lriscv_ilp32f.o eelf32lriscv_ilp32.o   ldbuildid.o
 G_STRINGIFY=astring.sed
 G_TEXINFOS=ld.texi
 G_target_alias=riscv64--netbsd
diff -r e0a89c781a38 -r 0a7ae1cb9cd8 external/gpl3/binutils/usr.bin/ld/arch/riscv64/ldemul-list.h
--- a/external/gpl3/binutils/usr.bin/ld/arch/riscv64/ldemul-list.h      Thu Apr 18 10:07:07 2019 +0000
+++ b/external/gpl3/binutils/usr.bin/ld/arch/riscv64/ldemul-list.h      Thu Apr 18 10:07:24 2019 +0000
@@ -1,12 +1,20 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp  */
-/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp  */
+/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp  */
+/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 /* This file is automatically generated.  DO NOT EDIT! */
 extern ld_emulation_xfer_type ld_elf64lriscv_emulation;
+extern ld_emulation_xfer_type ld_elf64lriscv_lp64f_emulation;
+extern ld_emulation_xfer_type ld_elf64lriscv_lp64_emulation;
 extern ld_emulation_xfer_type ld_elf32lriscv_emulation;
+extern ld_emulation_xfer_type ld_elf32lriscv_ilp32f_emulation;
+extern ld_emulation_xfer_type ld_elf32lriscv_ilp32_emulation;
 
 #define EMULATION_LIST \
   &ld_elf64lriscv_emulation, \
+  &ld_elf64lriscv_lp64f_emulation, \
+  &ld_elf64lriscv_lp64_emulation, \
   &ld_elf32lriscv_emulation, \
+  &ld_elf32lriscv_ilp32f_emulation, \
+  &ld_elf32lriscv_ilp32_emulation, \
   0



Home | Main Index | Thread Index | Old Index