diff options
Diffstat (limited to 'build')
-rwxr-xr-x | build | 30 |
1 files changed, 27 insertions, 3 deletions
@@ -84,6 +84,13 @@ $(install_targets): build fincludedir="$${libsubdir}/finclude" \ toolexeclibdir="/usr/lib/$(target)" \ MULTIOSDIR= + if [ "x$(target)" = 'x$(OPK_HOST_ARCH)' ]; then \ + $(MAKE) -f ../build "installnative-$(target)"; \ + else \ + $(MAKE) -f ../build "installcross-$(target)"; \ + fi + +$(installnative_targets): # Change the target architecture prefix of files in /usr/bin. rm -f $(destdir)/usr/bin/*-gcc-$(base_version).* for f in c++ g++ gcc gcc-ar gcc-nm gcc-ranlib; do \ @@ -192,9 +199,6 @@ $(install_targets): build gcc-$(base_version)-$(target) \ cpp-$(base_version)-$(target) \ g++-$(base_version)-$(target) \ - "; \ - if [ "x$(target)" = 'x$(OPK_HOST_ARCH)' ]; then \ - OPK_PACKAGES="$${OPK_PACKAGES} \ libgcc.1 \ libssp.0 \ libgomp.1 \ @@ -209,6 +213,26 @@ $(install_targets): build export OPK_PACKAGES; \ oh-installfiles -d "$(destdir)" +$(installcross_targets): + # Change the target architecture prefix of files in /usr/bin. + rm -f $(destdir)/usr/bin/*-gcc-$(base_version).* + for f in c++ g++ gcc gcc-ar gcc-nm gcc-ranlib; do \ + rm -f $(destdir)/usr/bin/$${f}-$(base_version); \ + mv $(destdir)/usr/bin/*-$${f}-$(base_version) \ + $(destdir)/usr/bin/$(target)-$$(printf '%s' \ + $(destdir)/usr/bin/*-$${f}-$(base_version) | \ + sed "s/^.*-\($${f}\)/\1/"); \ + done + oh-fixperms -d "$(destdir)" + oh-strip -d "$(destdir)" + OPK_PACKAGES="\ + gcc-$(base_version)-$(target) \ + cpp-$(base_version)-$(target) \ + g++-$(base_version)-$(target) \ + "; \ + export OPK_PACKAGES; \ + oh-installfiles -d "$(destdir)" + install: $(install_targets) # POSIX.1-2008: |