On 14 November 2011 14:41, Avi Kivity <a...@redhat.com> wrote: > +if test "$pie" = "yes" ; then > + QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS" > + LDFLAGS="-Wl,-pie $LDFLAGS" > + cat > $TMPC << EOF > +int main(void) { return 0; } > +EOF > + if compile_prog "-fPIE -DPIE" "-Wl,-pie -Wl,-z,relro -Wl,-z,now"; then > + LDFLAGS="-Wl,-z,relro -Wl,-z,now $LDFLAGS" > + fi > +fi
It would be good to see some testing that this works on all our random oddball hosts (MacOSX, for instance, which doesn't use GNU ld) and architectures we apply this... -- PMM