Here's a new port to get a modern GNU toolchain for x86_64. It successfully compiles a lightly tweaked openbsd-wip/net/ipxe and a revived sysutils/memtest86+. The port is based off devel/arm-none-eabi, with all the cruft removed. Someone could add an i386 FLAVOR it they care. I used the same gcc and binutils version as arm-none-eabi for no other reason than mere laziness.
The idea is that a dedicated GNU toolchain specialized for standalone
code should be more robust in the long run than fixing build/runtime
errors in niche software every time we update clang, lld, ports-gcc,
etc. That would be ipxe and sysutils/firmware/vmm.
Tarball attached. Thoughts? ok?
kn, fwiw below is the diff I used to build openbsd-wip/net/ipxe.
I haven't sorted out everything in sysutils/vmm yet.
diff --git net/ipxe/Makefile net/ipxe/Makefile
index bbd5e51f8..c34a13448 100644
--- net/ipxe/Makefile
+++ net/ipxe/Makefile
@@ -50,16 +50,10 @@ FLAVOR ?= # native build
.if empty(FLAVOR)
# FWIW, on amd64 'make IPXE_ARCH=i386' also built at one point.
IPXE_ARCH = ${MACHINE_ARCH:amd64=x86_64}
-COMPILER = ports-gcc
-COMPILER_LANGS = c
-# XXX WIP ld.bfd with elf-{arm64,i386,x86_64} target support added to binutils
-BUILD_DEPENDS = devel/binutils>=2.45.1p4 \
- devel/gas
-CROSS = g
-MAKE_FLAGS = CC=${CC} \
+BUILD_DEPENDS = devel/x86_64-elf/gcc
+CROSS = x86_64-none-elf-
+MAKE_FLAGS = \
SPG_TEST=false
-USE_LLD = No
-MAKE_FLAGS += LD=${LD}
.else
IPXE_ARCH = ${FLAVOR:aarch64=arm64:arm=arm32}
BUILD_DEPENDS = devel/arm-none-eabi/binutils,${FLAVOR} \
@@ -93,6 +87,7 @@ USE_GMAKE = Yes
MAKE_FLAGS += CROSS=${CROSS} \
HOST_CC=${CC} \
HOST_CFLAGS=${HOST_CFLAGS:Q} \
+ SPG_TEST=false \
V=1 \
VERSION=${VERSION:Q}
@@ -105,7 +100,8 @@ BUILD_DEPENDS += archivers/xz \
sysutils/mtools \
sysutils/truncate
# lzma.h
-HOST_CFLAGS += -I/usr/local/include
+HOST_CFLAGS += -I${LOCALBASE}/include \
+ -L${LOCALBASE}/lib
# util/genfsimg relies on mktemp(1).
MAKE_ENV = TMPDIR=${WRKDIR}
--
jca
x86_64-elf.tgz
Description: application/tar-gz
