From: Don Slutz <dslutz@verizon.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
dslutz@verizon.com, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Bug 1258168] Re: QEMU fails to build on CentOS 5.10 with --disable-pie reporting "/usr/bin/ld: -f may not be used without -shared "
Date: Thu, 13 Nov 2014 13:05:05 -0500 [thread overview]
Message-ID: <5464F2D1.3040207@terremark.com> (raw)
In-Reply-To: <5464F012.4080703@redhat.com>
No change.
LINK qemu-bridge-helper
CC qmp-marshal.o
lt LINK vscclient
/usr/bin/ld: -f may not be used without -shared
collect2: ld returned 1 exit status
make: *** [vscclient] Error 1
make: *** Waiting for unfinished jobs....
dcs-xen-53:~/qemu/out/bug-1258168>
-Don Slutz
On 11/13/14 12:53, Paolo Bonzini wrote:
> Here is a fixed version. I missed the -rpath /usr/local/lib in
> the libtool_prog function:
>
> diff --git a/configure b/configure
> index 47048f0..b7bf30a 100755
> --- a/configure
> +++ b/configure
> @@ -140,8 +140,10 @@ do_libtool() {
> }
>
> libtool_prog() {
> - do_libtool --mode=compile $QEMU_CFLAGS -c -fPIE -DPIE -o $TMPO $TMPC || return $?
> - do_libtool --mode=link $LDFLAGS -o $TMPA $TMPL -rpath /usr/local/lib
> + local_cflags="$1"
> + local_ldflags="$2"
> + do_libtool --mode=compile $QEMU_CFLAGS $local_cflags -c -fPIE -DPIE -o $TMPO $TMPC || return $?
> + do_libtool --mode=link $LDFLAGS $local_ldflags -o $TMPA $TMPL
> }
>
> # symbolically link $1 to $2. Portable version of "ln -sf".
> @@ -1501,13 +1503,16 @@ if test "$stack_protector" != "no"; then
> for flag in $gcc_flags; do
> # We need to check both a compile and a link, since some compiler
> # setups fail only on a .c->.o compile and some only at link time
> - if do_cc $QEMU_CFLAGS -Werror $flag -c -o $TMPO $TMPC &&
> - compile_prog "-Werror $flag" ""; then
> - QEMU_CFLAGS="$QEMU_CFLAGS $flag"
> - LIBTOOLFLAGS="$LIBTOOLFLAGS -Wc,$flag"
> - sp_on=1
> - break
> + do_cc $QEMU_CFLAGS -Werror $flag -c -o $TMPO $TMPC || continue
> + compile_prog "-Werror $flag" "" || continue
> + if test -n "$libtool"; then
> + libtool_prog "-Werror $flag" "-Wc,$flag" || continue
> fi
> +
> + QEMU_CFLAGS="$QEMU_CFLAGS $flag"
> + LIBTOOLFLAGS="$LIBTOOLFLAGS -Wc,$flag"
> + sp_on=1
> + break
> done
> if test "$stack_protector" = yes; then
> if test $sp_on = 0; then
> @@ -1608,7 +1613,7 @@ g(unsigned char *buf, int len)
> }
>
> EOF
> - if ! libtool_prog; then
> + if ! libtool_prog "" "-rpath /usr/local/lib"; then
> echo "Disabling libtool due to broken toolchain support"
> libtool=
> fi
next prev parent reply other threads:[~2014-11-13 18:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-05 14:24 [Qemu-devel] [Bug 1258168] [NEW] QEMU fails to build on CentOS 5.10 with --disable-pie reporting "/usr/bin/ld: -f may not be used without -shared " Don Slutz
2013-12-05 14:53 ` [Qemu-devel] [Bug 1258168] " Don Slutz
2013-12-05 15:52 ` Don Slutz
2014-11-13 7:32 ` Robin Lee
2014-11-13 10:34 ` Paolo Bonzini
2014-11-13 16:45 ` Don Slutz
2014-11-13 17:53 ` Paolo Bonzini
2014-11-13 18:05 ` Don Slutz [this message]
2014-11-13 18:06 ` Paolo Bonzini
2014-11-13 18:14 ` Don Slutz
2014-11-13 19:21 ` Paolo Bonzini
2016-09-23 6:50 ` T. Huth
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=5464F2D1.3040207@terremark.com \
--to=dslutz@verizon.com \
--cc=pbonzini@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.