[PATCH] [PATCH] Move $(LIBS) on the end

Bernhard Walle bwalle at suse.de
Tue Aug 26 04:16:49 EDT 2008


1 file changed, 1 insertion(+), 2 deletions(-)
kexec/Makefile |    3 +--


To make static compilation work with

    LDFLAGS=-static ./configure
    make

we have to move $(LIBS) on the end of the compiler line. Static compilation has
been requested by "Yinghai Lu" <yhlu.kernel at gmail.com>. Although I don't see the
practical benefit in most cases, I don't think we should not support it. Since
kexec does not use name resolution functions of libc, it's valid to use static
linking.

Tested on x86_64-suse-linux.


Signed-off-by: Bernhard Walle <bwalle at suse.de>

diff --git a/kexec/Makefile b/kexec/Makefile
--- a/kexec/Makefile
+++ b/kexec/Makefile
@@ -67,10 +67,9 @@
 
 -include $(KEXEC_DEPS)
 
-$(KEXEC): LDFLAGS+=$(LIBS)
 $(KEXEC): $(KEXEC_OBJS) $(UTIL_LIB)
 	@$(MKDIR) -p $(@D)
-	$(LINK.o) -o $@ $^
+	$(LINK.o) -o $@ $^ $(LIBS)
 
 $(KEXEC): CPPFLAGS+=-I$(srcdir)/kexec/arch/$(ARCH)/include
 



More information about the kexec mailing list