diff --git a/lfs/Config b/lfs/Config index bc4155edf..d37e84fc4 100644 --- a/lfs/Config +++ b/lfs/Config @@ -480,7 +480,7 @@ define INSTALL_INITSCRIPTS done endef -ifeq "$(BUILD_ARCH)" "$(filter $(BUILD_ARCH),aarch64 riscv64)" +ifeq "$(BUILD_ARCH)" "$(filter $(BUILD_ARCH),aarch64 riscv64 loongarch64)" define UPDATE_AUTOMAKE for i in $$(find $(DIR_APP) -name config.guess -o -name config.sub); do \ cp -vf /usr/share/automake*/$$(basename $${i}) $${i} || \ diff --git a/lfs/automake b/lfs/automake index e595b98b6..4fdb110b8 100644 --- a/lfs/automake +++ b/lfs/automake @@ -40,6 +40,14 @@ else TARGET = $(DIR_INFO)/$(THISAPP)-tools endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/bash b/lfs/bash index f3948c7e5..0c7482e9c 100644 --- a/lfs/bash +++ b/lfs/bash @@ -45,6 +45,14 @@ endif CONFIGURE_OPTIONS += \ --without-bash-malloc +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/bison b/lfs/bison index 8bf6c42a6..b75c0d830 100644 --- a/lfs/bison +++ b/lfs/bison @@ -37,6 +37,14 @@ else TARGET = $(DIR_INFO)/$(THISAPP) endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/bzip2 b/lfs/bzip2 index 8a2e16cfa..1efdaece0 100644 --- a/lfs/bzip2 +++ b/lfs/bzip2 @@ -39,6 +39,14 @@ else TARGET = $(DIR_INFO)/$(THISAPP)-tools endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/ccache b/lfs/ccache index 6fef8c685..b621471f1 100644 --- a/lfs/ccache +++ b/lfs/ccache @@ -32,6 +32,14 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP)-tools +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/coreutils b/lfs/coreutils index 4220050da..092697c42 100644 --- a/lfs/coreutils +++ b/lfs/coreutils @@ -50,6 +50,14 @@ CONFIGURE_OPTIONS += \ CFLAGS += -fno-strict-aliasing +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/diffutils b/lfs/diffutils index 80c6f2a95..94e3a062e 100644 --- a/lfs/diffutils +++ b/lfs/diffutils @@ -39,6 +39,14 @@ else TARGET = $(DIR_INFO)/$(THISAPP)-tools endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/expect b/lfs/expect index edadcb0dc..a3fe3cf41 100644 --- a/lfs/expect +++ b/lfs/expect @@ -32,6 +32,14 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP)-tools +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/fake-environ b/lfs/fake-environ index c4f2c7bd2..04cf1a63b 100644 --- a/lfs/fake-environ +++ b/lfs/fake-environ @@ -30,6 +30,14 @@ THISAPP = fake-environ DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP)-tools +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/findutils b/lfs/findutils index 7fb2383cc..acd13b863 100644 --- a/lfs/findutils +++ b/lfs/findutils @@ -42,6 +42,14 @@ else EXTRA_CONFIG = --prefix=$(TOOLS_DIR) --disable-nls --build=$(BUILDTARGET) endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/flex b/lfs/flex index 0f70aa501..91165b8a6 100644 --- a/lfs/flex +++ b/lfs/flex @@ -43,6 +43,13 @@ else TARGET = $(DIR_INFO)/$(THISAPP)-tools endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif ############################################################################### # Top-level Rules diff --git a/lfs/gawk b/lfs/gawk index 3a84db3ed..b6c84d9ed 100644 --- a/lfs/gawk +++ b/lfs/gawk @@ -41,6 +41,14 @@ else EXTRA_CONFIG = --prefix=$(TOOLS_DIR) --disable-nls endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/gettext b/lfs/gettext index 30f3d64c5..f9bacbf54 100644 --- a/lfs/gettext +++ b/lfs/gettext @@ -48,6 +48,14 @@ else --build=$(BUILDTARGET) endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/glibc b/lfs/glibc index 802223c5c..703f2b94e 100644 --- a/lfs/glibc +++ b/lfs/glibc @@ -74,6 +74,14 @@ ifeq "$(BUILD_ARCH)" "aarch64" EXTRA_CONFIG += --enable-memory-tagging endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/grep b/lfs/grep index dde47ffa2..013682d42 100644 --- a/lfs/grep +++ b/lfs/grep @@ -42,6 +42,14 @@ else --disable-perl-regexp --without-included-regex endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/gzip b/lfs/gzip index 5101df71f..14f88b95d 100644 --- a/lfs/gzip +++ b/lfs/gzip @@ -41,6 +41,14 @@ else EXTRA_CONFIG = --prefix=$(TOOLS_DIR) endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/m4 b/lfs/m4 index 4756ef228..e66aec4cd 100644 --- a/lfs/m4 +++ b/lfs/m4 @@ -39,6 +39,14 @@ else TARGET = $(DIR_INFO)/$(THISAPP)-tools endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/make b/lfs/make index c6684ac75..77bf0d795 100644 --- a/lfs/make +++ b/lfs/make @@ -51,6 +51,14 @@ ifeq "$(PASS)" "1" CFLAGS = endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/ncurses b/lfs/ncurses index b6e331192..69e7567a9 100644 --- a/lfs/ncurses +++ b/lfs/ncurses @@ -51,6 +51,14 @@ EXTRA_CONFIG += \ --mandir=/usr/share/man \ --with-pkg-config-libdir=/usr/lib/pkgconfig +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/patch b/lfs/patch index 20e3c8e97..b33b25a1d 100644 --- a/lfs/patch +++ b/lfs/patch @@ -39,6 +39,14 @@ else TARGET = $(DIR_INFO)/$(THISAPP)-tools endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/perl b/lfs/perl index 81fc597b0..ea2b9681e 100644 --- a/lfs/perl +++ b/lfs/perl @@ -39,6 +39,14 @@ else TARGET = $(DIR_INFO)/$(THISAPP)-tools endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + # Perl does not build with -j larger than 23 MAX_PARALLELISM = 23 diff --git a/lfs/pkg-config b/lfs/pkg-config index 9db1403a4..0d3c0afe4 100644 --- a/lfs/pkg-config +++ b/lfs/pkg-config @@ -40,6 +40,14 @@ else TARGET = $(DIR_INFO)/$(THISAPP)-tools endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/python3 b/lfs/python3 index c5d73cd28..123b54d7b 100644 --- a/lfs/python3 +++ b/lfs/python3 @@ -55,6 +55,14 @@ else --without-ensurepip endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/sed b/lfs/sed index 89ca4f250..fd47ca6b0 100644 --- a/lfs/sed +++ b/lfs/sed @@ -45,6 +45,14 @@ else EXTRA_INSTALL = endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/tar b/lfs/tar index 745b658e7..81744c21f 100644 --- a/lfs/tar +++ b/lfs/tar @@ -42,6 +42,14 @@ else EXTRA_CONFIG = --prefix=$(TOOLS_DIR) --disable-nls endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/tcl b/lfs/tcl index 05cf99aa6..8b2de1c5b 100644 --- a/lfs/tcl +++ b/lfs/tcl @@ -37,6 +37,14 @@ else TARGET = $(DIR_INFO)/$(THISAPP) endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/texinfo b/lfs/texinfo index 58cd05ba8..ebabf589f 100644 --- a/lfs/texinfo +++ b/lfs/texinfo @@ -39,6 +39,14 @@ else TARGET = $(DIR_INFO)/$(THISAPP)-tools endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/xz b/lfs/xz index 0a1763340..14d61b874 100644 --- a/lfs/xz +++ b/lfs/xz @@ -37,6 +37,14 @@ else TARGET = $(DIR_INFO)/$(THISAPP)-tools endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/zlib b/lfs/zlib index d7c723914..478b0f936 100644 --- a/lfs/zlib +++ b/lfs/zlib @@ -40,6 +40,14 @@ endif CFLAGS += -fPIC -DPIC +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/zstd b/lfs/zstd index df678ff3e..b619d7c0d 100644 --- a/lfs/zstd +++ b/lfs/zstd @@ -41,6 +41,14 @@ else CC = gcc endif +# Only for TOOLCHAIN == 1 and BUILD_ARCH == loongarch64 +ifeq "$(TOOLCHAIN)" "1" + ifeq "$(BUILD_ARCH)" "loongarch64" + CFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + LDFLAGS += -Wl,--dynamic-linker=$(TOOLS_DIR)/lib64/ld-linux-loongarch-lp64d.so.1 + endif +endif + ############################################################################### # Top-level Rules ###############################################################################