commit:     4be50297e0c461fa00a0d1bb844d9fa805c1cada
Author:     Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sat Sep 13 06:00:05 2014 +0000
Commit:     Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Sat Sep 13 06:00:05 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=4be50297

boot0-10.9999_p271444: build fix. set CC=clang to build UEFI loader.

---
 sys-freebsd/boot0/boot0-10.9999_p271444.ebuild     | 11 +++++++--
 .../files/boot0-10.1-drop-unsupport-cflags.patch   | 26 ++++++++++++++++++++++
 2 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/sys-freebsd/boot0/boot0-10.9999_p271444.ebuild 
b/sys-freebsd/boot0/boot0-10.9999_p271444.ebuild
index 40e4f1f..171af67 100644
--- a/sys-freebsd/boot0/boot0-10.9999_p271444.ebuild
+++ b/sys-freebsd/boot0/boot0-10.9999_p271444.ebuild
@@ -20,11 +20,13 @@ fi
 
 RDEPEND=""
 DEPEND="=sys-freebsd/freebsd-mk-defs-${RV}*
-       =sys-freebsd/freebsd-lib-${RV}*"
+       =sys-freebsd/freebsd-lib-${RV}*
+       !sparc-fbsd? ( sys-devel/clang )"
 
 S="${WORKDIR}/sys/boot"
 
 PATCHES=( "${FILESDIR}/${PN}-9.3-gcc46.patch"
+       "${FILESDIR}/${PN}-10.1-drop-unsupport-cflags.patch"
        "${FILESDIR}/${PN}-add-nossp-cflags.patch" )
 
 boot0_use_enable() {
@@ -40,7 +42,8 @@ pkg_setup() {
 }
 
 src_prepare() {
-       sed -e '/-fomit-frame-pointer/d' -e '/-mno-align-long-strings/d' \
+       use sparc-fbsd || export CC=clang
+       sed -e '/-mno-align-long-strings/d' \
                -i "${S}"/i386/boot2/Makefile \
                -i "${S}"/i386/gptboot/Makefile \
                -i "${S}"/i386/gptzfsboot/Makefile \
@@ -54,6 +57,10 @@ src_compile() {
        if use amd64-fbsd; then
                cd "${S}/userboot/libstand" || die
                freebsd_src_compile
+               cd "${S}/userboot/zfs" || die
+               freebsd_src_compile
+               cd "${S}/libstand32" || die
+               freebsd_src_compile
        fi
        cd "${WORKDIR}/lib/libstand" || die
        freebsd_src_compile

diff --git a/sys-freebsd/boot0/files/boot0-10.1-drop-unsupport-cflags.patch 
b/sys-freebsd/boot0/files/boot0-10.1-drop-unsupport-cflags.patch
new file mode 100644
index 0000000..4ab415b
--- /dev/null
+++ b/sys-freebsd/boot0/files/boot0-10.1-drop-unsupport-cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/sys/boot/efi/libefi/Makefile b/sys/boot/efi/libefi/Makefile
+index 76ed0ca..2d1d39d 100644
+--- a/sys/boot/efi/libefi/Makefile
++++ b/sys/boot/efi/libefi/Makefile
+@@ -17,7 +17,4 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
+ CFLAGS+= -I${.CURDIR}/../../common
+ 
+  
+-# Suppress warning from clang for FreeBSD %b and %D formats
+-CFLAGS+= -fformat-extensions
+-
+ .include <bsd.lib.mk>
+diff --git a/sys/boot/i386/libi386/Makefile b/sys/boot/i386/libi386/Makefile
+index d714c74..a5cfa3c 100644
+--- a/sys/boot/i386/libi386/Makefile
++++ b/sys/boot/i386/libi386/Makefile
+@@ -52,9 +52,6 @@ CFLAGS+=     -I${.CURDIR}/../../common 
-I${.CURDIR}/../common \
+ # the location of libstand
+ CFLAGS+=      -I${.CURDIR}/../../../../lib/libstand/
+ 
+-# Suppress warning from clang for FreeBSD %b and %D formats
+-CFLAGS+= -fformat-extensions
+-
+ .if ${MACHINE_CPUARCH} == "amd64"
+ CLEANFILES+=  machine
+ machine:

Reply via email to