From ef80a64393032cd90c5ff7453d612b6212625221 Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Mon, 8 Aug 2016 19:45:57 +1000 Subject: host-tools plugin: install prefixed binutils and strip binaries --- plugins/examples/host-toolchain/binutils-host.mk | 14 +++++++++++++- plugins/examples/host-toolchain/gcc-host.mk | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/plugins/examples/host-toolchain/binutils-host.mk b/plugins/examples/host-toolchain/binutils-host.mk index bed45ea..72d9acd 100644 --- a/plugins/examples/host-toolchain/binutils-host.mk +++ b/plugins/examples/host-toolchain/binutils-host.mk @@ -15,12 +15,24 @@ define $(PKG)_UPDATE echo $(binutils_VERSION) endef +$(PKG)_PROGS := addr2line ar as c++filt dlltool dllwrap elfedit gprof \ + ld.bfd ld nm objcopy objdump ranlib readelf size strings \ + strip windmc windres + define $(PKG)_BUILD $(subst --disable-werror,\ --disable-werror \ --prefix='$(PREFIX)/$(TARGET)' \ + --program-prefix='$(TARGET)-' \ --host='$(TARGET)',\ - $(binutils_BUILD)) + $(subst install, install-strip,\ + $(binutils_BUILD))) + + # install unprefixed versions also + for p in $($(PKG)_PROGS); do \ + cp "$(PREFIX)/$(TARGET)/bin/$(TARGET)-$$p.exe" \ + "$(PREFIX)/$(TARGET)/bin/$$p.exe" ; \ + done # tools seem to be duplicates of '$(PREFIX)/$(TARGET)' rm -rf '$(PREFIX)/$(TARGET)/$(TARGET)' diff --git a/plugins/examples/host-toolchain/gcc-host.mk b/plugins/examples/host-toolchain/gcc-host.mk index 2ccc644..e96dcb4 100644 --- a/plugins/examples/host-toolchain/gcc-host.mk +++ b/plugins/examples/host-toolchain/gcc-host.mk @@ -40,7 +40,7 @@ define $(PKG)_BUILD $($(PKG)_CONFIGURE_OPTS) $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' - $(MAKE) -C '$(BUILD_DIR)' -j 1 install + $(MAKE) -C '$(BUILD_DIR)' -j 1 install-strip # shared libgcc isn't installed to version-specific locations # so install correctly to simplify cleanup (see gcc.mk) -- cgit v0.12