From: Avi Kivity <avi@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Blue Swirl <blauwirbel@gmail.com>, Paul Moore <pmoore@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1.0 v4] configure: build position independent executables across the board, by default
Date: Tue, 15 Nov 2011 09:48:10 +0200 [thread overview]
Message-ID: <4EC2193A.7070702@redhat.com> (raw)
In-Reply-To: <CAFEAcA-MwbGy-hS3b_XnxpnTXtFmbDuiwDPXDmuN4ZDhjmMnUg@mail.gmail.com>
On 11/14/2011 06:03 PM, Peter Maydell wrote:
> On 14 November 2011 15:31, Avi Kivity <avi@redhat.com> 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
Ugh.
> > + 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".
Maybe I'm developing dyslexia.
> 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!
I'll disable PIE on static builds. So we'll be left with PIE enabled by
default on x86 dynamic builds, which ought to work, or I'll go crazy.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2011-11-15 7:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 15:31 [Qemu-devel] [PATCH 1.0 v4] configure: build position independent executables across the board, by default Avi Kivity
2011-11-14 16:03 ` Peter Maydell
2011-11-15 7:48 ` Avi Kivity [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EC2193A.7070702@redhat.com \
--to=avi@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=pmoore@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.