summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-05-16 19:25:34 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-05-16 19:25:34 (EDT)
commitdd17bb5f9fe1f809d5b30d077a634eb88da37149 (patch)
tree67075c345e7b4b74fd270477382f3f12cdb2a71b
parentcfcb080ccdd5b40b3713ff4691261dc778b7d4d0 (diff)
gcc-*-*-*-*: Move start files and libs to host-indep dir
-rwxr-xr-xbuild66
-rw-r--r--gcc.pkg.in/files14
2 files changed, 53 insertions, 27 deletions
diff --git a/build b/build
index 91a4360..2595e78 100755
--- a/build
+++ b/build
@@ -64,13 +64,20 @@ bootstrap1_opts = \
--disable-libgomp \
--disable-libssp
+# Defaults:
libdir = /usr/lib/$(OPK_HOST_ARCH)
-tgtlibdir = /usr/lib/$(OPK_HOST_ARCH)/$(target)/gcc-$(base_version)
-tgtincdir = /usr/include/$(target)/c++-$(base_version)
+libsubdir = /usr/lib/$(OPK_HOST_ARCH)/gcc/$(target_gnu)/$(version)
libsuffix = $$(g++ -print-multi-os-directory)
+# Customs:
+exec_prefix = /usr/lib/$(OPK_HOST_ARCH)/$(target)/gcc-$(base_version)
+startfile_prefix = /usr/lib/$(target)/gcc-$(base_version)
+include_prefix = /usr/lib/$(target)/gcc-$(base_version)
+gcc_gxx_tool_include_dir = /usr/include/$(target)/c++-$(base_version)
dir_macros = \
- user_tooldir_prefix=$(tgtlibdir) \
- gcc_gxx_tool_include_dir=$(tgtincdir)
+ "custom_exec_prefix=$(custom_exec_prefix)" \
+ "custom_startfile_prefix=$(custom_startfile_prefix)" \
+ "custom_include_prefix=$(custom_include_prefix)" \
+ "gcc_gxx_tool_include_dir=$(gcc_gxx_tool_include_dir)"
extra_opts =
native_target = bootstrap-lean
@@ -178,14 +185,25 @@ $(installnative_targets):
ln -s $(target)-g++-$(base_version) \
$(destdir)/usr/bin/$(target)-c++-$(base_version)
# Move files into ProteanOS-style directories.
- mkdir -p $(destdir)$(tgtlibdir)
- mv $(destdir)$(libdir)/gcc/$(target_gnu)/$(version)/* \
- $(destdir)$(tgtlibdir)
+ mkdir -p $(destdir)$(exec_prefix)
+ mv \
+ $(destdir)$(libsubdir)/cc1* \
+ $(destdir)$(libsubdir)/collect2 \
+ $(destdir)$(libsubdir)/lto* \
+ $(destdir)$(exec_prefix)
+ mkdir -p $(destdir)$(startfile_prefix)
+ mv \
+ $(destdir)$(libsubdir)/*.o \
+ $(destdir)$(libsubdir)/include* \
+ $(destdir)$(libsubdir)/*.a \
+ $(destdir)$(libsubdir)/*.spec \
+ $(destdir)$(libsubdir)/*.so \
+ $(destdir)$(startfile_prefix)
+ mkdir -p $(destdir)$(gcc_gxx_tool_include_dir)
+ mv $(destdir)/usr/include/c++-$(base_version)/$(target_gnu)/* \
+ $(destdir)$(gcc_gxx_tool_include_dir)
mkdir -p $(destdir)$(libdir)
mv $(destdir)$(libdir)/$(libsuffix)/* $(destdir)$(libdir)
- mkdir -p $(destdir)$(tgtincdir)
- mv $(destdir)/usr/include/c++-$(base_version)/$(target_gnu)/* \
- $(destdir)$(tgtincdir)
# Put libgcc_s.so.* under /lib.
mkdir -p $(destdir)/lib/$(OPK_HOST_ARCH)
mv $(destdir)$(libdir)/libgcc_s.so.* $(destdir)/lib/$(OPK_HOST_ARCH)
@@ -197,8 +215,8 @@ $(installnative_targets):
rm -f \
$(destdir)$(libdir)/*.la \
$(destdir)$(libdir)/*.a \
- $(destdir)$(tgtlibdir)/*.la \
- $(destdir)$(tgtlibdir)/plugin/*.la
+ $(destdir)$(libsubdir)/*.la \
+ $(destdir)$(libsubdir)/plugin/*.la
# Remove the info directory node.
rm -f $(destdir)/usr/share/info/dir
# Remove empty documentation files.
@@ -208,14 +226,14 @@ $(installnative_targets):
-exec rm -f '{}' ';'
# TODO: Provide these files in a fixincludes package (arch:any,
# target-specific?).
- rm -Rf $(destdir)$(tgtlibdir)/install-tools/
+ rm -Rf $(destdir)$(libsubdir)/install-tools/
# TODO: Provide these files in a libstdc++-*-dbg package.
rm -f $(destdir)$(libdir)/libstdc++.so.*-gdb.py
rm -Rf $(destdir)/usr/share/gcc-$(version)/python/libstdcxx/
# TODO: Provide these files in a doc package.
rm -Rf $(destdir)/usr/share/man/ $(destdir)/usr/share/info/
# TODO: Provide these files in a gcc-*-plugin-dev package.
- rm -Rf $(destdir)$(tgtlibdir)/plugin/
+ rm -Rf $(destdir)$(libsubdir)/plugin/
oh-fixperms -d "$(destdir)"
oh-strip -d "$(destdir)"
OPK_PACKAGES="\
@@ -238,13 +256,21 @@ $(installcross_targets):
ln -s $(target)-g++-$(base_version) \
$(destdir)/usr/bin/$(target)-c++-$(base_version)
# Move files into ProteanOS-style directories.
- mkdir -p $(destdir)$(tgtlibdir)
- mv $(destdir)$(libdir)/gcc/$(target_gnu)/$(version)/* \
- $(destdir)$(tgtlibdir)
+ mkdir -p $(destdir)$(exec_prefix)
+ mv \
+ $(destdir)$(libsubdir)/cc1* \
+ $(destdir)$(libsubdir)/collect2 \
+ $(destdir)$(libsubdir)/lto* \
+ $(destdir)$(exec_prefix)
rm -Rf \
- $(destdir)$(tgtlibdir)/*.la \
- $(destdir)$(tgtlibdir)/install-tools \
- $(destdir)$(tgtlibdir)/plugin \
+ $(destdir)$(libsubdir)/*.o \
+ $(destdir)$(libsubdir)/include* \
+ $(destdir)$(libsubdir)/*.a \
+ $(destdir)$(libsubdir)/*.la \
+ $(destdir)$(libsubdir)/*.spec \
+ $(destdir)$(libsubdir)/*.so \
+ $(destdir)$(libsubdir)/install-tools \
+ $(destdir)$(libsubdir)/plugin \
$(destdir)/usr/share/locale \
$(destdir)/usr/share/man \
$(destdir)/usr/share/info
diff --git a/gcc.pkg.in/files b/gcc.pkg.in/files
index 5940e28..89c99fe 100644
--- a/gcc.pkg.in/files
+++ b/gcc.pkg.in/files
@@ -1,12 +1,12 @@
/usr/bin/*gcc-*
/usr/bin/*gcov-*
/usr/lib/*/*/gcc-*/collect2
-/usr/lib/*/*/gcc-*/*.o
-/usr/lib/*/*/gcc-*/include-fixed/
-/usr/lib/*/*/gcc-*/include/
-/usr/lib/*/*/gcc-*/*.a
-/usr/lib/*/*/gcc-*/*.so*
/usr/lib/*/*/gcc-*/lto-wrapper
/usr/lib/*/*/gcc-*/lto1
-/usr/lib/*/*.spec
-/usr/lib/*/*.so
+/usr/lib/*/gcc-*/*.o
+/usr/lib/*/gcc-*/include-fixed/
+/usr/lib/*/gcc-*/include/
+/usr/lib/*/gcc-*/*.a
+/usr/lib/*/gcc-*/*.so*
+/usr/lib/*.spec
+/usr/lib/*.so