Skip to contentSkip to conversation

package/uclibc: rename UCLIBC_INSTALL_UTILS_STAGING to UCLIBC_INSTALL_HOST_UTILS

PATCH Applied Thomas Petazzoni via buildroot 1 participant 4 messages Feb 4 – Feb 13

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/uclibc: rename UCLIBC_INSTALL_UTILS_STAGING to UCLIBC_INSTALL_HOST_UTILS

The UCLIBC_INSTALL_UTILS_STAGING is really badly named, as it doesn't install anything to STAGING_DIR. Instead, it installs the host variant of ldd and ldconfig into $(HOST_DIR)/bin. Therefore, rename it to UCLIBC_INSTALL_HOST_UTILS.

This is important as a follow-up commit will re-introduce a UCLIBC_INSTALL_UTILS_STAGING variable which really installs things into STAGING_DIR.

---
 package/uclibc/uclibc.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/uclibc/uclibc.mk +2 -2
index e1cf12fa68..dea5445b16 100644
@@ -463,7 +463,7 @@ endef
 
 # STATIC has no ld* tools, only getconf
 ifeq ($(BR2_STATIC_LIBS),)
-define UCLIBC_INSTALL_UTILS_STAGING
+define UCLIBC_INSTALL_HOST_UTILS
 	$(INSTALL) -D -m 0755 $(@D)/utils/ldd.host $(HOST_DIR)/bin/ldd
 	ln -sf ldd $(HOST_DIR)/bin/$(GNU_TARGET_NAME)-ldd
 	$(INSTALL) -D -m 0755 $(@D)/utils/ldconfig.host $(HOST_DIR)/bin/ldconfig
@@ -478,7 +478,7 @@ define UCLIBC_INSTALL_STAGING_CMDS
 		DEVEL_PREFIX=/usr/ \
 		RUNTIME_PREFIX=/ \
 		install_runtime install_dev
-	$(UCLIBC_INSTALL_UTILS_STAGING)
+	$(UCLIBC_INSTALL_HOST_UTILS)
 endef
 
 # Checks to give errors that the user can understand
Signature · 6 lines
2.52.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/uclibc: also install utils to STAGING_DIR

When BR2_UCLIBC_INSTALL_UTILS is enabled, utils such as getconf, ldd, locale get installed to TARGET_DIR. However, they do not get installed to STAGING_DIR, which is annoying as it means that they are not part of external toolchains built by Buildroot.

This commit adjusts the uclibc package to make sure those tools also get installed to STAGING_DIR.

---
 package/uclibc/uclibc.mk | 9 +++++++++
 1 file changed, 9 insertions(+)
package/uclibc/uclibc.mk +9 -0
index dea5445b16..69eb73510e 100644
@@ -449,6 +449,14 @@ define UCLIBC_INSTALL_UTILS_TARGET
 		PREFIX=$(TARGET_DIR) \
 		utils install_utils
 endef
+
+define UCLIBC_INSTALL_UTILS_STAGING
+	$(MAKE1) -C $(@D) \
+		CC="$(TARGET_CC)" CPP="$(TARGET_CPP)" LD="$(TARGET_LD)" \
+		ARCH="$(UCLIBC_TARGET_ARCH)" \
+		PREFIX=$(STAGING_DIR) \
+		utils install_utils
+endef
 endif
 
 define UCLIBC_INSTALL_TARGET_CMDS
@@ -479,6 +487,7 @@ define UCLIBC_INSTALL_STAGING_CMDS
 		RUNTIME_PREFIX=/ \
 		install_runtime install_dev
 	$(UCLIBC_INSTALL_HOST_UTILS)
+	$(UCLIBC_INSTALL_UTILS_STAGING)
 endef
 
 # Checks to give errors that the user can understand
Signature · 6 lines
2.52.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/2] package/uclibc: also install utils to STAGING_DIR

In reply of:

Quoted 9 lines

When BR2_UCLIBC_INSTALL_UTILS is enabled, utils such as getconf, ldd, locale get installed to TARGET_DIR. However, they do not get installed to STAGING_DIR, which is annoying as it means that they are not part of external toolchains built by Buildroot.

This commit adjusts the uclibc package to make sure those tools also get installed to STAGING_DIR.

Applied to 2025.02.x & 2025.11.x. Thanks

Quoted 38 lines
---
 package/uclibc/uclibc.mk | 9 +++++++++
 1 file changed, 9 insertions(+)
package/uclibc/uclibc.mk +9 -0
index dea5445b16..69eb73510e 100644
@@ -449,6 +449,14 @@ define UCLIBC_INSTALL_UTILS_TARGET
 		PREFIX=$(TARGET_DIR) \
 		utils install_utils
 endef
+
+define UCLIBC_INSTALL_UTILS_STAGING
+	$(MAKE1) -C $(@D) \
+		CC="$(TARGET_CC)" CPP="$(TARGET_CPP)" LD="$(TARGET_LD)" \
+		ARCH="$(UCLIBC_TARGET_ARCH)" \
+		PREFIX=$(STAGING_DIR) \
+		utils install_utils
+endef
 endif
 
 define UCLIBC_INSTALL_TARGET_CMDS
@@ -479,6 +487,7 @@ define UCLIBC_INSTALL_STAGING_CMDS
 		RUNTIME_PREFIX=/ \
 		install_runtime install_dev
 	$(UCLIBC_INSTALL_HOST_UTILS)
+	$(UCLIBC_INSTALL_UTILS_STAGING)
 endef
 
 # Checks to give errors that the user can understand
Signature · 6 lines
2.52.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
In reply to Thomas Petazzoni via buildroot

In reply of:

Quoted 10 lines

The UCLIBC_INSTALL_UTILS_STAGING is really badly named, as it doesn't install anything to STAGING_DIR. Instead, it installs the host variant of ldd and ldconfig into $(HOST_DIR)/bin. Therefore, rename it to UCLIBC_INSTALL_HOST_UTILS.

This is important as a follow-up commit will re-introduce a UCLIBC_INSTALL_UTILS_STAGING variable which really installs things into STAGING_DIR.

Applied to 2025.02.x & 2025.11.x. Thanks

Quoted 33 lines
---
 package/uclibc/uclibc.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/uclibc/uclibc.mk +2 -2
index e1cf12fa68..dea5445b16 100644
@@ -463,7 +463,7 @@ endef
 
 # STATIC has no ld* tools, only getconf
 ifeq ($(BR2_STATIC_LIBS),)
-define UCLIBC_INSTALL_UTILS_STAGING
+define UCLIBC_INSTALL_HOST_UTILS
 	$(INSTALL) -D -m 0755 $(@D)/utils/ldd.host $(HOST_DIR)/bin/ldd
 	ln -sf ldd $(HOST_DIR)/bin/$(GNU_TARGET_NAME)-ldd
 	$(INSTALL) -D -m 0755 $(@D)/utils/ldconfig.host $(HOST_DIR)/bin/ldconfig
@@ -478,7 +478,7 @@ define UCLIBC_INSTALL_STAGING_CMDS
 		DEVEL_PREFIX=/usr/ \
 		RUNTIME_PREFIX=/ \
 		install_runtime install_dev
-	$(UCLIBC_INSTALL_UTILS_STAGING)
+	$(UCLIBC_INSTALL_HOST_UTILS)
 endef
 
 # Checks to give errors that the user can understand
Signature · 6 lines
2.52.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot