aboutsummaryrefslogtreecommitdiffstats
path: root/testing/grub
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2016-09-09 10:05:17 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2016-09-09 10:07:11 +0000
commitabbd0ab9087285bc2d15bbb57acec58043106e1d (patch)
treea2af1c4d1a30dffffa5044f72290b4f11f3c0808 /testing/grub
parent819be713c9300f1926d01bb0a0a5029e34d48edb (diff)
downloadaports-abbd0ab9087285bc2d15bbb57acec58043106e1d.tar.bz2
aports-abbd0ab9087285bc2d15bbb57acec58043106e1d.tar.xz
testing/grub: new aport
temp disable x86_64 as gcc does not honor -no-pie
Diffstat (limited to 'testing/grub')
-rw-r--r--testing/grub/2.02_beta3-gcc6-ld-no-pie.patch57
-rw-r--r--testing/grub/APKBUILD46
2 files changed, 103 insertions, 0 deletions
diff --git a/testing/grub/2.02_beta3-gcc6-ld-no-pie.patch b/testing/grub/2.02_beta3-gcc6-ld-no-pie.patch
new file mode 100644
index 0000000000..0d81415447
--- /dev/null
+++ b/testing/grub/2.02_beta3-gcc6-ld-no-pie.patch
@@ -0,0 +1,57 @@
+2016-05-21 Magnus Granberg <zorry@gentoo.org>
+
+ #583042 sys-boot/grub-2.02_beta3-r1: building w/gcc-6[pie]: error:
+ x86_64-pc-linux-gnu/bin/ld: -r and -shared may not be used together
+
+ * acinclude.m4: Add -no-pie check.
+ * configure.ac: Add -no-pie to TARGET_LDFLAGS if needed.
+
+--- a/acinclude.m4 2015-11-11 20:56:52.000000000 +0100
++++ b/acinclude.m4 2016-05-17 00:08:22.000000000 +0200
+@@ -390,6 +390,24 @@ else
+ [fi]
+ ])
+
++dnl Check if the Linker supports `-no-pie'.
++AC_DEFUN([grub_CHECK_NO_PIE],
++[AC_MSG_CHECKING([whether linker accepts -no-pie])
++AC_CACHE_VAL(grub_cv_cc_ld_nopie,
++[save_LDFLAGS="$LDFLAGS"
++LDFLAGS="$LDFLAGS -no-pie"
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
++ [grub_cv_cc_ld_no_pie=yes],
++ [grub_cv_cc_ld_no_pie=no])
++LDFLAGS="$save_LDFLAGS"
++])
++AC_MSG_RESULT([$grub_cv_cc_ld_no_pie])
++nopie_possible=no
++if test "x$grub_cv_cc_ld_no_pie" = xyes ; then
++ nopie_possible=yes
++fi
++])
++
+ dnl Check if the C compiler supports `-fPIC'.
+ AC_DEFUN([grub_CHECK_PIC],[
+ [# Position independent executable.
+--- a/configure.ac 2016-02-27 13:40:56.000000000 +0100
++++ b/configure.ac 2016-05-17 00:57:29.471000000 +0200
+@@ -1184,13 +1184,18 @@ CFLAGS="$TARGET_CFLAGS"
+
+ # Position independent executable.
+ grub_CHECK_PIE
++grub_CHECK_NO_PIE
+ [# Need that, because some distributions ship compilers that include
+-# `-fPIE' in the default specs.
++# `-fPIE' and '-pie' in the default specs.
+ if [ x"$pie_possible" = xyes ]; then
+ TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE"
++fi
++if [ x"$nopie_possible" = xyes ] && [ x"$pie_possible" = xyes ]; then
++ TARGET_LDFLAGS="$TARGET_LDFLAGS -no-pie"
+ fi]
+
+ CFLAGS="$TARGET_CFLAGS"
++LDFLAGS="$TARGET_LDFLAGS"
+
+ # Position independent executable.
+ grub_CHECK_PIC
diff --git a/testing/grub/APKBUILD b/testing/grub/APKBUILD
new file mode 100644
index 0000000000..0b23ff60ff
--- /dev/null
+++ b/testing/grub/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=grub
+_ver=2.02~beta3
+pkgver=2.02_beta3
+pkgrel=0
+pkgdesc="Bootloader with support for Linux, Multiboot and more"
+url="https://www.gnu.org/software/grub/"
+arch="all !x86_64"
+license="GPLv3+"
+depends=""
+depends_dev=""
+makedepends="$depends_dev bison flex linux-headers xz-dev gnu-efi-dev lvm2-dev
+ automake autoconf libtool"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="ftp://alpha.gnu.org/gnu/grub/grub-$_ver.tar.xz
+ 2.02_beta3-gcc6-ld-no-pie.patch"
+builddir="$srcdir/grub-$_ver"
+
+build() {
+ cd "$builddir"
+ autoreconf -vif
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/charset.alias
+}
+
+md5sums="ab399fc6f74a97d66ff77f04b743149c grub-2.02~beta3.tar.xz
+7a09f166141e2a57f1829dd6cf1424fa 2.02_beta3-gcc6-ld-no-pie.patch"
+sha256sums="30ec3d555e52a702c3eef449872ef874eff28b320f40b55ffc47f70db8e5ada1 grub-2.02~beta3.tar.xz
+14912f087e047259e803be020c0506d9865c1507ae34683c6668b8d4a140c93b 2.02_beta3-gcc6-ld-no-pie.patch"
+sha512sums="4a530efef4dae45f4046cf3550563f14acb24d25cb88d5e06c93953ca5b1eec115118c6860233a9f627edcddae2571e5d6b867b70ff9dd5c184c9fef83ef7e11 grub-2.02~beta3.tar.xz
+fc15c95bf26b28eee3b5a0d8e5fac538445179cea19a8657cd360e37dd5a95010ea2b899d1e4f3692b778a71f79526539ad1c741f028186f0daf135ee1678da0 2.02_beta3-gcc6-ld-no-pie.patch"