summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebRmv2015-06-07 09:16:50 +0200
committerSebRmv2015-06-07 09:16:50 +0200
commit40e8639f1ad63489ee416ecb7546e69104af4c4b (patch)
tree334a26c482abd9c21644f91a5a93c570365b0402
downloadaur-40e8639f1ad63489ee416ecb7546e69104af4c4b.tar.gz
Initial import.
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD68
-rw-r--r--binutils-2.23.2-mint-20130327.patch.bz2bin0 -> 21762 bytes
-rw-r--r--tc-m68k.c.patch29
4 files changed, 117 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..766a2b722af7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = m68k-atari-mint-binutils
+ pkgdesc = A set of programs to assemble and manipulate binary and object files for the M68K architecture
+ pkgver = 2.23.2
+ pkgrel = 4
+ url = http://www.gnu.org/software/binutils/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = glibc
+ conflicts = cross-m68k-atari-mint-binutils
+ replaces = cross-m68k-atari-mint-binutils
+ source = ftp://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.bz2
+ source = binutils-2.23.2-mint-20130327.patch.bz2
+ source = tc-m68k.c.patch
+ sha1sums = 042c51073205ebaf88c272d6168f9deb71984b56
+ sha1sums = d6c21353905e24e3f3f410e4251866dc3ed6af8c
+ sha1sums = c76e49cf19ece5bf01d9d67274950f078ce30fe2
+
+pkgname = m68k-atari-mint-binutils
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..eafac9948f0e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,68 @@
+# Contributor: SebRmv <sbriais at-symbol free dot fr>
+# PKGBUILD based on mipsel-linux-gnu-binutils
+# (make by: Vojtech Horky <vojta . horky at-symbol seznam . cz>)
+pkgname=m68k-atari-mint-binutils
+_pkgname=binutils
+_target="m68k-atari-mint"
+pkgver=2.23.2
+pkgrel=4
+pkgdesc="A set of programs to assemble and manipulate binary and object files for the M68K architecture"
+url="http://www.gnu.org/software/binutils/"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('glibc')
+replaces=('cross-m68k-atari-mint-binutils')
+conflicts=('cross-m68k-atari-mint-binutils')
+source=("ftp://ftp.gnu.org/gnu/binutils/${_pkgname}-${pkgver}.tar.bz2" "binutils-2.23.2-mint-20130327.patch.bz2" "tc-m68k.c.patch")
+sha1sums=('042c51073205ebaf88c272d6168f9deb71984b56' 'd6c21353905e24e3f3f410e4251866dc3ed6af8c' 'c76e49cf19ece5bf01d9d67274950f078ce30fe2')
+_sysroot="/usr/lib/${_target}"
+
+prepare() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ patch -Np1 < ../binutils-2.23.2-mint-20130327.patch
+ patch -p0 < ../tc-m68k.c.patch
+}
+
+build() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ CFLAGS=${CFLAGS//-D_FORTIFY_SOURCE=?/}
+ export CFLAGS
+
+ CPPFLAGS=${CPPFLAGS//-D_FORTIFY_SOURCE=?/}
+ export CPPFLAGS
+
+ ./configure \
+ "--prefix=${_sysroot}" \
+ "--bindir=/usr/bin" "--program-prefix=${_target}-" \
+ "--with-sysroot=${_sysroot}" \
+ "--target=${_target}" "--build=$CHOST" "--host=$CHOST" \
+ "--disable-nls" \
+ || return 1
+
+ make all || return 1
+}
+
+package() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install || return 1
+
+ msg "Removing duplicit files..."
+ # remove these files as they are already in the system
+ # (with native binutils)
+ rm -Rf ${pkgdir}${_sysroot}/share/{man,info}
+ # remove conflicting binaries
+ find ${pkgdir}/usr/bin/ -type f -not -name 'm68k-atari-mint*' -delete
+
+ msg "Creating out-of-path executables..."
+ # symlink executables to single directory with no-arch-prefix name
+ mkdir -p ${pkgdir}/usr/bin/cross/${_target}/;
+ cd ${pkgdir}/usr/bin/cross/${_target}/;
+ for bin in ${pkgdir}/usr/bin/${_target}-*; do
+ bbin=`basename "$bin"`;
+ ln -s "/usr/bin/${bbin}" `echo "$bbin" | sed "s#^${_target}-##"`;
+ done
+}
+
diff --git a/binutils-2.23.2-mint-20130327.patch.bz2 b/binutils-2.23.2-mint-20130327.patch.bz2
new file mode 100644
index 000000000000..64d2ca415828
--- /dev/null
+++ b/binutils-2.23.2-mint-20130327.patch.bz2
Binary files differ
diff --git a/tc-m68k.c.patch b/tc-m68k.c.patch
new file mode 100644
index 000000000000..e51b6f3a3bac
--- /dev/null
+++ b/tc-m68k.c.patch
@@ -0,0 +1,29 @@
+--- gas/config/tc-m68k.c 2012-05-16 12:26:47.000000000 +0200
++++ gas/config/tc-m68k.c 2013-11-24 12:36:00.639003638 +0100
+@@ -4782,6 +4782,26 @@
+ record_alignment (data_section, 2);
+ record_alignment (bss_section, 2);
+ #endif
++
++ {
++ unsigned int cpu = bfd_mach_m68020;
++ if(selected_cpu) {
++ switch(selected_cpu->arch) {
++ case m68000:
++ cpu = bfd_mach_m68000;
++ break;
++ case m68010:
++ cpu = bfd_mach_m68010;
++ break;
++ default:
++ cpu = bfd_mach_m68020;
++ break;
++ }
++ }
++
++ if (! bfd_set_arch_mach (stdoutput, bfd_arch_m68k, cpu))
++ as_warn (_("could not set architecture and machine"));
++ }
+ }
+
+