View | Details | Raw Unified | Return to bug 244770
Collapse All | Expand All

(-)emulators/qemu/files/patch-configure (-13 / +63 lines)
Lines 1-6 Link Here
1
--- configure.orig	2019-04-23 18:14:45 UTC
1
--- configure.orig	2019-11-14 18:06:20 UTC
2
+++ configure
2
+++ configure
3
@@ -396,7 +396,7 @@ DSOSUF=".so"
3
@@ -404,7 +404,7 @@ DSOSUF=".so"
4
 LDFLAGS_SHARED="-shared"
4
 LDFLAGS_SHARED="-shared"
5
 modules="no"
5
 modules="no"
6
 prefix="/usr/local"
6
 prefix="/usr/local"
Lines 9-15 Link Here
9
 datadir="\${prefix}/share"
9
 datadir="\${prefix}/share"
10
 firmwarepath="\${prefix}/share/qemu-firmware"
10
 firmwarepath="\${prefix}/share/qemu-firmware"
11
 qemu_docdir="\${prefix}/share/doc/qemu"
11
 qemu_docdir="\${prefix}/share/doc/qemu"
12
@@ -476,6 +476,9 @@ numa=""
12
@@ -484,6 +484,9 @@ numa=""
13
 tcmalloc="no"
13
 tcmalloc="no"
14
 jemalloc="no"
14
 jemalloc="no"
15
 replication="yes"
15
 replication="yes"
Lines 19-25 Link Here
19
 vxhs=""
19
 vxhs=""
20
 bochs="yes"
20
 bochs="yes"
21
 cloop="yes"
21
 cloop="yes"
22
@@ -1118,6 +1121,10 @@ for opt do
22
@@ -1141,6 +1144,10 @@ for opt do
23
   ;;
23
   ;;
24
   --enable-vnc-png) vnc_png="yes"
24
   --enable-vnc-png) vnc_png="yes"
25
   ;;
25
   ;;
Lines 29-36 Link Here
29
+  ;;
29
+  ;;
30
   --disable-slirp) slirp="no"
30
   --disable-slirp) slirp="no"
31
   ;;
31
   ;;
32
   --enable-slirp=system) slirp="system"
32
   --enable-slirp=git) slirp="git"
33
@@ -2972,6 +2979,14 @@ if ! check_include "ifaddrs.h" ; then
33
@@ -2998,6 +3005,14 @@ if ! check_include "ifaddrs.h" ; then
34
 fi
34
 fi
35
 
35
 
36
 ##########################################
36
 ##########################################
Lines 45-51 Link Here
45
 # VTE probe
45
 # VTE probe
46
 
46
 
47
 if test "$vte" != "no"; then
47
 if test "$vte" != "no"; then
48
@@ -3629,7 +3644,7 @@ for i in $glib_modules; do
48
@@ -3655,7 +3670,7 @@ for i in $glib_modules; do
49
         glib_libs=$($pkg_config --libs $i)
49
         glib_libs=$($pkg_config --libs $i)
50
         QEMU_CFLAGS="$glib_cflags $QEMU_CFLAGS"
50
         QEMU_CFLAGS="$glib_cflags $QEMU_CFLAGS"
51
         LIBS="$glib_libs $LIBS"
51
         LIBS="$glib_libs $LIBS"
Lines 54-60 Link Here
54
     else
54
     else
55
         error_exit "glib-$glib_req_ver $i is required to compile QEMU"
55
         error_exit "glib-$glib_req_ver $i is required to compile QEMU"
56
     fi
56
     fi
57
@@ -4723,11 +4738,6 @@ has_sphinx_build() {
57
@@ -4747,11 +4762,6 @@ has_sphinx_build() {
58
 if test "$docs" != "no" ; then
58
 if test "$docs" != "no" ; then
59
   if has makeinfo && has pod2man && has_sphinx_build; then
59
   if has makeinfo && has pod2man && has_sphinx_build; then
60
     docs=yes
60
     docs=yes
Lines 66-72 Link Here
66
   fi
66
   fi
67
 fi
67
 fi
68
 
68
 
69
@@ -4861,7 +4871,7 @@ fi
69
@@ -4885,7 +4895,7 @@ fi
70
 
70
 
71
 # check for libusb
71
 # check for libusb
72
 if test "$libusb" != "no" ; then
72
 if test "$libusb" != "no" ; then
Lines 75-81 Link Here
75
         libusb="yes"
75
         libusb="yes"
76
         libusb_cflags=$($pkg_config --cflags libusb-1.0)
76
         libusb_cflags=$($pkg_config --cflags libusb-1.0)
77
         libusb_libs=$($pkg_config --libs libusb-1.0)
77
         libusb_libs=$($pkg_config --libs libusb-1.0)
78
@@ -5251,7 +5261,51 @@ if test "$debug_stack_usage" = "yes"; then
78
@@ -5275,7 +5285,51 @@ if test "$debug_stack_usage" = "yes"; then
79
   fi
79
   fi
80
 fi
80
 fi
81
 
81
 
Lines 127-133 Link Here
127
 ##########################################
127
 ##########################################
128
 # check if we have open_by_handle_at
128
 # check if we have open_by_handle_at
129
 
129
 
130
@@ -6332,6 +6386,7 @@ echo "Audio drivers     $audio_drv_list"
130
@@ -6241,27 +6295,30 @@ if ( [ "$linux_user" = yes ] || [ "$bsd_user" = yes ] 
131
     cat > $TMPC <<EOF
132
     int main(void) { return 0; }
133
 EOF
134
-    textseg_ldflags="-Wl,-Ttext-segment=$textseg_addr"
135
+    textseg_ldflags="-Wl,--image-base=$textseg_addr"
136
     if ! compile_prog "" "$textseg_ldflags"; then
137
-      # In case ld does not support -Ttext-segment, edit the default linker
138
-      # script via sed to set the .text start addr.  This is needed on FreeBSD
139
-      # at least.
140
-      if ! $ld --verbose >/dev/null 2>&1; then
141
-        error_exit \
142
-            "We need to link the QEMU user mode binaries at a" \
143
-            "specific text address. Unfortunately your linker" \
144
-            "doesn't support either the -Ttext-segment option or" \
145
-            "printing the default linker script with --verbose." \
146
-            "If you don't want the user mode binaries, pass the" \
147
-            "--disable-user option to configure."
148
-      fi
149
+      textseg_ldflags="-Wl,-Ttext-segment=$textseg_addr"
150
+      if ! compile_prog "" "$textseg_ldflags"; then
151
+	# In case ld does not support -Ttext-segment, edit the default linker
152
+	# script via sed to set the .text start addr.  This is needed on FreeBSD
153
+	# at least.
154
+	if ! $ld --verbose >/dev/null 2>&1; then
155
+	  error_exit \
156
+	      "We need to link the QEMU user mode binaries at a" \
157
+	      "specific text address. Unfortunately your linker" \
158
+	      "doesn't support either the -Ttext-segment option or" \
159
+	      "printing the default linker script with --verbose." \
160
+	      "If you don't want the user mode binaries, pass the" \
161
+	      "--disable-user option to configure."
162
+	fi
163
 
164
-      $ld --verbose | sed \
165
-        -e '1,/==================================================/d' \
166
-        -e '/==================================================/,$d' \
167
-        -e "s/[.] = [0-9a-fx]* [+] SIZEOF_HEADERS/. = $textseg_addr + SIZEOF_HEADERS/" \
168
-        -e "s/__executable_start = [0-9a-fx]*/__executable_start = $textseg_addr/" > config-host.ld
169
-      textseg_ldflags="-Wl,-T../config-host.ld"
170
+	$ld --verbose | sed \
171
+	  -e '1,/==================================================/d' \
172
+	  -e '/==================================================/,$d' \
173
+	  -e "s/[.] = [0-9a-fx]* [+] SIZEOF_HEADERS/. = $textseg_addr + SIZEOF_HEADERS/" \
174
+	  -e "s/__executable_start = [0-9a-fx]*/__executable_start = $textseg_addr/" > config-host.ld
175
+	textseg_ldflags="-Wl,-T../config-host.ld"
176
+      fi
177
     fi
178
   fi
179
 fi
180
@@ -6377,6 +6434,7 @@ echo "Audio drivers     $audio_drv_list"
131
 echo "Block whitelist (rw) $block_drv_rw_whitelist"
181
 echo "Block whitelist (rw) $block_drv_rw_whitelist"
132
 echo "Block whitelist (ro) $block_drv_ro_whitelist"
182
 echo "Block whitelist (ro) $block_drv_ro_whitelist"
133
 echo "VirtFS support    $virtfs"
183
 echo "VirtFS support    $virtfs"
Lines 135-141 Link Here
135
 echo "Multipath support $mpath"
185
 echo "Multipath support $mpath"
136
 echo "VNC support       $vnc"
186
 echo "VNC support       $vnc"
137
 if test "$vnc" = "yes" ; then
187
 if test "$vnc" = "yes" ; then
138
@@ -6565,6 +6620,15 @@ fi
188
@@ -6617,6 +6675,15 @@ fi
139
 if test "$profiler" = "yes" ; then
189
 if test "$profiler" = "yes" ; then
140
   echo "CONFIG_PROFILER=y" >> $config_host_mak
190
   echo "CONFIG_PROFILER=y" >> $config_host_mak
141
 fi
191
 fi
Lines 151-157 Link Here
151
 if test "$slirp" != "no"; then
201
 if test "$slirp" != "no"; then
152
   echo "CONFIG_SLIRP=y" >> $config_host_mak
202
   echo "CONFIG_SLIRP=y" >> $config_host_mak
153
   echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
203
   echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
154
@@ -6812,6 +6876,9 @@ fi
204
@@ -6864,6 +6931,9 @@ fi
155
 # if this macro is set.
205
 # if this macro is set.
156
 if test "$have_fsxattr" = "yes" ; then
206
 if test "$have_fsxattr" = "yes" ; then
157
     echo "HAVE_FSXATTR=y" >> $config_host_mak
207
     echo "HAVE_FSXATTR=y" >> $config_host_mak

Return to bug 244770