Download raw body.
binutils: enable ld.bfd ?
20.11.2025 11:37, Klemens Nanni пишет:
> net/ipxe in openbsd-wip seems to require the GNU linker.
>
> 2.17 from base just segfaults (certainly too old) and ld.lld(1) complains
> differently, depending on what/how I build stuff:
>
> - ld: error: section .text file range overlaps with .shstrtab
> - ld: error: output file too large: 18446744073709485768 bytes
>
> When using gld built with the diff below, ipxe.efi links fine.
>
>
> Is there a reason disable it?
If yes, would a FLAVOR (that is not hooked up) and/or enabling it
only for amd64 and arm64 (none other needed, atm) be acceptable?
Rebased diff, now with the required arm64 patch.
This builds on i386, octeon and amd64, arm64.
Yields working iPXE images on amd64 and arm64.
Feedback?
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/binutils/Makefile,v
diff -u -p -r1.23 Makefile
--- Makefile 29 Nov 2025 18:11:04 -0000 1.23
+++ Makefile 29 Nov 2025 20:08:39 -0000
@@ -3,7 +3,7 @@ COMMENT = GNU binary utilities
# keep version synchronized with devel/gas
V = 2.45.1
DISTNAME = binutils-${V}
-REVISION = 0
+REVISION = 1
CATEGORIES = devel
@@ -28,7 +28,6 @@ CONFIGURE_STYLE = gnu
CONFIGURE_ARGS += --disable-gas \
--disable-gprof \
- --disable-ld \
--disable-libctf \
--disable-nls \
--disable-install-libbfd \
Index: patches/patch-ld_configure_tgt
===================================================================
RCS file: patches/patch-ld_configure_tgt
diff -N patches/patch-ld_configure_tgt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-ld_configure_tgt 29 Nov 2025 20:08:25 -0000
@@ -0,0 +1,15 @@
+recognise arm64
+
+Index: ld/configure.tgt
+--- ld/configure.tgt.orig
++++ ld/configure.tgt
+@@ -98,6 +98,9 @@ aarch64-*-freebsd*) targ_emul=aarch64fbsd
+ aarch64-*-fuchsia*) targ_emul=aarch64elf
+ targ_extra_emuls="aarch64elfb armelf armelfb"
+ ;;
++aarch64-*-openbsd*) targ_emul=aarch64obsd
++ targ_extra_emuls="aarch64obsdb aarch64elf"
++ ;;
+ aarch64_be-*-linux-gnu_ilp32)
+ targ_emul=aarch64linux32b
+ targ_extra_libpath="aarch64linuxb aarch64linux aarch64linux32 armelfb_linux_eabi armelf_linux_eabi"
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/binutils/pkg/PLIST,v
diff -u -p -r1.4 PLIST
--- pkg/PLIST 24 Sep 2025 17:03:55 -0000 1.4
+++ pkg/PLIST 29 Nov 2025 20:09:03 -0000
@@ -3,6 +3,8 @@
@bin bin/gar
@bin bin/gc++filt
@bin bin/gelfedit
+@bin bin/gld
+@bin bin/gld.bfd
@bin bin/gnm
@bin bin/gobjcopy
@bin bin/gobjdump
@@ -12,12 +14,17 @@
@bin bin/gstrings
@bin bin/gstrip
@info info/binutils.info
+@info info/ld.info
+@info info/ldint.info
@info info/sframe-spec.info
+lib/bfd-plugins/
+@so lib/bfd-plugins/libdep.so
@man man/man1/gaddr2line.1
@man man/man1/gar.1
@man man/man1/gc++filt.1
@comment @man man/man1/gdlltool.1
@man man/man1/gelfedit.1
+@man man/man1/gld.1
@man man/man1/gnm.1
@man man/man1/gobjcopy.1
@man man/man1/gobjdump.1
binutils: enable ld.bfd ?