qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1.0 v4] configure: build position independent ex


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 1.0 v4] configure: build position independent executables across the board, by default
Date: Mon, 14 Nov 2011 16:03:20 +0000

On 14 November 2011 15:31, Avi Kivity <address@hidden> wrote:
> @@ -1099,6 +1099,22 @@ for flag in $gcc_flags; do
>     fi
>  done
>
> +if test "$pie" = "yes" ; then
> +  cat > $TMPC << EOF
> +int main(void) { return 0; }
> +EOF
> +  if compile_prog "-fPIE -dPIE" "-Wl,-pie"; then

Surely "-DPIE" ?
gcc complains in the config.log:
cc1: warning: unrecognized gcc debugging option: E

> +    QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
> +    LDFLAGS="-Wl,-pie $LDFLAGS"
> +    if compile_prog "-fPIE -DPIE" "-Wl,-pie -Wl,-z,relro -Wl,-z,now"; then
> +      LDFLAGS="-Wl,-z,relro -Wl,-z,now $LDFLAGS"
> +    fi
> +  else
> +    echo "Diabling PIE due missing toolchain support"

"Disabling". "due to".

Something in this patch is causing problems if you configure
with --target-list=arm-linux-user --static. configure complains:
./configure: 1159: /tmp/qemu-conf--25989-.exe: not found

because something about how we've built the test executable for
the endianness test means it compiled successfully but won't
run:
cam-vm-266:maverick:qemu$ file /tmp/qemu-conf--25297-.exe
/tmp/qemu-conf--25297-.exe: ELF 32-bit LSB shared object, Intel 80386,
version 1 (GNU/Linux), dynamically linked (uses shared libs), for
GNU/Linux 2.6.15, not stripped
cam-vm-266:maverick:qemu$ ldd /tmp/qemu-conf--25297-.exe
        statically linked
cam-vm-266:maverick:qemu$ /tmp/qemu-conf--25297-.exe
-bash: /tmp/qemu-conf--25297-.exe: No such file or directory

If you let it go ahead and build the whole arm-linux-user/qemu-arm
binary then that has the same problem: it won't run.

...and this is all just on x86-32 hosts!

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]