summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-04-21 17:26:23 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-04-21 17:26:23 (EDT)
commit930cd90ac23dff5bdc624b1b2461ec8b2d172335 (patch)
treefcb632bd9d72bb069f640bc1321ac7e55245441a /build
parent2d5de4978845ef847cc21c75cfd6ddda2e843ef6 (diff)
build: Change the target prefix of /usr/bin/*.
Diffstat (limited to 'build')
-rwxr-xr-xbuild9
1 files changed, 9 insertions, 0 deletions
diff --git a/build b/build
index 64106ef..75d38e0 100755
--- a/build
+++ b/build
@@ -77,6 +77,15 @@ install: build
libsubincludedir=/usr/lib/$(OPK_HOST_ARCH)/gcc-$(BASE_VERSION) \
fincludedir=/usr/lib/$(OPK_HOST_ARCH)/gcc-$(BASE_VERSION)/finclude \
toolexeclibdir=/usr/lib/$(OPK_HOST_ARCH) MULTIOSDIR=
+ # Change the target architecture prefix of files in /usr/bin.
+ rm -f dest/usr/bin/*-gcc-$(BASE_VERSION).*
+ for f in c++ g++ gcc gcc-ar gcc-nm gcc-ranlib; do \
+ mv dest/usr/bin/*-$${f}-$(BASE_VERSION) \
+ dest/usr/bin/$(OPK_HOST_ARCH)-$$(printf '%s' \
+ dest/usr/bin/*-$${f}-$(BASE_VERSION) | \
+ sed "s/^.*-\($${f}\)/\1/"); \
+ done
+ # Remove the internal libiberty.a.
rm -f dest/usr/lib/$(OPK_HOST_ARCH)/libiberty.a
# Move libstdc++.so link.
rm -f dest/usr/lib/$(OPK_HOST_ARCH)/libstdc++.so