summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2016-08-08 18:22:01 (GMT)
committerGitHub <noreply@github.com>2016-08-08 18:22:01 (GMT)
commitdf2b30d8ef5c7682a9fb4bbf4d3aacabfe2173be (patch)
tree39397e17d5b74b1bb9e0328058d638e476d0c40c
parentbb7f5c57f5278a80b22d9b8c3e9bc4c48b14e80a (diff)
parentef80a64393032cd90c5ff7453d612b6212625221 (diff)
downloadmxe-df2b30d8ef5c7682a9fb4bbf4d3aacabfe2173be.zip
mxe-df2b30d8ef5c7682a9fb4bbf4d3aacabfe2173be.tar.gz
mxe-df2b30d8ef5c7682a9fb4bbf4d3aacabfe2173be.tar.bz2
Merge pull request #1480 from tonytheodore/host-prefix
host-tools plugin: install prefixed binutils and strip binaries
-rw-r--r--plugins/examples/host-toolchain/binutils-host.mk14
-rw-r--r--plugins/examples/host-toolchain/gcc-host.mk2
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)