summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGysbert Wassenaar <nixnut@gentoo.org>2010-06-24 19:44:02 +0000
committerGysbert Wassenaar <nixnut@gentoo.org>2010-06-24 19:44:02 +0000
commit3526451a07021e6ed95a05da3d598bb7bb98346b (patch)
treeb2a993e99e68c6c80bd88ae137bbf11a75018d92
parentFix building with libao >= 1.0.0 wrt #314627 by Juergen Rose. (diff)
downloadgentoo-2-3526451a07021e6ed95a05da3d598bb7bb98346b.tar.gz
gentoo-2-3526451a07021e6ed95a05da3d598bb7bb98346b.tar.bz2
gentoo-2-3526451a07021e6ed95a05da3d598bb7bb98346b.zip
Added nopiessp support for gcc-4
(Portage version: 2.1.8.3/cvs/Linux ppc)
-rw-r--r--sys-boot/yaboot/ChangeLog8
-rw-r--r--sys-boot/yaboot/files/yaboot-nopiessp-gcc4.patch42
-rw-r--r--sys-boot/yaboot/yaboot-1.3.14-r2.ebuild44
3 files changed, 93 insertions, 1 deletions
diff --git a/sys-boot/yaboot/ChangeLog b/sys-boot/yaboot/ChangeLog
index 07b869037caf..b464582dd5b7 100644
--- a/sys-boot/yaboot/ChangeLog
+++ b/sys-boot/yaboot/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-boot/yaboot
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/ChangeLog,v 1.30 2010/05/31 23:47:51 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/ChangeLog,v 1.31 2010/06/24 19:44:02 nixnut Exp $
+
+*yaboot-1.3.14-r2 (24 Jun 2010)
+
+ 24 Jun 2010; nixnut <nixnut@gentoo.org> +files/yaboot-nopiessp-gcc4.patch,
+ +yaboot-1.3.14-r2.ebuild:
+ Added nopiessp support for gcc-4
*yaboot-1.3.14-r1 (31 May 2010)
diff --git a/sys-boot/yaboot/files/yaboot-nopiessp-gcc4.patch b/sys-boot/yaboot/files/yaboot-nopiessp-gcc4.patch
new file mode 100644
index 000000000000..1016d8f5621d
--- /dev/null
+++ b/sys-boot/yaboot/files/yaboot-nopiessp-gcc4.patch
@@ -0,0 +1,42 @@
+diff -Nrup yaboot-1.3.13.orig/Config.gentoo yaboot-1.3.13/Config.gentoo
+--- yaboot-1.3.13.orig/Config.gentoo 1970-01-01 00:00:00.000000000 +0000
++++ yaboot-1.3.13/Config.gentoo 2005-06-12 00:41:14.889576152 +0000
+@@ -0,0 +1,6 @@
++check_gcc=$(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
++ then echo "$(1)"; else echo "$(2)"; fi)
++
++CFLAGS += $(call check_gcc, -fno-stack-protector)
++CFLAGS += $(call check_gcc, --nopie)
++
+diff -Nrup yaboot-1.3.13.orig/Makefile yaboot-1.3.13/Makefile
+--- yaboot-1.3.13.orig/Makefile 2004-07-11 20:12:03.000000000 +0000
++++ yaboot-1.3.13/Makefile 2005-06-12 00:41:14.890576000 +0000
+@@ -1,6 +1,7 @@
+ ## Setup
+
+ include Config
++include Config.gentoo
+
+ VERSION = 1.3.13
+ # Debug mode (spam/verbose)
+@@ -79,7 +80,7 @@ HOSTCFLAGS = -O2 $(CFLAGS) -Wall -I/usr/
+ OBJS = second/crt0.o second/yaboot.o second/cache.o second/prom.o second/file.o \
+ second/partition.o second/fs.o second/cfg.o second/setjmp.o second/cmdline.o \
+ second/fs_of.o second/fs_ext2.o second/fs_iso.o second/iso_util.o \
+- lib/nosys.o lib/string.o lib/strtol.o lib/vsprintf.o lib/ctype.o lib/malloc.o lib/strstr.o
++ lib/nosys.o lib/string.o lib/strtol.o lib/vsprintf.o lib/ctype.o lib/malloc.o lib/strstr.o lib/ssp.o
+
+ ifeq ($(USE_MD5_PASSWORDS),y)
+ OBJS += second/md5.o
+diff -Naur yaboot-1.3.14.orig/lib/ssp.c yaboot-1.3.14/lib/ssp.c
+--- yaboot-1.3.14.orig/lib/ssp.c 1970-01-01 00:00:00.000000000 +0000
++++ yaboot-1.3.14/lib/ssp.c 2010-06-20 18:50:57.000000000 +0000
+@@ -0,0 +1,7 @@
++extern void __stack_chk_fail_local (void) ;
++
++void
++__stack_chk_fail_local (void)
++{
++ return;
++}
+
diff --git a/sys-boot/yaboot/yaboot-1.3.14-r2.ebuild b/sys-boot/yaboot/yaboot-1.3.14-r2.ebuild
new file mode 100644
index 000000000000..a5aa568934e3
--- /dev/null
+++ b/sys-boot/yaboot/yaboot-1.3.14-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/yaboot-1.3.14-r2.ebuild,v 1.1 2010/06/24 19:44:02 nixnut Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="PPC Bootloader"
+SRC_URI="http://yaboot.ozlabs.org/releases/${P}.tar.gz"
+HOMEPAGE="http://yaboot.ozlabs.org"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="-* ~ppc -ppc64"
+IUSE="ibm"
+
+DEPEND="sys-apps/powerpc-utils"
+RDEPEND="!ibm? ( sys-fs/hfsutils
+ sys-fs/hfsplusutils
+ sys-fs/mac-fdisk )"
+
+PROVIDE="virtual/bootloader"
+
+src_compile() {
+ export -n CFLAGS
+ export -n CXXFLAGS
+ [ -n "$(tc-getCC)" ] || CC="gcc"
+ # dual boot patch
+ epatch "${FILESDIR}/yabootconfig-1.3.13.patch"
+ epatch "${FILESDIR}/chrpfix.patch"
+ if [[ "$(gcc-major-version)" -eq "3" ]]; then
+ epatch "${FILESDIR}/yaboot-nopiessp.patch"
+ fi
+ if [[ "$(gcc-major-version)" -eq "4" ]]; then
+ epatch "${FILESDIR}/yaboot-nopiessp-gcc4.patch"
+ fi
+ epatch "${FILESDIR}/sysfs-ofpath.patch"
+ emake PREFIX=/usr MANDIR=share/man CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ cp etc/yaboot.conf etc/yaboot.conf.bak
+ sed -e 's/\/local//' etc/yaboot.conf >| etc/yaboot.conf.edit
+ mv -f etc/yaboot.conf.edit etc/yaboot.conf
+ make ROOT="${D}" PREFIX=/usr MANDIR=share/man install || die
+}