diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2009-05-12 09:55:27 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-05-14 17:03:49 -0500 |
commit | 9abbdbfe59318779902ab08e5070f3819cb83b58 (patch) | |
tree | 8b7fb3a255fd117e26060e1fedb68542f13197f9 /configure | |
parent | a984a69e570d7639dba3f0b4a21b5169955162e4 (diff) |
Fix build on Solaris and WIN32
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -1691,6 +1691,29 @@ bsd) ;; esac +# Determine what linker flags to use to force archive inclusion +check_linker_flags() +{ + $cc $ARCH_CFLAGS -o $TMPE $OS_CFLAGS $TMPC -Wl,$1 -Wl,$2 >/dev/null 2>/dev/null +} + +cat > $TMPC << EOF +int main(void) { } +EOF +if check_linker_flags --whole-archive --no-whole-archive ; then + # GNU ld + echo "ARLIBS_BEGIN=-Wl,--whole-archive" >> $config_mak + echo "ARLIBS_END=-Wl,--no-whole-archive" >> $config_mak +elif check_linker_flags -z,allextract -z,defaultextract ; then + # Solaris ld + echo "ARLIBS_BEGIN=-Wl,-z,allextract" >> $config_mak + echo "ARLIBS_END=-Wl,-z,defaultextract" >> $config_mak +else + echo "Error: your linker does not support --whole-archive or -z." + echo "Please report to qemu-devel@nongnu.org" + exit 1 +fi + tools= if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then tools="qemu-img\$(EXESUF) $tools" |