qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Bug 1258168] Re: QEMU fails to build on CentOS 5.10 wi


From: Don Slutz
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
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

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




reply via email to

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