if compile_prog "-Werror -fstack-protector-all" "" ; then
QEMU_CFLAGS="$QEMU_CFLAGS -fstack-protector-all"
- LIBTOOLFLAGS="$LIBTOOLFLAGS -Wc,-fstack-protector-all"
+ if test "$pie" != "no" ; then
+ LIBTOOLFLAGS="$LIBTOOLFLAGS -Wc,-fstack-protector-all"
+ fi
fi
/home/don/qemu/libcacard/vscclient.c: In function 'do_socket_read':
/home/don/qemu/libcacard/vscclient.c:410: warning: implicit declaration of function 'g_warn_if_reached'
/home/don/qemu/libcacard/vscclient.c:410: warning: nested extern declaration of 'g_warn_if_reached'
/home/don/qemu/libcacard/vscclient.c: In function 'main':
/home/don/qemu/libcacard/vscclient.c:763: warning: implicit declaration of function 'g_byte_array_unref'
/home/don/qemu/libcacard/vscclient.c:763: warning: nested extern declaration of 'g_byte_array_unref'
...
libcacard/vscclient.o: In function `do_socket_read':
/home/don/qemu/libcacard/vscclient.c:410: undefined reference to `g_warn_if_reached'
libcacard/vscclient.o: In function `main':
/home/don/qemu/libcacard/vscclient.c:763: undefined reference to `g_byte_array_unref'
collect2: ld returned 1 exit status
make: *** [vscclient] Error 1
Using the hack:
git diff
diff --git a/configure b/configure
index 0666228..cf8123b 100755
--- a/configure
+++ b/configure
@@ -1292,7 +1292,9 @@ done
if compile_prog "-Werror -fstack- protector- all" "" ; then CFLAGS= "$QEMU_ CFLAGS -fstack- protector- all" "$LIBTOOLFLAGS -Wc,-fstack- protector- all" "$LIBTOOLFLAGS -Wc,-fstack- protector- all"
QEMU_
- LIBTOOLFLAGS=
+ if test "$pie" != "no" ; then
+ LIBTOOLFLAGS=
+ fi
fi
# Workaround for http:// gcc.gnu. org/PR55489. Happens with -fPIE/-fPIC and
I now get:
/home/don/ qemu/libcacard/ vscclient. c: In function 'do_socket_read': qemu/libcacard/ vscclient. c:410: warning: implicit declaration of function 'g_warn_if_reached' qemu/libcacard/ vscclient. c:410: warning: nested extern declaration of 'g_warn_if_reached' qemu/libcacard/ vscclient. c: In function 'main': qemu/libcacard/ vscclient. c:763: warning: implicit declaration of function 'g_byte_ array_unref' qemu/libcacard/ vscclient. c:763: warning: nested extern declaration of 'g_byte_ array_unref' vscclient. o: In function `do_socket_read': qemu/libcacard/ vscclient. c:410: undefined reference to `g_warn_if_reached' vscclient. o: In function `main': qemu/libcacard/ vscclient. c:763: undefined reference to `g_byte_ array_unref'
/home/don/
/home/don/
/home/don/
/home/don/
/home/don/
...
libcacard/
/home/don/
libcacard/
/home/don/
collect2: ld returned 1 exit status
make: *** [vscclient] Error 1