Skip to contentSkip to conversation

Move $(LIBS) on the end

PATCH Applied Bernhard Walle 3 participants 6 messages Aug 26, 2008 – Aug 27, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Move $(LIBS) on the end

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" <[email protected]>. 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.

kexec/Makefile +1 -2
@@ -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
 

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw
Quoted 6 lines · Yinghai Lu
Quoted 4 lines · Bernhard Walle
1 file changed, 1 insertion(+), 2 deletions(-)

kexec/Makefile | 3 +--

Quoted 6 lines
Quoted 4 lines

To make static compilation work with

LDFLAGS=-static ./configure
make

thanks. can you put that two lines into INSTALL.

Adding is not possible since there is no such file. However, I hacked a small INSTALL file now, I hope that's ok, see the next patch mail.

Bernhard

Signature · 6 lines
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#3 lore raw
Quoted 9 lines · Bernhard Walle
Quoted 8 lines · Yinghai Lu
Quoted 6 lines · Bernhard Walle
1 file changed, 1 insertion(+), 2 deletions(-)

kexec/Makefile | 3 +--

To make static compilation work with

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

LDFLAGS=-static ./configure
make

thanks. can you put that two lines into INSTALL.

Adding is not possible since there is no such file. However, I hacked a small INSTALL file now, I hope that's ok, see the next patch mail.

there is one in the git tree

http://git.kernel.org/?p=linux/kernel/git/horms/kexec-tools.git;a=blob;f=INSTALL;h=e422868c2b9411c38949dd605d674455f96f1ae2;hb=HEAD

YH

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#4 lore raw
Quoted 16 lines · Yinghai Lu
Quoted 14 lines · Bernhard Walle
Quoted 12 lines · Yinghai Lu
Quoted 8 lines · Bernhard Walle
1 file changed, 1 insertion(+), 2 deletions(-)

kexec/Makefile | 3 +--

To make static compilation work with

LDFLAGS=-static ./configure
make

thanks. can you put that two lines into INSTALL.

Quoted 7 lines
Quoted 3 lines

Adding is not possible since there is no such file. However, I hacked a small INSTALL file now, I hope that's ok, see the next patch mail.

there is one in the git tree

http://git.kernel.org/?p=linux/kernel/git/horms/kexec-tools.git;a=blob;f=INSTALL;h=e422868c2b9411c38949dd605d674455f96f1ae2;hb=HEAD

Ah, I didn't notice because I used the tarball to create that patch ... I now merged the two and wrote a patch to actually include that INSTALL file in the tarball.

Bernhard

Signature · 6 lines
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Applied
#5 lore raw
In reply to Bernhard Walle
Quoted 15 lines · Bernhard Walle
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" <[email protected]>. 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.

Quoted 4 lines

Tested on x86_64-suse-linux.

Thanks. I agree that static is entirely sensible for kexec-tools.

Applied

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec