aboutsummaryrefslogtreecommitdiff
path: root/emulators/qemu40
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2020-03-21 21:55:15 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2020-03-21 21:55:15 +0000
commitde31e97b605cb200e6ab8b4f2736411f90014732 (patch)
treeee3ffc556002ca289a4d426cfafa00884e0ef520 /emulators/qemu40
parent26da0dafa515c04fa9274f0913a22b4f6f9fcf87 (diff)
downloadports-de31e97b605cb200e6ab8b4f2736411f90014732.tar.gz
ports-de31e97b605cb200e6ab8b4f2736411f90014732.zip
emulators/qemu40: Fix build with lld 10.0.0
PR: 244775 Submitted by: dim
Notes
Notes: svn path=/head/; revision=528880
Diffstat (limited to 'emulators/qemu40')
-rw-r--r--emulators/qemu40/files/patch-configure58
1 files changed, 54 insertions, 4 deletions
diff --git a/emulators/qemu40/files/patch-configure b/emulators/qemu40/files/patch-configure
index c41037e2774c..c1222da4d086 100644
--- a/emulators/qemu40/files/patch-configure
+++ b/emulators/qemu40/files/patch-configure
@@ -1,4 +1,4 @@
---- configure.orig 2019-04-23 18:14:45 UTC
+--- configure.orig 2019-10-17 20:17:43 UTC
+++ configure
@@ -396,7 +396,7 @@ DSOSUF=".so"
LDFLAGS_SHARED="-shared"
@@ -127,7 +127,57 @@
##########################################
# check if we have open_by_handle_at
-@@ -6332,6 +6386,7 @@ echo "Audio drivers $audio_drv_list"
+@@ -6196,27 +6250,30 @@ if ( [ "$linux_user" = yes ] || [ "$bsd_user" = yes ]
+ cat > $TMPC <<EOF
+ int main(void) { return 0; }
+ EOF
+- textseg_ldflags="-Wl,-Ttext-segment=$textseg_addr"
++ textseg_ldflags="-Wl,--image-base=$textseg_addr"
+ if ! compile_prog "" "$textseg_ldflags"; then
+- # In case ld does not support -Ttext-segment, edit the default linker
+- # script via sed to set the .text start addr. This is needed on FreeBSD
+- # at least.
+- if ! $ld --verbose >/dev/null 2>&1; then
+- error_exit \
+- "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."
+- fi
++ textseg_ldflags="-Wl,-Ttext-segment=$textseg_addr"
++ if ! compile_prog "" "$textseg_ldflags"; then
++ # In case ld does not support -Ttext-segment, edit the default linker
++ # script via sed to set the .text start addr. This is needed on FreeBSD
++ # at least.
++ if ! $ld --verbose >/dev/null 2>&1; then
++ error_exit \
++ "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."
++ fi
+
+- $ld --verbose | sed \
+- -e '1,/==================================================/d' \
+- -e '/==================================================/,$d' \
+- -e "s/[.] = [0-9a-fx]* [+] SIZEOF_HEADERS/. = $textseg_addr + SIZEOF_HEADERS/" \
+- -e "s/__executable_start = [0-9a-fx]*/__executable_start = $textseg_addr/" > config-host.ld
+- textseg_ldflags="-Wl,-T../config-host.ld"
++ $ld --verbose | sed \
++ -e '1,/==================================================/d' \
++ -e '/==================================================/,$d' \
++ -e "s/[.] = [0-9a-fx]* [+] SIZEOF_HEADERS/. = $textseg_addr + SIZEOF_HEADERS/" \
++ -e "s/__executable_start = [0-9a-fx]*/__executable_start = $textseg_addr/" > config-host.ld
++ textseg_ldflags="-Wl,-T../config-host.ld"
++ fi
+ fi
+ fi
+ fi
+@@ -6332,6 +6389,7 @@ echo "Audio drivers $audio_drv_list"
echo "Block whitelist (rw) $block_drv_rw_whitelist"
echo "Block whitelist (ro) $block_drv_ro_whitelist"
echo "VirtFS support $virtfs"
@@ -135,7 +185,7 @@
echo "Multipath support $mpath"
echo "VNC support $vnc"
if test "$vnc" = "yes" ; then
-@@ -6565,6 +6620,15 @@ fi
+@@ -6565,6 +6623,15 @@ fi
if test "$profiler" = "yes" ; then
echo "CONFIG_PROFILER=y" >> $config_host_mak
fi
@@ -151,7 +201,7 @@
if test "$slirp" != "no"; then
echo "CONFIG_SLIRP=y" >> $config_host_mak
echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
-@@ -6812,6 +6876,9 @@ fi
+@@ -6812,6 +6879,9 @@ fi
# if this macro is set.
if test "$have_fsxattr" = "yes" ; then
echo "HAVE_FSXATTR=y" >> $config_host_mak