summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanez Zemva2017-09-04 20:45:06 +0200
committerJanez Zemva2017-09-04 20:45:06 +0200
commit45ca6d81a9cccb49bd19c633e3909f3b02c8bc93 (patch)
tree5a619225c35d2a26393c56e67066df1de4631068
downloadaur-45ca6d81a9cccb49bd19c633e3909f3b02c8bc93.tar.gz
initial commit
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD58
-rw-r--r--lto-discard.patch17
-rw-r--r--xtors.patch30
4 files changed, 129 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..68e5a877b6c3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = dosbox-binutils
+ pkgdesc = Binutils for the gcc dosbox cross-compiler
+ pkgver = 2.29
+ pkgrel = 1
+ url = http://www.gnu.org/software/binutils
+ arch = i686
+ arch = x86_64
+ groups = djgpp
+ license = GPL
+ depends = zlib
+ options = !libtool
+ options = !emptydirs
+ source = http://ftp.gnu.org/gnu/binutils/binutils-2.29.tar.bz2
+ source = http://ftp.gnu.org/gnu/binutils/binutils-2.29.tar.bz2.sig
+ source = xtors.patch
+ source = lto-discard.patch
+ validpgpkeys = EAF1C276A747E9ED86210CBAC3126D3B4AE55E93
+ sha256sums = 29a29549869039aad75fdf507ac30366da5ad0b974fbff4a8e7148dbf4f40ebf
+ sha256sums = SKIP
+ sha256sums = a54efa3f29f14c938fedf29fb352d4f104e8c0ec065c74b0cd3f753fe3e9d4ef
+ sha256sums = a7978c3110dbccde7290fb3517121f5cae427728c04e6fb76736f36857514ec9
+
+pkgname = dosbox-binutils
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d8500887b535
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Contributor: carstene1ns <arch carsten-teibes de>
+# Contributor: felix <base64 -d <<< ZmVsaXgudm9uLnNAcG9zdGVvLmRlCg==>
+# Contributos: janezz55
+
+pkgname=dosbox-binutils
+pkgver=2.29
+pkgrel=1
+pkgdesc="Binutils for the gcc dosbox cross-compiler"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/binutils"
+license=('GPL')
+groups=('djgpp')
+depends=('zlib')
+options=('!libtool' '!emptydirs')
+source=("http://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2"
+ "http://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2.sig"
+ xtors.patch
+ lto-discard.patch)
+sha256sums=('29a29549869039aad75fdf507ac30366da5ad0b974fbff4a8e7148dbf4f40ebf'
+ 'SKIP'
+ 'a54efa3f29f14c938fedf29fb352d4f104e8c0ec065c74b0cd3f753fe3e9d4ef'
+ 'a7978c3110dbccde7290fb3517121f5cae427728c04e6fb76736f36857514ec9')
+validpgpkeys=('EAF1C276A747E9ED86210CBAC3126D3B4AE55E93') # Tristan Gingold <adacore dot com, gingold>
+_target="i586-pc-msdosdjgpp"
+
+prepare() {
+ cd binutils-$pkgver
+
+ # do not install libiberty
+ sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
+
+ # hack! - libiberty configure tests for header files break with FORTIFY_SOURCE
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
+
+ # put .ctors and .dtors where they belong
+ patch -Np1 < ../xtors.patch
+
+ # discard LTO sections in coff-go32-exe files
+ patch -Np1 < ../lto-discard.patch
+}
+
+build() {
+ mkdir -p binutils-$_target
+
+ cd binutils-$_target
+ ../binutils-$pkgver/configure --prefix=/usr \
+ --target="$_target" \
+ --infodir="/usr/share/info/$_target" \
+ --datadir="/usr/$_target/share" \
+ --enable-lto --enable-plugins \
+ --disable-multilib --disable-nls \
+ --disable-werror
+ make
+}
+
+package() {
+ make -C binutils-$_target DESTDIR="$pkgdir/" install
+}
diff --git a/lto-discard.patch b/lto-discard.patch
new file mode 100644
index 000000000000..931aa20e95ee
--- /dev/null
+++ b/lto-discard.patch
@@ -0,0 +1,17 @@
+--- binutils-2.29/ld/scripttempl/i386go32.sc
++++ binutils-2.29/ld/scripttempl/i386go32.sc
+@@ -19,6 +19,7 @@
+ *(SORT(.dtors.*))
+ *(.dtor) *(.dtors)
+ }'
++DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }"
+
+ cat <<EOF
+ /* Copyright (C) 2014-2017 Free Software Foundation, Inc.
+@@ -82,5 +83,6 @@
+ . $srcdir/scripttempl/DWARF.sc
+
+ cat <<EOF
++ ${RELOCATING+${DISCARDED}}
+ }
+ EOF
diff --git a/xtors.patch b/xtors.patch
new file mode 100644
index 000000000000..87bab7371244
--- /dev/null
+++ b/xtors.patch
@@ -0,0 +1,30 @@
+--- binutils-2.29/ld/scripttempl/i386go32.sc
++++ binutils-2.29/ld/scripttempl/i386go32.sc
+@@ -13,11 +13,11 @@
+ # conditional expansion.
+ CTOR='.ctor : {
+ *(SORT(.ctors.*))
+- *(.ctor)
++ *(.ctor) *(.ctors)
+ }'
+ DTOR='.dtor : {
+ *(SORT(.dtors.*))
+- *(.dtor)
++ *(.dtor) *(.dtors)
+ }'
+
+ cat <<EOF
+@@ -46,11 +46,11 @@
+ .data ${RELOCATING+ ${DATA_ALIGNMENT}} : {
+ ${RELOCATING+djgpp_first_ctor = . ;
+ *(SORT(.ctors.*))
+- *(.ctor)
++ *(.ctor) *(.ctors)
+ djgpp_last_ctor = . ;}
+ ${RELOCATING+djgpp_first_dtor = . ;
+ *(SORT(.dtors.*))
+- *(.dtor)
++ *(.dtor) *(.dtors)
+ djgpp_last_dtor = . ;}
+ *(.data)
+ ${RELOCATING+*(.data.*)}