aboutsummaryrefslogtreecommitdiff
path: root/devel/binutils
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2019-01-21 13:23:11 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2019-01-21 13:23:11 +0000
commit0986612cbd7afe8c9d2d17bbcbf829a79fc26300 (patch)
tree4f7e0c6e42268d9e933f090debb6ddb3382e2adf /devel/binutils
parentd32899cde317ba59d45532b3997868ff0aca1c15 (diff)
downloadports-0986612cbd7afe8c9d2d17bbcbf829a79fc26300.tar.gz
ports-0986612cbd7afe8c9d2d17bbcbf829a79fc26300.zip
Add a patch to fix a problem where binutils is placing
unversion section symbols into share libraries Reported by: antoine, dim Obtained from: fedora
Notes
Notes: svn path=/head/; revision=490859
Diffstat (limited to 'devel/binutils')
-rw-r--r--devel/binutils/Makefile2
-rw-r--r--devel/binutils/files/binutils-do-not-provide-shared-section-symbols.patch25
2 files changed, 27 insertions, 0 deletions
diff --git a/devel/binutils/Makefile b/devel/binutils/Makefile
index a497e37fd92e..9ba834685ab0 100644
--- a/devel/binutils/Makefile
+++ b/devel/binutils/Makefile
@@ -3,6 +3,7 @@
PORTNAME= binutils
PORTVERSION= 2.31.1
+PORTREVISION= 1
PORTEPOCH?= 1
CATEGORIES?= devel
MASTER_SITES= SOURCEWARE/binutils/releases
@@ -13,6 +14,7 @@ COMMENT?= GNU binary tools
LICENSE= GPLv3 LGPL3
LICENSE_COMB= multi
+EXTRA_PATCHES= files/binutils-do-not-provide-shared-section-symbols.patch:-p1
.if !defined(CROSS_TOOLCHAIN)
BUILD_DEPENDS= ${LOCALBASE}/lib/libgmp.so:math/gmp \
${LOCALBASE}/lib/libmpfr.so:math/mpfr
diff --git a/devel/binutils/files/binutils-do-not-provide-shared-section-symbols.patch b/devel/binutils/files/binutils-do-not-provide-shared-section-symbols.patch
new file mode 100644
index 000000000000..02a735047950
--- /dev/null
+++ b/devel/binutils/files/binutils-do-not-provide-shared-section-symbols.patch
@@ -0,0 +1,25 @@
+diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
+index 444aef2942..8a3858d32b 100644
+--- a/ld/scripttempl/elf.sc
++++ b/ld/scripttempl/elf.sc
+@@ -637,9 +637,9 @@ cat <<EOF
+ ${SDATA_GOT+${OTHER_GOT_SECTIONS}}
+ ${DATA_SDATA-${SDATA}}
+ ${DATA_SDATA-${OTHER_SDATA_SECTIONS}}
+- ${RELOCATING+${DATA_END_SYMBOLS-${CREATE_SHLIB+PROVIDE (}${USER_LABEL_PREFIX}_edata = .${CREATE_SHLIB+)}; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
++ ${RELOCATING+${DATA_END_SYMBOLS-${USER_LABEL_PREFIX}_edata = .; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
+ ${RELOCATING+. = .;}
+- ${RELOCATING+${CREATE_SHLIB+PROVIDE (}${USER_LABEL_PREFIX}__bss_start = .${CREATE_SHLIB+)};}
++ ${RELOCATING+${USER_LABEL_PREFIX}__bss_start = .;}
+ ${RELOCATING+${OTHER_BSS_SYMBOLS}}
+ ${DATA_SDATA-${SBSS}}
+ ${BSS_PLT+${PLT}}
+@@ -672,7 +672,7 @@ cat <<EOF
+ ${LARGE_BSS_AFTER_BSS-${LARGE_BSS}}
+ ${RELOCATING+. = ALIGN(${ALIGNMENT});}
+ ${RELOCATING+${OTHER_END_SYMBOLS}}
+- ${RELOCATING+${END_SYMBOLS-${CREATE_SHLIB+PROVIDE (}${USER_LABEL_PREFIX}_end = .${CREATE_SHLIB+)}; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
++ ${RELOCATING+${END_SYMBOLS-${USER_LABEL_PREFIX}_end = .; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
+ ${RELOCATING+${DATA_SEGMENT_END}}
+ ${TINY_DATA_SECTION}
+ ${TINY_BSS_SECTION}