summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2020-07-31 16:43:37 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2020-07-31 16:43:37 +0000
commit8982d8a366942f739aab1b6057ae022165f4f793 (patch)
tree71295e9c570bd23061e627f3729b86a1eea95749
parent- Update to 2.4.0 (diff)
Enable -shared support for embedded RISC-V targets
Shared library support is incomplete for the RISC-V embedded elf targets, and was disabled some time ago [1]. However, it appears that it is functional enough to support basic usage, and is required to successfully build u-boot for RISC-V. This toolchain doesn't have widespread usage, so any risk of re-enabling this support is outweighed by the benefit of being able to build important ports like u-boot. Override this default. [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=be1dce26256aa9f6c7742e81c8c3db9eacff079d Reviewed by: philip Approved by: philip Differential Revision: https://reviews.freebsd.org/D25735
Notes
Notes: svn path=/head/; revision=543868
-rw-r--r--devel/binutils/Makefile2
-rw-r--r--devel/binutils/files/patch-ld_emulparams_elf32lriscv-defs.sh20
2 files changed, 21 insertions, 1 deletions
diff --git a/devel/binutils/Makefile b/devel/binutils/Makefile
index 4686f0b986f7..74a1bd5c33df 100644
--- a/devel/binutils/Makefile
+++ b/devel/binutils/Makefile
@@ -3,8 +3,8 @@
PORTNAME= binutils
PORTVERSION= 2.33.1
+PORTREVISION= 3
PORTEPOCH?= 1
-PORTREVISION= 2
CATEGORIES?= devel
MASTER_SITES= SOURCEWARE/binutils/releases
diff --git a/devel/binutils/files/patch-ld_emulparams_elf32lriscv-defs.sh b/devel/binutils/files/patch-ld_emulparams_elf32lriscv-defs.sh
new file mode 100644
index 000000000000..f29b68aac8df
--- /dev/null
+++ b/devel/binutils/files/patch-ld_emulparams_elf32lriscv-defs.sh
@@ -0,0 +1,20 @@
+--- ld/emulparams/elf32lriscv-defs.sh.orig 2020-02-03 18:09:14 UTC
++++ 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)"