mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-06 13:45:42 +00:00
configure: Unnest detection of -z,relro and -z,now
There is nothing about these options that is related to PIE. Use them unconditionally. Backports commit e6cbd75158ea274ab98c13c9b73d2bc1d90aa50d from qemu
This commit is contained in:
parent
e546e24b83
commit
598083421b
9
qemu/configure
vendored
9
qemu/configure
vendored
|
@ -870,9 +870,6 @@ if test "$pie" != "no" ; then
|
||||||
QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
|
QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
|
||||||
LDFLAGS="-pie $LDFLAGS"
|
LDFLAGS="-pie $LDFLAGS"
|
||||||
pie="yes"
|
pie="yes"
|
||||||
if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then
|
|
||||||
LDFLAGS="-Wl,-z,relro -Wl,-z,now $LDFLAGS"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
if test "$pie" = "yes"; then
|
if test "$pie" = "yes"; then
|
||||||
error_exit "PIE not available due to missing toolchain support"
|
error_exit "PIE not available due to missing toolchain support"
|
||||||
|
@ -888,6 +885,12 @@ if test "$pie" != "no" ; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Detect support for PT_GNU_RELRO + DT_BIND_NOW.
|
||||||
|
# The combination is known as "full relro", because .got.plt is read-only too.
|
||||||
|
if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then
|
||||||
|
QEMU_LDFLAGS="-Wl,-z,relro -Wl,-z,now $QEMU_LDFLAGS"
|
||||||
|
fi
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# __sync_fetch_and_and requires at least -march=i486. Many toolchains
|
# __sync_fetch_and_and requires at least -march=i486. Many toolchains
|
||||||
# use i686 as default anyway, but for those that don't, an explicit
|
# use i686 as default anyway, but for those that don't, an explicit
|
||||||
|
|
Loading…
Reference in a new issue