forked from nuttx/nuttx-update
build(bugfix):pac sim elf ONLY in Linux platform
avoid SIM compilation post build issues on other platforms Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
parent
f2949f84a3
commit
71b169e5fd
1 changed files with 14 additions and 12 deletions
|
@ -330,15 +330,17 @@ else ifeq ($(CONFIG_HOST_MACOS),)
|
|||
LDFLAGS += -Wl,-no-pie
|
||||
endif
|
||||
|
||||
define POSTBUILD
|
||||
$(Q)echo "Pac SIM with dynamic libs..";
|
||||
@ rm -rf sim-pac;
|
||||
@ mkdir -p sim-pac/libs;
|
||||
@ cp nuttx sim-pac/nuttx;
|
||||
@ ldd sim-pac/nuttx | grep "=> /" | awk '{print $$3}' | xargs -I '{}' cp -v '{}' sim-pac/libs;
|
||||
@ readelf -l nuttx | grep "program interpreter" | awk -F':' '{print $$2}'| cut -d"]" -f1 | xargs -I '{}' cp -v '{}' sim-pac;
|
||||
@ cp $(TOPDIR)/tools/simlaunch.sh sim-pac;
|
||||
@ tar -czf nuttx.tgz sim-pac;
|
||||
$(Q)echo "SIM elf with dynamic libs archive in nuttx.tgz"
|
||||
@ rm -rf sim-pac;
|
||||
endef
|
||||
ifeq ($(CONFIG_HOST_LINUX),y)
|
||||
define POSTBUILD
|
||||
$(Q)echo "Pac SIM with dynamic libs..";
|
||||
@ rm -rf sim-pac;
|
||||
@ mkdir -p sim-pac/libs;
|
||||
@ cp nuttx sim-pac/nuttx;
|
||||
@ ldd sim-pac/nuttx | grep "=> /" | awk '{print $$3}' | xargs -I '{}' cp -v '{}' sim-pac/libs;
|
||||
@ readelf -l nuttx | grep "program interpreter" | awk -F':' '{print $$2}'| cut -d"]" -f1 | xargs -I '{}' cp -v '{}' sim-pac;
|
||||
@ cp $(TOPDIR)/tools/simlaunch.sh sim-pac;
|
||||
@ tar -czf nuttx.tgz sim-pac;
|
||||
$(Q)echo "SIM elf with dynamic libs archive in nuttx.tgz"
|
||||
@ rm -rf sim-pac;
|
||||
endef
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue