mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 10:35:53 +02:00
toolchain: fix gcc custom linker path
Loongarch64 requires gcc/config/loongarch/gnu-user.h change for custom linker path when compiling gcc tool chain fix: https://github.com/vincentmli/BPFire/issues/67 Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
4
lfs/gcc
4
lfs/gcc
@@ -231,6 +231,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
|
||||
ifeq "$(TOOLCHAIN)" "1"
|
||||
|
||||
#loongarch64
|
||||
ifeq "$(BUILD_ARCH)" "loongarch64"
|
||||
sed -i.orig '/ABI_GRLEN_SPEC/s@"/lib" ABI_GRLEN_SPEC@"$(TOOLS_DIR)/lib" ABI_GRLEN_SPEC@g' $(DIR_APP)/gcc/config/loongarch/gnu-user.h
|
||||
endif
|
||||
for file in $$(find $(DIR_APP)/gcc/config -name linux64.h -o -name linux.h \
|
||||
-o -name sysv4.h -o -name linux-eabi.h -o -name linux-elf.h -o -name aarch64-linux.h); do \
|
||||
echo "Processing $${file}..."; \
|
||||
|
||||
@@ -157,8 +157,7 @@ ifeq "$(TOOLCHAIN)" "1"
|
||||
cd $(DIR_APP) && $(CROSSTARGET)-gcc dummy.c -o dummy
|
||||
|
||||
# Must be using a runtime linker from $(TOOLS_DIR)
|
||||
#cd $(DIR_APP) && readelf -l dummy | grep "Requesting program interpreter: $(TOOLS_DIR)"
|
||||
cd $(DIR_APP) && readelf -l dummy | grep "Requesting program interpreter: /lib64/ld-linux-loongarch-lp64d.so.1"
|
||||
cd $(DIR_APP) && readelf -l dummy | grep "Requesting program interpreter: $(TOOLS_DIR)"
|
||||
cd $(DIR_APP) && rm -vf dummy dummy.c
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user