summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--binutils-doc.pkg.in/install1
-rw-r--r--binutils.pkg.in/install5
-rwxr-xr-xbuild28
-rw-r--r--libbfd-dev.pkg.in/install6
4 files changed, 18 insertions, 22 deletions
diff --git a/binutils-doc.pkg.in/install b/binutils-doc.pkg.in/install
deleted file mode 100644
index 8a62a0f..0000000
--- a/binutils-doc.pkg.in/install
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share
diff --git a/binutils.pkg.in/install b/binutils.pkg.in/install
deleted file mode 100644
index 2154c1f..0000000
--- a/binutils.pkg.in/install
+++ /dev/null
@@ -1,5 +0,0 @@
-/usr/bin
-/usr/lib/*/*.x*
-/usr/lib/*/*/libbfd-*.so
-/usr/lib/*/*/libopcodes-*.so
-/etc
diff --git a/build b/build
index fe35207..4be17b9 100755
--- a/build
+++ b/build
@@ -56,7 +56,8 @@ install: build
# All of these macro settings are effective thanks to
# `patches/01_pass-some-dirs-to-child-makes.patch`.
for target in $$(cat ../targets); do \
- oh-autoinstall -B "build-$${target}" CFLAGS='$(CFLAGS)' \
+ oh-autoinstall -B "build-$${target}" -d "binutils-$${target}.data" \
+ CFLAGS='$(CFLAGS)' \
tooldir='/usr/tool' scriptdir="/usr/lib/$${target}" \
bfdlibdir="/usr/lib/$(OPK_HOST_ARCH)/$${target}" \
bfdincludedir="/usr/include/$(OPK_HOST_ARCH)/$${target}" || \
@@ -65,11 +66,16 @@ install: build
# /usr/tool/bin (TOOLBINDIR) contains hard links to tools. A quick look at
# the code suggests we don't need them; ld *should* work without them in any
# sane configuration.
- rm -Rf dest/usr/tool
# We don't need a static libiberty.
- find dest/usr/lib -name 'libiberty.a' -exec rm -f '{}' ';'
# Remove static library dependency metadata generated by libtool.
- find dest/usr/lib -name '*.la' -exec rm -f '{}' ';'
+ for target in $$(cat ../targets); do \
+ rm -Rf "binutils-$${target}.data/usr/tool" && \
+ find "binutils-$${target}.data/usr/lib" -name 'libiberty.a' \
+ -exec rm -f '{}' ';' && \
+ find "binutils-$${target}.data/usr/lib" -name '*.la' \
+ -exec rm -f '{}' ';' || \
+ exit 1; \
+ done
# Make symbolic links to native utilities.
for target in $$(cat ../targets); do \
if [ '$(OPK_HOST_ARCH)' = "$${target}" ]; then \
@@ -79,17 +85,19 @@ install: build
fi; \
done
# Write GNU ld configuration to point to BFD libraries.
- mkdir -p dest/etc/ld.so.conf.d
for target in $$(cat ../targets); do \
+ mkdir -p "binutils-$${target}.data/etc/ld.so.conf.d" && \
echo '# GNU BFD libraries' \
- >"dest/etc/ld.so.conf.d/bfd_$(OPK_HOST_ARCH)_$${target}" && \
+ >"binutils-$${target}.data/etc/ld.so.conf.d/bfd_$(OPK_HOST_ARCH)_$${target}" && \
echo "/usr/lib/$(OPK_HOST_ARCH)/$${target}" \
- >>"dest/etc/ld.so.conf.d/bfd_$(OPK_HOST_ARCH)_$${target}"; \
+ >>"binutils-$${target}.data/etc/ld.so.conf.d/bfd_$(OPK_HOST_ARCH)_$${target}"; \
done
# Post-process and install everything.
- oh-fixperms
- oh-strip
- oh-installfiles
+ for target in $$(cat ../targets); do \
+ oh-fixperms -d "binutils-$${target}.data" && \
+ oh-strip -d "binutils-$${target}.data" || \
+ exit 1; \
+ done
clean:
for target in $$(cat ../targets); do \
diff --git a/libbfd-dev.pkg.in/install b/libbfd-dev.pkg.in/install
deleted file mode 100644
index 536667b..0000000
--- a/libbfd-dev.pkg.in/install
+++ /dev/null
@@ -1,6 +0,0 @@
-/usr/lib/*/libiberty.a
-/usr/lib/*/*/libbfd.a
-/usr/lib/*/*/libbfd.so
-/usr/lib/*/*/libopcodes.a
-/usr/lib/*/*/libopcodes.so
-/usr/include