diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-05-13 23:47:43 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-05-14 00:08:58 (EDT) |
commit | a6a280b5f0c6027cce0f55039e704ae5fd7b2d9e (patch) | |
tree | cf11b547bf94b94fa6ef850a241f0b088d9b92df | |
parent | 8ee3bcc7ea1eea5aa97c0b30b8a8fb2ff9182bd7 (diff) |
build: Post-process directories
-rwxr-xr-x | build | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -16,6 +16,7 @@ install_targets = install-$(OPK_HOST_ARCH) installnative_targets = installnative-$(OPK_HOST_ARCH) installcross_targets = installcross-$(OPK_HOST_ARCH) +version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | sed 's/+sip.*//') base_version = $$(printf '%s\n' '$(OPK_SOURCE)' | sed 's/^gcc-//') target = $$(printf '%s' '$@' | sed 's/^[a-z]*-//') @@ -63,8 +64,12 @@ bootstrap1_opts = \ --disable-libgomp \ --disable-libssp +libdir = $(destdir)/usr/lib/$(OPK_HOST_ARCH) +gcclibdir = $(destdir)/usr/lib/$(OPK_HOST_ARCH)/gcc-$(base_version) +tgtlibdir = $(destdir)/usr/lib/$(OPK_HOST_ARCH)/$(target)/gcc-$(base_version) +libsuffix = $$(g++ -print-multi-os-directory) dir_macros = \ - user_tooldir_prefix="/usr/lib/$(target)/gcc-$(base_version)" \ + user_tooldir_prefix=$(tgtlibdir) \ gcc_gxx_tool_include_dir="/usr/include/$(target)/c++-$(base_version)" extra_opts = @@ -169,6 +174,11 @@ $(installnative_targets): mv $(destdir)/usr/bin/$${f} $(destdir)/usr/bin/$(target)-$${f};\ ln -s $(target)-$${f} $(destdir)/usr/bin/$${f}; \ done + # Move files into ProteanOS-style directories. + mkdir -p $(tgtlibdir) + mv $(libdir)/gcc/$(target_gnu)/$(version)/* $(tgtlibdir) + mkdir -p $(gcclibdir) + mv $(libdir)/$(libsuffix)/* $(gcclibdir) # Move libstdc++.so link. rm -f $(destdir)/usr/lib/$(target)/libstdc++.so ln -sf /usr/lib/$(target)/libstdc++.so.6 \ @@ -265,6 +275,9 @@ $(installcross_targets): for f in $(destdir)/usr/bin/*; do f="$${f##*/}"; \ mv $(destdir)/usr/bin/$${f} $(destdir)/usr/bin/$(target)-$${f};\ done + # Move files into ProteanOS-style directories. + mkdir -p $(tgtlibdir) + mv $(libdir)/gcc/$(target_gnu)/$(version)/* $(tgtlibdir) libdir=/usr/lib/$(target) && \ rm -Rf \ $(destdir)$${libdir}/gcc-$(base_version)/liblto_plugin.la \ |