summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore10
-rw-r--r--binutils-2.22.tar.bz2bin0 -> 19973532 bytes
-rw-r--r--binutils-doc.pkg/control6
-rw-r--r--binutils-doc.pkg/install1
-rw-r--r--binutils.pkg.in/control7
-rw-r--r--binutils.pkg.in/install1
-rw-r--r--build.in58
-rw-r--r--changelog5
-rwxr-xr-xconfig72
-rw-r--r--control4
-rw-r--r--format1
-rw-r--r--libbfd-dev.pkg.in/control6
-rw-r--r--libbfd-dev.pkg.in/install4
13 files changed, 175 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0010687
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+# Swap and backup files
+.*.sw*
+.sw*
+*~
+Session.vim
+
+# Generated files
+build
+binutils-*-*-*.pkg/
+libbfd-dev-*-*-*.pkg/
diff --git a/binutils-2.22.tar.bz2 b/binutils-2.22.tar.bz2
new file mode 100644
index 0000000..5aefc55
--- /dev/null
+++ b/binutils-2.22.tar.bz2
Binary files differ
diff --git a/binutils-doc.pkg/control b/binutils-doc.pkg/control
new file mode 100644
index 0000000..8bf056d
--- /dev/null
+++ b/binutils-doc.pkg/control
@@ -0,0 +1,6 @@
+Package: binutils-doc
+Architecture: all
+Depends: binutils (= ${binary:Version})
+Description: GNU binary utilities - documentation
+ This package provides the manual and info pages for the GNU assembler, linker,
+ and various other utilities for manipulating binary files.
diff --git a/binutils-doc.pkg/install b/binutils-doc.pkg/install
new file mode 100644
index 0000000..8a62a0f
--- /dev/null
+++ b/binutils-doc.pkg/install
@@ -0,0 +1 @@
+/usr/share
diff --git a/binutils.pkg.in/control b/binutils.pkg.in/control
new file mode 100644
index 0000000..e057228
--- /dev/null
+++ b/binutils.pkg.in/control
@@ -0,0 +1,7 @@
+Package: binutils-@PKG_TARGET_ARCH@
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: GNU binary utilities for @PKG_TARGET_ARCH@
+ This package provides the GNU assembler, linker, and various other utilities
+ for manipulating binary files. These utilities are commonly used with a
+ compiler to build programs.
diff --git a/binutils.pkg.in/install b/binutils.pkg.in/install
new file mode 100644
index 0000000..415f082
--- /dev/null
+++ b/binutils.pkg.in/install
@@ -0,0 +1 @@
+/usr/bin
diff --git a/build.in b/build.in
new file mode 100644
index 0000000..31a1260
--- /dev/null
+++ b/build.in
@@ -0,0 +1,58 @@
+#! /usr/bin/make -f
+
+PKG_TARGET_ARCH = @PKG_TARGET_ARCH@
+PKG_TARGET_ARCH_GNU = @PKG_TARGET_ARCH_GNU@
+
+CFLAGS = -g -O2
+
+configure: configure.stamp
+configure.stamp:
+ mkdir build
+ # Generate the main makefile.
+ # Use shared BFD and opcodes libraries for all utilities.
+ # Don't enable multilib (multiarch is better).
+ # Enable plugins.
+ # Don't expect to find Gettext.
+ cd build && \
+ CFLAGS='$(CFLAGS)' ../src/configure \
+ --prefix=/usr --with-sysroot=/ \
+ --program-transform-name='s&^&$(PKG_TARGET_ARCH)-&' \
+ --enable-shared --disable-multilib \
+ --enable-plugins --disable-nls \
+ --build=$(OH_BUILD_ARCH_GNU) --host=$(OH_HOST_ARCH_GNU) \
+ --target=$(PKG_TARGET_ARCH_GNU)
+ # Generate all the individual program makefiles.
+ cd build && make configure-host
+ touch $@
+
+build: build.stamp
+build.stamp: configure
+ # Build BFD header files.
+ cd build/bfd && make headers
+ # Build ALL the things!
+ cd build && make CFLAGS='$(CFLAGS)'
+ touch $@
+
+install: install.stamp
+install.stamp: build
+ # Install everything.
+ cd build && \
+ make CFLAGS='$(CFLAGS)' prefix="$${PWD}/../dest" install
+ # Remove static library dependency metadata generated by libtool.
+ rm -f ../dest/usr/lib/*.la
+ touch $@
+
+binary-arch: install
+ oh-strip
+ oh-installfiles
+ oh-installdocs binutils
+ oh-gencontrol
+ oh-buildopk
+
+binary-indep: install
+ oh-installfiles
+ oh-installdocs binutils
+ oh-gencontrol
+ oh-buildopk
+
+binary: binary-arch binary-indep
diff --git a/changelog b/changelog
new file mode 100644
index 0000000..39fe479
--- /dev/null
+++ b/changelog
@@ -0,0 +1,5 @@
+binutils (2.22-1) trunk
+
+ * Initial release.
+
+ -- "P. J. McDermott" <pjm@nac.net> Fri, 27 Jul 2012 03:35:50 -0400
diff --git a/config b/config
new file mode 100755
index 0000000..4cddfcd
--- /dev/null
+++ b/config
@@ -0,0 +1,72 @@
+#! /bin/sh
+
+set -e
+
+TARGET_PKGS='binutils libbfd-dev'
+
+main()
+{
+ case "${1}" in
+ clean)
+ clean
+ ;;
+ *)
+ get_config_values
+ configure_build
+ ;;
+ esac
+}
+
+msg()
+{
+ printf 'binutils config: '
+ printf "${@}"
+ printf '\n'
+}
+
+get_config_values()
+{
+ if [ -z "${PKG_TARGET_ARCH}" ]; then
+ msg 'Error: No target architecture specified.' >&2
+ exit 1
+ fi
+
+ # FIXME: Lookup GNU system type.
+ export PKG_TARGET_ARCH_GNU=arm-cortex_a8-linux-gnu
+}
+
+configure_build()
+{
+ # Generate a sed script to edit files.
+ _ss=
+ for _name in TARGET_ARCH TARGET_ARCH_GNU; do
+ _ss="${_ss}s&@PKG_${_name}@&$(eval echo \$\{PKG_${_name}\})&;"
+ done
+
+ # Write a build makefile with the configuration values.
+ sed "${_ss}" build.in >build
+ chmod a+x build
+ msg '"build" file generated.'
+
+ # Write metadata for <pkgbase>-<target> packages.
+ for _pkg in ${TARGET_PKGS}; do
+ mkdir -p "${_pkg}-${PKG_TARGET_ARCH}.pkg"
+ sed "${_ss}" "${_pkg}.pkg.in/control" \
+ >"${_pkg}-${PKG_TARGET_ARCH}.pkg/control"
+ msg 'Metadata for package "%s" generated.' \
+ "${_pkg}-${PKG_TARGET_ARCH}"
+ done
+}
+
+clean()
+{
+ # Remove generated build makefile.
+ rm -f build
+
+ # Remove generated metadata for <pkgbase>-<target> packages.
+ for _pkg in ${TARGET_PKGS}; do
+ rm -Rf "${_pkg}"-*-*-*.pkg/
+ done
+}
+
+main "${@}"
diff --git a/control b/control
new file mode 100644
index 0000000..e8e6f3f
--- /dev/null
+++ b/control
@@ -0,0 +1,4 @@
+Source: binutils
+Maintainer: "P. J. McDermott" <pjm@nac.net>
+Build-Depends: libz-dev
+Homepage: https://www.gnu.org/software/binutils/
diff --git a/format b/format
new file mode 100644
index 0000000..cd5ac03
--- /dev/null
+++ b/format
@@ -0,0 +1 @@
+2.0
diff --git a/libbfd-dev.pkg.in/control b/libbfd-dev.pkg.in/control
new file mode 100644
index 0000000..c4c8e80
--- /dev/null
+++ b/libbfd-dev.pkg.in/control
@@ -0,0 +1,6 @@
+Package: libbfd-dev-@PKG_TARGET_ARCH@
+Architecture: any
+Depends: binutils (= ${binary:Version})
+Description: GNU BFD development files for @PKG_TARGET_ARCH@
+ This package provides header files and static libraries for the GNU Binary File
+ Descriptor library, used by GNU Binutils and GDB.
diff --git a/libbfd-dev.pkg.in/install b/libbfd-dev.pkg.in/install
new file mode 100644
index 0000000..656afa1
--- /dev/null
+++ b/libbfd-dev.pkg.in/install
@@ -0,0 +1,4 @@
+/usr/lib/*.a
+/usr/lib/libbfd.so
+/usr/lib/libopcodes.so
+/usr/include