diff options
| author | Alexey Kardashevskiy | 2014-07-01 09:30:27 +0200 |
|---|---|---|
| committer | Paolo Bonzini | 2014-07-01 10:36:28 +0200 |
| commit | f80ea9862fed7ca89a672785bdce0e2611f9ba97 (patch) | |
| tree | 45a86142fb457318c12b712e4dcb3a19552577cb /Makefile.target | |
| parent | virtio-scsi: scsi events must be converted to target endianness (diff) | |
| download | qemu-f80ea9862fed7ca89a672785bdce0e2611f9ba97.tar.gz qemu-f80ea9862fed7ca89a672785bdce0e2611f9ba97.tar.xz qemu-f80ea9862fed7ca89a672785bdce0e2611f9ba97.zip | |
configure: Fix -lm test, so that tools can be compiled on hosts that require -lm
The existing test whether "-lm" needs to be included or not is
insufficient as it reports false negative on Fedora20/ppc64.
This happens because sin(0.0) is a constant value which compiler
can safely throw away and therefore there is no need to add "-lm".
As the result, qemu-nbd/qemu-io/qemu-img tools cannot compile.
This adds a global variable and uses it in the test to prevent
from optimization.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
[Use Peter's improvement on the test to fool LTO, and remove the
now useless -lm addition in Makefile.target. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Makefile.target')
| -rw-r--r-- | Makefile.target | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Makefile.target b/Makefile.target index 6089d290df..137d0b0517 100644 --- a/Makefile.target +++ b/Makefile.target @@ -163,10 +163,6 @@ dummy := $(call unnest-vars,.., \ all-obj-y += $(common-obj-y) all-obj-$(CONFIG_SOFTMMU) += $(block-obj-y) -ifndef CONFIG_HAIKU -LIBS+=-lm -endif - # build either PROG or PROGW $(QEMU_PROG_BUILD): $(all-obj-y) ../libqemuutil.a ../libqemustub.a $(call LINK,$^) |
