All of lore.kernel.org
 help / color / mirror / Atom feed
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 v5 1.0] configure: build position independent executables across for x86 hosts
Date: Tue, 15 Nov 2011 11:15:19 +0200	[thread overview]
Message-ID: <4EC22DA7.1030502@redhat.com> (raw)
In-Reply-To: <CAFEAcA80Hayyqina6ShWOWpPqZcVjE6sBLmVmg9pW70pBdQ-RA@mail.gmail.com>

On 11/15/2011 11:10 AM, Peter Maydell wrote:
> On 15 November 2011 08:00, Avi Kivity <avi@redhat.com> wrote:
>
> > @@ -1099,6 +1099,37 @@ for flag in $gcc_flags; do
> >     fi
> >  done
> >
> > +if test "$pie" = "yes" -a "$static" = "yes" ; then
> > +  echo "static and pie are mutually incompatible"
> > +  exit 1
> > +fi
>
> The -a operator to test has been marked obsolescent in
> POSIX -- please don't use it in new code. (Use
> if test "$pie" = yes && test "$static" = yes; then )

Okay.  For 1.1, I'll convert this script to python.

> > +if test "$pie" = "yes" ; then
> > +  cat > $TMPC << EOF
> > +int main(void) { return 0; }
> > +EOF
> > +  if compile_prog "-fPIE -DPIE" "-Wl,-pie"; then
> > +    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"
>
> Why does this second compile test put -fPIE -DPIE into
> its local cflags and -Wl,-pie into its local ldflags
> when we just put them into the global cflags/ldflags?

Ah, I didn't realize compile_prog considered those.  Will make
parallelizing it harder.  Will fix.

> > +    fi
> > +  else
> > +    echo "Disabling PIE due to missing toolchain support"
> > +    pie="no"
>
> This means that if the user explicitly asked for PIE (with
> --enable-pie") we will carry on even if we couldn't do it.
> Usually for configure if the user asked for something then
> not providing it is a fatal error.

Yeah.

-- 
error compiling committee.c: too many arguments to function

      reply	other threads:[~2011-11-15  9:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15  8:00 [Qemu-devel] [PATCH v5 1.0] configure: build position independent executables across for x86 hosts Avi Kivity
2011-11-15  9:10 ` Peter Maydell
2011-11-15  9:15   ` 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=4EC22DA7.1030502@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.