Skip to contentSkip to conversation

package/musl: fix C library installation directory

PATCH New Jörg Krause 2 participants 3 messages Dec 9, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/musl: fix C library installation directory

Set the installation path for the libraries to /lib instead of /usr/lib.

This fixes an issue when building a toolchain with the musl library by the internal toolchain backend of Buildroot in the first step and import this toolchain later as a custom external toolchain in a second step. For this use case check-musl in toolchain/helpers.mk failed because it did not find the libc or libm in sysroot/lib.

This patch superseeds: [PATCH 1/1] toolchain/helpers.mk: fix check-musl
http://patchwork.ozlabs.org/patch/417587/

---
 package/musl/musl.mk | 1 +
 1 file changed, 1 insertion(+)
package/musl/musl.mk +1 -0
index fb4327d..3a45575 100644
@@ -27,6 +27,7 @@ define MUSL_CONFIGURE_CMDS
 			--target=$(GNU_TARGET_NAME) \
 			--host=$(GNU_TARGET_NAME) \
 			--prefix=/usr \
+			--libdir=/lib \
 			--disable-gcc-wrapper)
 endef
 
Signature · 1 line
2.1.3
#1 lore raw

PATCH 2/2 package/musl: remove obsolete setting of prefix

Using the config option '--libdir=/lib' makes the setting of prefix to an empty path obsolete in MUSL_INSTALL_TARGET_CMDS.

---
 package/musl/musl.mk | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
package/musl/musl.mk +1 -3
index 3a45575..1f1af05 100644
@@ -40,11 +40,9 @@ define MUSL_INSTALL_STAGING_CMDS
 		DESTDIR=$(STAGING_DIR) install-libs install-tools install-headers
 endef
 
-# prefix is set to an empty value to get the C library installed in
-# /lib and not /usr/lib
 define MUSL_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
-		DESTDIR=$(TARGET_DIR) prefix= install-libs
+		DESTDIR=$(TARGET_DIR) install-libs
 	$(RM) $(addprefix $(TARGET_DIR)/lib/,crt1.o crtn.o crti.o Scrt1.o)
 endef
 
Signature · 1 line
2.1.3
#2 lore raw

PATCH 1/2 package/musl: fix C library installation directory

In reply to Jörg Krause
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"J?rg" == J?rg Krause <[email protected]> writes:

Set the installation path for the libraries to /lib instead of /usr/lib. This fixes an issue when building a toolchain with the musl library by the internal toolchain backend of Buildroot in the first step and import this toolchain later as a custom external toolchain in a second step. For this use case check-musl in toolchain/helpers.mk failed because it did not find the libc or libm in sysroot/lib.

Quoted 4 lines

This patch superseeds: [PATCH 1/1] toolchain/helpers.mk: fix check-musl
http://patchwork.ozlabs.org/patch/417587/

Committed both, thanks.

Signature · 1 line
Bye, Peter Korsgaard