mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
package/cross-ldd: new package
This commit introduces a new cross-ldd package which installs the cross ldd implementation that comes from Crosstool-NG, and which can be used like ldd, but when cross-compiling. We intend to use it as a replacement of host-prelink-cross for our dracut package. The cross-ldd from Crosstool-NG is in fact even recommended by the Dracut documentation, in its docs/README.cross document: To support cross-compiled binaries, a different ldd variant is needed that works on those binaries. One such ldd script is found at https://gist.github.com/jerome-pouiller/c403786c1394f53f44a3b61214489e6f This Github Gist in fact contains the xldd.in code from Crosstool-NG. Our package downloads the full tarball of Crosstool-NG. We tried to download only the script and the license file, but we couldn't figure out a way of downloading them *and* have the version in the filename to make sure that when doing an upgrade to a newer version, we wouldn't have a clash between old/new files having the same name (and causing conflicts with the hash verification). So in the end, we opted for download the whole tarball. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Romain Naour <romain.naour@smile.fr>
This commit is contained in:
committed by
Romain Naour
parent
012f03bd27
commit
2528672d39
@@ -3145,6 +3145,7 @@ F: package/cifs-utils/
|
||||
F: package/cloop/
|
||||
F: package/cmake/
|
||||
F: package/cramfs/
|
||||
F: package/cross-ldd/
|
||||
F: package/dmidecode/
|
||||
F: package/double-conversion/
|
||||
F: package/flashrom/
|
||||
|
||||
4
package/cross-ldd/cross-ldd.hash
Normal file
4
package/cross-ldd/cross-ldd.hash
Normal file
@@ -0,0 +1,4 @@
|
||||
# From http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.26.0.tar.xz.sha512
|
||||
sha512 7834184ae5792fd347455f9f48fee826248dcb82d271954ed4304b1a18f63995ff8a2c3b817564dcf147ac7e16e02d779195b26d97eb57db27f1118a1837002a crosstool-ng-1.26.0.tar.xz
|
||||
# Locally calculated
|
||||
sha256 07bc0ccd386469c748c4cf6c8faca5667fbf8c4400386714287fa233acfd68ba COPYING
|
||||
37
package/cross-ldd/cross-ldd.mk
Normal file
37
package/cross-ldd/cross-ldd.mk
Normal file
@@ -0,0 +1,37 @@
|
||||
################################################################################
|
||||
#
|
||||
# cross-ldd
|
||||
#
|
||||
################################################################################
|
||||
|
||||
CROSS_LDD_VERSION = 1.26.0
|
||||
CROSS_LDD_SITE = http://crosstool-ng.org/download/crosstool-ng
|
||||
CROSS_LDD_SOURCE = crosstool-ng-$(CROSS_LDD_VERSION).tar.xz
|
||||
CROSS_LDD_LICENSE = GPL-2.0
|
||||
CROSS_LDD_LICENSE_FILES = COPYING
|
||||
|
||||
ifeq ($(BR2_ARCH_IS_64),y)
|
||||
CROSS_LDD_BITNESS = 64
|
||||
else
|
||||
CROSS_LDD_BITNESS = 32
|
||||
endif
|
||||
|
||||
CROSS_LDD_TOOLS_PREFIX = $(patsubst %-,%,$(TARGET_CROSS))
|
||||
|
||||
define HOST_CROSS_LDD_CONFIGURE_CMDS
|
||||
sed \
|
||||
-e "s%@@CT_bash@@%/usr/bin/env bash%" \
|
||||
-e "s%@@CT_VERSION@@%$(CROSS_LDD_VERSION)%" \
|
||||
-e "s%@@CT_BITS@@%$(CROSS_LDD_BITNESS)%" \
|
||||
-e "s%@@CT_sed@@%sed%" \
|
||||
-e "s%@@CT_grep@@%grep%" \
|
||||
-e "s%^prefix=.*%prefix=$(CROSS_LDD_TOOLS_PREFIX)%" \
|
||||
$(@D)/scripts/xldd.in > \
|
||||
$(@D)/scripts/xldd
|
||||
endef
|
||||
|
||||
define HOST_CROSS_LDD_INSTALL_CMDS
|
||||
$(INSTALL) -m 0755 -D $(@D)/scripts/xldd $(TARGET_CROSS)xldd
|
||||
endef
|
||||
|
||||
$(eval $(host-generic-package))
|
||||
Reference in New Issue
Block a user