Created attachment 212359 [details]
Fix emulators/qemu-devel build with lld 10.0.0
As reported in bug 244251, with clang and lld 10.0.0 the emulators/qemu-devel port fails in the configure stage:
===> Configuring for qemu-devel-4.2.0
ERROR: We need to link the QEMU user mode binaries at a
specific text address. Unfortunately your linker
doesn't support either the -Ttext-segment option or
printing the default linker script with --verbose.
If you don't want the user mode binaries, pass the
--disable-user option to configure.
===> Script "configure" failed unexpectedly.
Please report the problem to bofh@FreeBSD.org [maintainer] and attach the
the output of the failure of your make command. Also, it might be a good idea
to provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1
This is because lld 10.0.0 no longer supports the -Ttext-segment option, and uses --image-base for similar functionality.
I am proposing a patch that makes the configure script check for the --image-base option first, then the -Ttext-segment option.
A commit references this bug:
Date: Sun Mar 22 02:06:45 UTC 2020
New revision: 528890
emulators/qemu-devel: Fix build with lld 10.0.0
Submitted by: dim