Commit 67c0f08d168a2933bf01160592cbe905075cd268
Committed by
Anthony Liguori
1 parent
f36fc7a1
Add -static in configure if needed
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
3 changed files
with
2 additions
and
14 deletions
Makefile
... | ... | @@ -20,9 +20,7 @@ CPPFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@ |
20 | 20 | CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
21 | 21 | CPPFLAGS += -U_FORTIFY_SOURCE |
22 | 22 | LIBS= |
23 | -ifdef CONFIG_STATIC | |
24 | -LDFLAGS += -static | |
25 | -endif | |
23 | + | |
26 | 24 | ifdef BUILD_DOCS |
27 | 25 | DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 |
28 | 26 | else | ... | ... |
Makefile.target
... | ... | @@ -175,10 +175,6 @@ ifdef CONFIG_LINUX_USER |
175 | 175 | VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) |
176 | 176 | CPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) |
177 | 177 | |
178 | -ifdef CONFIG_STATIC | |
179 | -LDFLAGS+=-static | |
180 | -endif | |
181 | - | |
182 | 178 | ifeq ($(ARCH),i386) |
183 | 179 | ifdef TARGET_GPROF |
184 | 180 | USE_I386_LD=y |
... | ... | @@ -322,10 +318,6 @@ ifdef CONFIG_BSD_USER |
322 | 318 | VPATH+=:$(SRC_PATH)/bsd-user |
323 | 319 | CPPFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH) |
324 | 320 | |
325 | -ifdef CONFIG_STATIC | |
326 | -LDFLAGS+=-static | |
327 | -endif | |
328 | - | |
329 | 321 | ifeq ($(ARCH),i386) |
330 | 322 | ifdef TARGET_GPROF |
331 | 323 | USE_I386_LD=y |
... | ... | @@ -620,9 +612,6 @@ CPPFLAGS+=-I$(SRC_PATH)/slirp |
620 | 612 | endif |
621 | 613 | |
622 | 614 | # specific flags are needed for non soft mmu emulator |
623 | -ifdef CONFIG_STATIC | |
624 | -LDFLAGS+=-static | |
625 | -endif | |
626 | 615 | ifndef CONFIG_DARWIN |
627 | 616 | ifndef CONFIG_WIN32 |
628 | 617 | ifndef CONFIG_SOLARIS | ... | ... |
configure
... | ... | @@ -1588,6 +1588,7 @@ fi |
1588 | 1588 | if test "$static" = "yes" ; then |
1589 | 1589 | echo "CONFIG_STATIC=y" >> $config_host_mak |
1590 | 1590 | echo "#define CONFIG_STATIC 1" >> $config_host_h |
1591 | + LDFLAGS="$LDFLAGS -static" | |
1591 | 1592 | fi |
1592 | 1593 | if test $profiler = "yes" ; then |
1593 | 1594 | echo "#define CONFIG_PROFILER 1" >> $config_host_h | ... | ... |