Skip to contentSkip to conversation

dos2unix: fix static build

PATCH New Baruch Siach 2 participants 3 messages Jun 24, 2018 – Jul 18, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dos2unix: fix static build

Pass the -static flag to the final link command. Otherwise, the generated executables are not static when the external toolchain provides both shared and static libraries.

Should also fix:
http://autobuild.buildroot.net/results/a5a/a5a64bc3ff5a91a8680ac52f3505362491923b26/
http://autobuild.buildroot.net/results/ebf/ebfe81e65751d7a5ca3aa4e20cc708a24ba65204/

Cc David Bachelart <[email protected]>
---
 package/dos2unix/dos2unix.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/dos2unix/dos2unix.mk +4 -0
index 9b823405902e..5001397f0571 100644
@@ -24,6 +24,10 @@ ifeq ($(BR2_USE_WCHAR),)
 DOS2UNIX_MAKE_OPTS += UCS=
 endif
 
+ifeq ($(BR2_STATIC_LIBS),y)
+DOS2UNIX_MAKE_OPTS += LDFLAGS_USER=-static
+endif
+
 define DOS2UNIX_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(DOS2UNIX_MAKE_OPTS)
 endef
Signature · 1 line
2.18.0
#1 lore raw

PATCH 1/1 dos2unix: fix static build

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

Pass the -static flag to the final link command. Otherwise, the generated executables are not static when the external toolchain provides both shared and static libraries.

Quoted 6 lines

Should also fix:
http://autobuild.buildroot.net/results/a5a/a5a64bc3ff5a91a8680ac52f3505362491923b26/
http://autobuild.buildroot.net/results/ebf/ebfe81e65751d7a5ca3aa4e20cc708a24ba65204/

Cc David Bachelart <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 dos2unix: fix static build

In reply to Baruch Siach
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

Pass the -static flag to the final link command. Otherwise, the generated executables are not static when the external toolchain provides both shared and static libraries.

Quoted 6 lines

Should also fix:
http://autobuild.buildroot.net/results/a5a/a5a64bc3ff5a91a8680ac52f3505362491923b26/
http://autobuild.buildroot.net/results/ebf/ebfe81e65751d7a5ca3aa4e20cc708a24ba65204/

Cc David Bachelart <[email protected]>

Committed to 2018.02.x and 2018.05.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard