diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -240,6 +240,11 @@ supported_target() { return 1 } + +ld_has() { + $ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1 +} + # default parameters source_path=$(dirname "$0") cpu="" @@ -5043,7 +5048,7 @@ fi # Use ASLR, no-SEH and DEP if available if test "$mingw32" = "yes" ; then for flag in --dynamicbase --no-seh --nxcompat; do - if $ld --help 2>/dev/null | grep ".$flag" >/dev/null 2>/dev/null ; then + if ld_has $flag ; then LDFLAGS="-Wl,$flag $LDFLAGS" fi done @@ -6522,6 +6527,20 @@ if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then ldflags="$ldflags $textseg_ldflags" fi +# Newer kernels on s390 check for an S390_PGSTE program header and +# enable the pgste page table extensions in that case. This makes +# the vm.allocate_pgste sysctl unnecessary. We enable this program +# header if +# - we build on s390x +# - we build the system emulation for s390x (qemu-system-s390x) +# - KVM is enabled +# - the linker supports --s390-pgste +if test "$TARGET_ARCH" = "s390x" -a "$target_softmmu" = "yes" -a "$ARCH" = "s390x" -a "$kvm" = "yes"; then + if ld_has --s390-pgste ; then + ldflags="-Wl,--s390-pgste $ldflags" + fi +fi + echo "LDFLAGS+=$ldflags" >> $config_target_mak echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak |