add a patch from FreeBSD ports to allow -shared, needed for U-Boot build

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

ok sthen@ kevlo@
This commit is contained in:
jsg 2021-04-28 03:35:52 +00:00
parent 780cb8daad
commit 15676ae6ec
9 changed files with 86 additions and 38 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.1.1.1 2018/06/08 14:24:32 kevlo Exp $
# $OpenBSD: Makefile,v 1.2 2021/04/28 03:35:52 jsg Exp $
COMMENT= binutils for riscv-elf cross-development
V= 2.30
V= 2.31.1
DISTNAME= binutils-${V}
HOMEPAGE= https://www.gnu.org/software/binutils/

View File

@ -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

View File

@ -1,14 +1,14 @@
$OpenBSD: patch-bfd_doc_Makefile_in,v 1.1.1.1 2018/06/08 14:24:32 kevlo Exp $
$OpenBSD: patch-bfd_doc_Makefile_in,v 1.2 2021/04/28 03:35:52 jsg Exp $
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

View File

@ -1,14 +1,14 @@
$OpenBSD: patch-binutils_doc_Makefile_in,v 1.1.1.1 2018/06/08 14:24:32 kevlo Exp $
$OpenBSD: patch-binutils_doc_Makefile_in,v 1.2 2021/04/28 03:35:52 jsg Exp $
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

View File

@ -1,14 +1,14 @@
$OpenBSD: patch-gas_doc_Makefile_in,v 1.1.1.1 2018/06/08 14:24:32 kevlo Exp $
$OpenBSD: patch-gas_doc_Makefile_in,v 1.2 2021/04/28 03:35:52 jsg Exp $
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

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-gprof_Makefile_in,v 1.1.1.1 2018/06/08 14:24:32 kevlo Exp $
$OpenBSD: patch-gprof_Makefile_in,v 1.2 2021/04/28 03:35:52 jsg Exp $
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

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-ld_Makefile_in,v 1.1.1.1 2018/06/08 14:24:32 kevlo Exp $
$OpenBSD: patch-ld_Makefile_in,v 1.2 2021/04/28 03:35:52 jsg Exp $
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

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-ld_emulparams_elf32lriscv-defs_sh,v 1.1 2021/04/28 03:35:52 jsg Exp $
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)"

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2018/06/08 14:24:32 kevlo Exp $
@comment $OpenBSD: PLIST,v 1.2 2021/04/28 03:35:52 jsg Exp $
@bin bin/${CONFIG}-addr2line
@bin bin/${CONFIG}-ar
@bin bin/${CONFIG}-as
@ -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