Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(bugfix):pac sim elf ONLY in Linux platform #14800

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions boards/sim/sim/sim/scripts/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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