Add a patch from FreeBSD to allow -shared, needed for U-Boot build.

update to 2.31.1 to match arm-none-eabi/binutils

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/riscv-elf/binutils/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- Makefile    8 Jun 2018 14:24:32 -0000       1.1.1.1
+++ Makefile    27 Apr 2021 09:56:14 -0000
@@ -2,7 +2,7 @@
 
 COMMENT=       binutils for riscv-elf cross-development
 
-V=             2.30
+V=             2.31.1
 DISTNAME=      binutils-${V}
 
 HOMEPAGE=      https://www.gnu.org/software/binutils/
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/riscv-elf/binutils/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo    8 Jun 2018 14:24:32 -0000       1.1.1.1
+++ distinfo    27 Apr 2021 09:56:14 -0000
@@ -1,2 +1,2 @@
-SHA256 (binutils/binutils-2.30.tar.xz) = 
bka4rq4vcno28L2VBeQFdopyIY8XlvDQl1fUUgmHGuY=
-SIZE (binutils/binutils-2.30.tar.xz) = 20286700
+SHA256 (binutils/binutils-2.31.1.tar.xz) = 
XSAIbs9XUsx9kTQkbpWI+iAXQNVA9+uE15Wx96k7yoY=
+SIZE (binutils/binutils-2.31.1.tar.xz) = 20467996
Index: patches/patch-bfd_doc_Makefile_in
===================================================================
RCS file: 
/cvs/ports/devel/riscv-elf/binutils/patches/patch-bfd_doc_Makefile_in,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-bfd_doc_Makefile_in
--- patches/patch-bfd_doc_Makefile_in   8 Jun 2018 14:24:32 -0000       1.1.1.1
+++ patches/patch-bfd_doc_Makefile_in   27 Apr 2021 09:56:14 -0000
@@ -3,12 +3,12 @@ $OpenBSD: patch-bfd_doc_Makefile_in,v 1.
 Index: bfd/doc/Makefile.in
 --- bfd/doc/Makefile.in.orig
 +++ bfd/doc/Makefile.in
-@@ -104,7 +104,7 @@ CONFIG_CLEAN_VPATH_FILES =
- depcomp =
- am__depfiles_maybe =
- SOURCES =
+@@ -174,7 +174,7 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
+ am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
+ am__v_texidevnull_0 = > /dev/null
+ am__v_texidevnull_1 = 
 -INFO_DEPS = bfd.info
 +INFO_DEPS =
- TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
- am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
+ am__TEXINFO_TEX_DIR = $(srcdir)
  DVIS = bfd.dvi
+ PDFS = bfd.pdf
Index: patches/patch-binutils_doc_Makefile_in
===================================================================
RCS file: 
/cvs/ports/devel/riscv-elf/binutils/patches/patch-binutils_doc_Makefile_in,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-binutils_doc_Makefile_in
--- patches/patch-binutils_doc_Makefile_in      8 Jun 2018 14:24:32 -0000       
1.1.1.1
+++ patches/patch-binutils_doc_Makefile_in      27 Apr 2021 09:56:14 -0000
@@ -3,12 +3,12 @@ $OpenBSD: patch-binutils_doc_Makefile_in
 Index: binutils/doc/Makefile.in
 --- binutils/doc/Makefile.in.orig
 +++ binutils/doc/Makefile.in
-@@ -101,7 +101,7 @@ CONFIG_CLEAN_VPATH_FILES =
- depcomp =
- am__depfiles_maybe =
- SOURCES =
+@@ -177,7 +177,7 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
+ am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
+ am__v_texidevnull_0 = > /dev/null
+ am__v_texidevnull_1 = 
 -INFO_DEPS = binutils.info
-+INFO_DEPS = 
- TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
- am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
++INFO_DEPS =
+ am__TEXINFO_TEX_DIR = $(srcdir)
  DVIS = binutils.dvi
+ PDFS = binutils.pdf
Index: patches/patch-gas_doc_Makefile_in
===================================================================
RCS file: 
/cvs/ports/devel/riscv-elf/binutils/patches/patch-gas_doc_Makefile_in,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-gas_doc_Makefile_in
--- patches/patch-gas_doc_Makefile_in   8 Jun 2018 14:24:32 -0000       1.1.1.1
+++ patches/patch-gas_doc_Makefile_in   27 Apr 2021 09:56:14 -0000
@@ -3,12 +3,12 @@ $OpenBSD: patch-gas_doc_Makefile_in,v 1.
 Index: gas/doc/Makefile.in
 --- gas/doc/Makefile.in.orig
 +++ gas/doc/Makefile.in
-@@ -99,7 +99,7 @@ CONFIG_CLEAN_VPATH_FILES =
- depcomp =
- am__depfiles_maybe =
- SOURCES =
+@@ -174,7 +174,7 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
+ am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
+ am__v_texidevnull_0 = > /dev/null
+ am__v_texidevnull_1 = 
 -INFO_DEPS = as.info
 +INFO_DEPS =
- TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
- am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
+ TEXINFO_TEX = $(top_srcdir)/../texinfo.tex
+ am__TEXINFO_TEX_DIR = $(top_srcdir)/..
  DVIS = as.dvi
Index: patches/patch-gprof_Makefile_in
===================================================================
RCS file: /cvs/ports/devel/riscv-elf/binutils/patches/patch-gprof_Makefile_in,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-gprof_Makefile_in
--- patches/patch-gprof_Makefile_in     8 Jun 2018 14:24:32 -0000       1.1.1.1
+++ patches/patch-gprof_Makefile_in     27 Apr 2021 09:56:14 -0000
@@ -3,10 +3,10 @@ $OpenBSD: patch-gprof_Makefile_in,v 1.1.
 Index: gprof/Makefile.in
 --- gprof/Makefile.in.orig
 +++ gprof/Makefile.in
-@@ -130,7 +130,7 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOO
-       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-       $(LDFLAGS) -o $@
- SOURCES = $(gprof_SOURCES)
+@@ -216,7 +216,7 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
+ am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
+ am__v_texidevnull_0 = > /dev/null
+ am__v_texidevnull_1 = 
 -INFO_DEPS = gprof.info
 +INFO_DEPS =
  am__TEXINFO_TEX_DIR = $(srcdir)/../texinfo
Index: patches/patch-ld_Makefile_in
===================================================================
RCS file: /cvs/ports/devel/riscv-elf/binutils/patches/patch-ld_Makefile_in,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-ld_Makefile_in
--- patches/patch-ld_Makefile_in        8 Jun 2018 14:24:32 -0000       1.1.1.1
+++ patches/patch-ld_Makefile_in        27 Apr 2021 09:56:14 -0000
@@ -3,10 +3,10 @@ $OpenBSD: patch-ld_Makefile_in,v 1.1.1.1
 Index: ld/Makefile.in
 --- ld/Makefile.in.orig
 +++ ld/Makefile.in
-@@ -181,7 +181,7 @@ LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOO
- SOURCES = $(libldtestplug_la_SOURCES) $(libldtestplug2_la_SOURCES) \
-       $(libldtestplug3_la_SOURCES) $(libldtestplug4_la_SOURCES) \
-       $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
+@@ -273,7 +273,7 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
+ am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
+ am__v_texidevnull_0 = > /dev/null
+ am__v_texidevnull_1 = 
 -INFO_DEPS = ld.info
 +INFO_DEPS =
  am__TEXINFO_TEX_DIR = $(srcdir)/../texinfo
Index: patches/patch-ld_emulparams_elf32lriscv-defs_sh
===================================================================
RCS file: patches/patch-ld_emulparams_elf32lriscv-defs_sh
diff -N patches/patch-ld_emulparams_elf32lriscv-defs_sh
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-ld_emulparams_elf32lriscv-defs_sh     27 Apr 2021 09:56:14 
-0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+enable -shared for U-Boot
+
+Index: ld/emulparams/elf32lriscv-defs.sh
+--- ld/emulparams/elf32lriscv-defs.sh.orig
++++ ld/emulparams/elf32lriscv-defs.sh
+@@ -16,15 +16,8 @@ if test `echo "$host" | sed -e s/64//` = `echo "$targe
+   esac
+ fi
+ 
+-# Enable shared library support for everything except an embedded elf target.
+-case "$target" in
+-  riscv*-elf)
+-    ;;
+-  *)
+-    GENERATE_SHLIB_SCRIPT=yes
+-    GENERATE_PIE_SCRIPT=yes
+-    ;;
+-esac
++GENERATE_SHLIB_SCRIPT=yes
++GENERATE_PIE_SCRIPT=yes
+ 
+ TEXT_START_ADDR=0x10000
+ MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/riscv-elf/binutils/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- pkg/PLIST   8 Jun 2018 14:24:32 -0000       1.1.1.1
+++ pkg/PLIST   27 Apr 2021 09:56:14 -0000
@@ -23,7 +23,6 @@
 @man man/man1/${CONFIG}-elfedit.1
 @man man/man1/${CONFIG}-gprof.1
 @man man/man1/${CONFIG}-ld.1
-@man man/man1/${CONFIG}-nlmconv.1
 @man man/man1/${CONFIG}-nm.1
 @man man/man1/${CONFIG}-objcopy.1
 @man man/man1/${CONFIG}-objdump.1
@@ -52,9 +51,21 @@ ${CONFIG}/lib/ldscripts/elf32lriscv.x
 ${CONFIG}/lib/ldscripts/elf32lriscv.xbn
 ${CONFIG}/lib/ldscripts/elf32lriscv.xc
 ${CONFIG}/lib/ldscripts/elf32lriscv.xce
+${CONFIG}/lib/ldscripts/elf32lriscv.xd
+${CONFIG}/lib/ldscripts/elf32lriscv.xdc
+${CONFIG}/lib/ldscripts/elf32lriscv.xdce
+${CONFIG}/lib/ldscripts/elf32lriscv.xde
+${CONFIG}/lib/ldscripts/elf32lriscv.xdw
+${CONFIG}/lib/ldscripts/elf32lriscv.xdwe
 ${CONFIG}/lib/ldscripts/elf32lriscv.xe
 ${CONFIG}/lib/ldscripts/elf32lriscv.xn
 ${CONFIG}/lib/ldscripts/elf32lriscv.xr
+${CONFIG}/lib/ldscripts/elf32lriscv.xs
+${CONFIG}/lib/ldscripts/elf32lriscv.xsc
+${CONFIG}/lib/ldscripts/elf32lriscv.xsce
+${CONFIG}/lib/ldscripts/elf32lriscv.xse
+${CONFIG}/lib/ldscripts/elf32lriscv.xsw
+${CONFIG}/lib/ldscripts/elf32lriscv.xswe
 ${CONFIG}/lib/ldscripts/elf32lriscv.xu
 ${CONFIG}/lib/ldscripts/elf32lriscv.xw
 ${CONFIG}/lib/ldscripts/elf32lriscv.xwe
@@ -62,9 +73,21 @@ ${CONFIG}/lib/ldscripts/elf64lriscv.x
 ${CONFIG}/lib/ldscripts/elf64lriscv.xbn
 ${CONFIG}/lib/ldscripts/elf64lriscv.xc
 ${CONFIG}/lib/ldscripts/elf64lriscv.xce
+${CONFIG}/lib/ldscripts/elf64lriscv.xd
+${CONFIG}/lib/ldscripts/elf64lriscv.xdc
+${CONFIG}/lib/ldscripts/elf64lriscv.xdce
+${CONFIG}/lib/ldscripts/elf64lriscv.xde
+${CONFIG}/lib/ldscripts/elf64lriscv.xdw
+${CONFIG}/lib/ldscripts/elf64lriscv.xdwe
 ${CONFIG}/lib/ldscripts/elf64lriscv.xe
 ${CONFIG}/lib/ldscripts/elf64lriscv.xn
 ${CONFIG}/lib/ldscripts/elf64lriscv.xr
+${CONFIG}/lib/ldscripts/elf64lriscv.xs
+${CONFIG}/lib/ldscripts/elf64lriscv.xsc
+${CONFIG}/lib/ldscripts/elf64lriscv.xsce
+${CONFIG}/lib/ldscripts/elf64lriscv.xse
+${CONFIG}/lib/ldscripts/elf64lriscv.xsw
+${CONFIG}/lib/ldscripts/elf64lriscv.xswe
 ${CONFIG}/lib/ldscripts/elf64lriscv.xu
 ${CONFIG}/lib/ldscripts/elf64lriscv.xw
 ${CONFIG}/lib/ldscripts/elf64lriscv.xwe

Reply via email to