mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 13:30:52 +00:00
refactor linker_script common part and change quoting
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
This commit is contained in:
parent
07dac55da4
commit
322e58780b
13
configure
vendored
13
configure
vendored
@ -2071,34 +2071,35 @@ fi
|
|||||||
# generate LDFLAGS for targets
|
# generate LDFLAGS for targets
|
||||||
|
|
||||||
ldflags=""
|
ldflags=""
|
||||||
|
linker_script="-Wl,-T../config-host.ld -Wl,-T,\$(SRC_PATH)/\$(ARCH).ld"
|
||||||
if test "$target_linux_user" = "yes" -o "$target_linux_user" = "yes" ; then
|
if test "$target_linux_user" = "yes" -o "$target_linux_user" = "yes" ; then
|
||||||
case "$ARCH" in
|
case "$ARCH" in
|
||||||
i386)
|
i386)
|
||||||
if test "$gprof" = "yes" -o "$static" = "yes" ; then
|
if test "$gprof" = "yes" -o "$static" = "yes" ; then
|
||||||
ldflags='-Wl,-T../config-host.ld -Wl,-T,$(SRC_PATH)/$(ARCH).ld $ldflags'
|
ldflags="$linker_script $ldflags"
|
||||||
else
|
else
|
||||||
# WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
|
# WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
|
||||||
# that the kernel ELF loader considers as an executable. I think this
|
# that the kernel ELF loader considers as an executable. I think this
|
||||||
# is the simplest way to make it self virtualizable!
|
# is the simplest way to make it self virtualizable!
|
||||||
ldflags='-Wl,-shared $ldflags'
|
ldflags="-Wl,-shared $ldflags"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
sparc)
|
sparc)
|
||||||
# -static is used to avoid g1/g3 usage by the dynamic linker
|
# -static is used to avoid g1/g3 usage by the dynamic linker
|
||||||
ldflags='-Wl,-T../config-host.ld -Wl,-T,$(SRC_PATH)/$(ARCH).ld -static $ldflags'
|
ldflags="$linker_script -static $ldflags"
|
||||||
;;
|
;;
|
||||||
ia64)
|
ia64)
|
||||||
ldflags='-Wl,-G0 -Wl,-T../config-host.ld -Wl,-T,$(SRC_PATH)/$(ARCH).ld -static $ldflags'
|
ldflags="-Wl,-G0 $linker_script -static $ldflags"
|
||||||
;;
|
;;
|
||||||
x86_64|ppc|ppc64|s390|sparc64|alpha|arm|m68k|mips|mips64)
|
x86_64|ppc|ppc64|s390|sparc64|alpha|arm|m68k|mips|mips64)
|
||||||
ldflags='-Wl,-T../config-host.ld -Wl,-T,$(SRC_PATH)/$(ARCH).ld $ldflags'
|
ldflags="$linker_script $ldflags"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
if test "$target_softmmu" = "yes" ; then
|
if test "$target_softmmu" = "yes" ; then
|
||||||
case "$ARCH" in
|
case "$ARCH" in
|
||||||
ia64)
|
ia64)
|
||||||
ldflags='-Wl,-G0 -Wl,-T../config-host.ld -Wl,-T,$(SRC_PATH)/$(ARCH).ld -static $ldflags'
|
ldflags="-Wl,-G0 $linker_script -static $ldflags"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user