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

(-)emulators/qemu30/files/patch-configure (-6 / +56 lines)
Lines 1-4 Link Here
1
--- configure.orig	2019-04-14 21:25:18 UTC
1
--- configure.orig	2019-04-12 03:28:28 UTC
2
+++ configure
2
+++ configure
3
@@ -375,6 +375,7 @@ hax="no"
3
@@ -375,6 +375,7 @@ hax="no"
4
 hvf="no"
4
 hvf="no"
Lines 209-215 Link Here
209
         libusb="yes"
209
         libusb="yes"
210
         libusb_cflags=$($pkg_config --cflags libusb-1.0)
210
         libusb_cflags=$($pkg_config --cflags libusb-1.0)
211
         libusb_libs=$($pkg_config --libs libusb-1.0)
211
         libusb_libs=$($pkg_config --libs libusb-1.0)
212
@@ -5914,6 +6014,7 @@ echo "Audio drivers     $audio_drv_list"
212
@@ -5779,27 +5879,30 @@ if ( [ "$linux_user" = yes ] || [ "$bsd_user" = yes ] 
213
     cat > $TMPC <<EOF
214
     int main(void) { return 0; }
215
 EOF
216
-    textseg_ldflags="-Wl,-Ttext-segment=$textseg_addr"
217
+    textseg_ldflags="-Wl,--image-base=$textseg_addr"
218
     if ! compile_prog "" "$textseg_ldflags"; then
219
-      # In case ld does not support -Ttext-segment, edit the default linker
220
-      # script via sed to set the .text start addr.  This is needed on FreeBSD
221
-      # at least.
222
-      if ! $ld --verbose >/dev/null 2>&1; then
223
-        error_exit \
224
-            "We need to link the QEMU user mode binaries at a" \
225
-            "specific text address. Unfortunately your linker" \
226
-            "doesn't support either the -Ttext-segment option or" \
227
-            "printing the default linker script with --verbose." \
228
-            "If you don't want the user mode binaries, pass the" \
229
-            "--disable-user option to configure."
230
-      fi
231
+      textseg_ldflags="-Wl,-Ttext-segment=$textseg_addr"
232
+      if ! compile_prog "" "$textseg_ldflags"; then
233
+        # In case ld does not support -Ttext-segment, edit the default linker
234
+        # script via sed to set the .text start addr.  This is needed on FreeBSD
235
+        # at least.
236
+        if ! $ld --verbose >/dev/null 2>&1; then
237
+          error_exit \
238
+              "We need to link the QEMU user mode binaries at a" \
239
+              "specific text address. Unfortunately your linker" \
240
+              "doesn't support either the -Ttext-segment option or" \
241
+              "printing the default linker script with --verbose." \
242
+              "If you don't want the user mode binaries, pass the" \
243
+              "--disable-user option to configure."
244
+        fi
245
 
246
-      $ld --verbose | sed \
247
-        -e '1,/==================================================/d' \
248
-        -e '/==================================================/,$d' \
249
-        -e "s/[.] = [0-9a-fx]* [+] SIZEOF_HEADERS/. = $textseg_addr + SIZEOF_HEADERS/" \
250
-        -e "s/__executable_start = [0-9a-fx]*/__executable_start = $textseg_addr/" > config-host.ld
251
-      textseg_ldflags="-Wl,-T../config-host.ld"
252
+        $ld --verbose | sed \
253
+          -e '1,/==================================================/d' \
254
+          -e '/==================================================/,$d' \
255
+          -e "s/[.] = [0-9a-fx]* [+] SIZEOF_HEADERS/. = $textseg_addr + SIZEOF_HEADERS/" \
256
+          -e "s/__executable_start = [0-9a-fx]*/__executable_start = $textseg_addr/" > config-host.ld
257
+        textseg_ldflags="-Wl,-T../config-host.ld"
258
+      fi
259
     fi
260
   fi
261
 fi
262
@@ -5914,6 +6017,7 @@ echo "Audio drivers     $audio_drv_list"
213
 echo "Block whitelist (rw) $block_drv_rw_whitelist"
263
 echo "Block whitelist (rw) $block_drv_rw_whitelist"
214
 echo "Block whitelist (ro) $block_drv_ro_whitelist"
264
 echo "Block whitelist (ro) $block_drv_ro_whitelist"
215
 echo "VirtFS support    $virtfs"
265
 echo "VirtFS support    $virtfs"
Lines 217-223 Link Here
217
 echo "Multipath support $mpath"
267
 echo "Multipath support $mpath"
218
 echo "VNC support       $vnc"
268
 echo "VNC support       $vnc"
219
 if test "$vnc" = "yes" ; then
269
 if test "$vnc" = "yes" ; then
220
@@ -5949,6 +6050,7 @@ if test "$tcg" = "yes" ; then
270
@@ -5949,6 +6053,7 @@ if test "$tcg" = "yes" ; then
221
 fi
271
 fi
222
 echo "malloc trim support $malloc_trim"
272
 echo "malloc trim support $malloc_trim"
223
 echo "RDMA support      $rdma"
273
 echo "RDMA support      $rdma"
Lines 225-231 Link Here
225
 echo "fdt support       $fdt"
275
 echo "fdt support       $fdt"
226
 echo "membarrier        $membarrier"
276
 echo "membarrier        $membarrier"
227
 echo "preadv support    $preadv"
277
 echo "preadv support    $preadv"
228
@@ -6143,6 +6245,15 @@ fi
278
@@ -6143,6 +6248,15 @@ fi
229
 if test "$profiler" = "yes" ; then
279
 if test "$profiler" = "yes" ; then
230
   echo "CONFIG_PROFILER=y" >> $config_host_mak
280
   echo "CONFIG_PROFILER=y" >> $config_host_mak
231
 fi
281
 fi
Lines 241-247 Link Here
241
 if test "$slirp" = "yes" ; then
291
 if test "$slirp" = "yes" ; then
242
   echo "CONFIG_SLIRP=y" >> $config_host_mak
292
   echo "CONFIG_SLIRP=y" >> $config_host_mak
243
   echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
293
   echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
244
@@ -6384,6 +6495,9 @@ fi
294
@@ -6384,6 +6498,9 @@ fi
245
 if test "$have_fsxattr" = "yes" ; then
295
 if test "$have_fsxattr" = "yes" ; then
246
     echo "HAVE_FSXATTR=y" >> $config_host_mak
296
     echo "HAVE_FSXATTR=y" >> $config_host_mak
247
 fi
297
 fi
Lines 251-257 Link Here
251
 if test "$have_copy_file_range" = "yes" ; then
301
 if test "$have_copy_file_range" = "yes" ; then
252
     echo "HAVE_COPY_FILE_RANGE=y" >> $config_host_mak
302
     echo "HAVE_COPY_FILE_RANGE=y" >> $config_host_mak
253
 fi
303
 fi
254
@@ -6703,6 +6817,10 @@ echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_m
304
@@ -6703,6 +6820,10 @@ echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_m
255
 if test "$rdma" = "yes" ; then
305
 if test "$rdma" = "yes" ; then
256
   echo "CONFIG_RDMA=y" >> $config_host_mak
306
   echo "CONFIG_RDMA=y" >> $config_host_mak
257
   echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak
307
   echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak

Return to bug 244773