1 |
commit: 82a45b55660bee177954a4f91d58ec45af52b0fd |
2 |
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp> |
3 |
AuthorDate: Thu Nov 29 13:46:59 2012 +0000 |
4 |
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com> |
5 |
CommitDate: Thu Nov 29 13:46:59 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=82a45b55 |
7 |
|
8 |
add sys-freebsd/boot0 -- fix fails to build using clang or >=gcc-4.6, bug 409815 |
9 |
|
10 |
--- |
11 |
sys-freebsd/boot0/Manifest | 6 + |
12 |
sys-freebsd/boot0/boot0-9.1_rc3.ebuild | 62 +++++++++ |
13 |
sys-freebsd/boot0/files/boot0-7.0-gentoo.patch | 131 ++++++++++++++++++++ |
14 |
.../boot0/files/boot0-8.2-zfsboot-makefile.patch | 13 ++ |
15 |
4 files changed, 212 insertions(+), 0 deletions(-) |
16 |
|
17 |
diff --git a/sys-freebsd/boot0/Manifest b/sys-freebsd/boot0/Manifest |
18 |
new file mode 100644 |
19 |
index 0000000..c3500b9 |
20 |
--- /dev/null |
21 |
+++ b/sys-freebsd/boot0/Manifest |
22 |
@@ -0,0 +1,6 @@ |
23 |
+AUX boot0-7.0-gentoo.patch 5523 SHA256 deb18a75bb96314fb34da515f12af3706df711b53d6ebf0c7c2d10c3ba8a6ace SHA512 0601b498a610ddd2880288ff83ebedfbbdc96a3811d457e6cbf10394d7a385b18cee51559b3f24896fc6047f55f84e85cb01ad50c81e42da098c42fdc9bcdbab WHIRLPOOL 8f88bbec2e010a0a2a39f4b152ca54bb8438f1cd62f21f900f9667fd40ed6ef2c84a38a1392ab438443deafac39a88d8a792d5711b877231539db3b9736f3e0a |
24 |
+AUX boot0-8.2-zfsboot-makefile.patch 436 SHA256 74a494fce8011f018542a54d6d188c1aa9977b982a3b0c333ea64445dbfab994 SHA512 2d2c1572415362eed73580b681a6e6cd95b1f4abb415221e8904097ac078c620223ca652282404c4f1881dcb605f25f126b53ec0b8409ad4fbbd9bed603ba7c2 WHIRLPOOL ddf074f25ebf256f543cd5ceb8e64934cc045e6dc81f49ef14aad009de69c84309d0b7927c87ff36c75c008fae975e25708b9ec8f21cb083bba77daf3e5107d4 |
25 |
+DIST freebsd-contrib-9.1_rc3.tar.bz2 54754779 SHA256 90613296d804b3632902fb6fe180e6c2525ef29ba02a11efc3d73657b0476a8b SHA512 6564c77b02f472e063c439d2cbfd3bbdbd7d6507d9591eb020d0748fafa9eaaab1927f06c379f2b059f515cb2f77e13c5337f856866f0210be34d9a803885f20 WHIRLPOOL a2db66d867c4c65c7f95d627e38ea3615b650bd0eadda722e2f5e38cb34167c7c822dbe5a87b02d16bb11f37605e306764aef50368b54a8beb8cd39537702ea0 |
26 |
+DIST freebsd-lib-9.1_rc3.tar.bz2 3205238 SHA256 da7001a8c23fcc614b230414cb830c12d7b238c38a15c905c695c5a1621c10f8 SHA512 761219c55b0ac067685057b519e506869fba6c472179f9d151b0e12eeacad11004ec2ec504953ace7139694c934785555e98bc16b41a248470241464599e6914 WHIRLPOOL 653258d8752cfc401a632ca59a05cce02821cf1ca279696463c6c0f71e761853617b9b0f51b1849e89b4067dc1799b1b4c528644bcd42b260af0f851caccc63e |
27 |
+DIST freebsd-sys-9.1_rc3.tar.bz2 32605500 SHA256 5194ac93850aff4f10978b739573ab8ee54a95a0b2d4e46f754314ae381b442b SHA512 17cd41ea66bf1d2e10b56001e6e1c80db78e1572aff4ad1ac945bc24d38dfef612e1a4b7eead8bc50b94df798b0bde3dcc13a0596860322569272b3239a30b9b WHIRLPOOL 8628c5a97675b3fe4ebfcb92c4fb6d5aebaa3a11551e4f16004a6ffb23b3d10334b623c70f255762038bf1fc80a7a27abd587f10ac9706ac1bb0b22adda266b8 |
28 |
+EBUILD boot0-9.1_rc3.ebuild 1684 SHA256 fbbc75d601f244e7dda562e80a5abbf328fdcac57eb2b688b46a348980139c6d SHA512 e2f02b804e5fcea503f736cc15bdcd1be4963fbd5f78dd40757d2bd8c9e3620f45a3abc5aa2c9d2c6c99c71a0eacd919a4c7fab34de03713edfd8be4153851cf WHIRLPOOL 0f3015ab9626d1a9c789224f3e51ac91455955c5d49374161e2a42f001ff6a39d6a670b9b4ff2d836712feb70c19d00670818dd779c8d68d069109985450cd52 |
29 |
|
30 |
diff --git a/sys-freebsd/boot0/boot0-9.1_rc3.ebuild b/sys-freebsd/boot0/boot0-9.1_rc3.ebuild |
31 |
new file mode 100644 |
32 |
index 0000000..a369539 |
33 |
--- /dev/null |
34 |
+++ b/sys-freebsd/boot0/boot0-9.1_rc3.ebuild |
35 |
@@ -0,0 +1,62 @@ |
36 |
+# Copyright 1999-2012 Gentoo Foundation |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/boot0/boot0-9.1_rc3.ebuild,v 1.1 2012/11/06 12:52:54 aballier Exp $ |
39 |
+ |
40 |
+EAPI=2 |
41 |
+ |
42 |
+inherit bsdmk freebsd flag-o-matic toolchain-funcs |
43 |
+ |
44 |
+DESCRIPTION="FreeBSD's bootloader" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
47 |
+ |
48 |
+IUSE="bzip2 ieee1394 tftp zfs" |
49 |
+ |
50 |
+SRC_URI="mirror://gentoo/${SYS}.tar.bz2 |
51 |
+ mirror://gentoo/${LIB}.tar.bz2 |
52 |
+ mirror://gentoo/${CONTRIB}.tar.bz2" |
53 |
+ |
54 |
+RDEPEND="" |
55 |
+DEPEND="=sys-freebsd/freebsd-mk-defs-${RV}* |
56 |
+ =sys-freebsd/freebsd-lib-${RV}*" |
57 |
+ |
58 |
+S="${WORKDIR}/sys/boot" |
59 |
+ |
60 |
+boot0_use_enable() { |
61 |
+ use ${1} && mymakeopts="${mymakeopts} LOADER_${2}_SUPPORT=\"yes\"" |
62 |
+} |
63 |
+ |
64 |
+pkg_setup() { |
65 |
+ boot0_use_enable ieee1394 FIREWIRE |
66 |
+ boot0_use_enable zfs ZFS |
67 |
+ boot0_use_enable tftp TFTP |
68 |
+ boot0_use_enable bzip2 BZIP2 |
69 |
+} |
70 |
+ |
71 |
+src_prepare() { |
72 |
+ sed -e '/-mno-align-long-strings/d' \ |
73 |
+ -i "${S}"/i386/boot2/Makefile \ |
74 |
+ -i "${S}"/i386/gptboot/Makefile \ |
75 |
+ -i "${S}"/i386/gptzfsboot/Makefile \ |
76 |
+ -i "${S}"/i386/zfsboot/Makefile || die |
77 |
+ |
78 |
+ # gcc-4.6 or later version support, bug #409815 |
79 |
+ if ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -ge 6 ]] ) ; then |
80 |
+ sed -i -e '/-m elf_i386_fbsd/d' "${S}"/i386/Makefile.inc || die |
81 |
+ for dir in boot2 gptboot gptzfsboot zfsboot; do |
82 |
+ echo "LDFLAGS+= -m elf_i386_fbsd" >> "${S}"/i386/${dir}/Makefile || die |
83 |
+ done |
84 |
+ echo "CFLAGS+= -fno-asynchronous-unwind-tables" >> "${S}"/i386/boot2/Makefile || die |
85 |
+ fi |
86 |
+} |
87 |
+ |
88 |
+src_compile() { |
89 |
+ strip-flags |
90 |
+ append-flags "-fno-strict-aliasing" |
91 |
+ NOFLAGSTRIP="yes" freebsd_src_compile |
92 |
+} |
93 |
+ |
94 |
+src_install() { |
95 |
+ dodir /boot/defaults |
96 |
+ mkinstall FILESDIR=/boot || die "mkinstall failed" |
97 |
+} |
98 |
|
99 |
diff --git a/sys-freebsd/boot0/files/boot0-7.0-gentoo.patch b/sys-freebsd/boot0/files/boot0-7.0-gentoo.patch |
100 |
new file mode 100644 |
101 |
index 0000000..a5830c1 |
102 |
--- /dev/null |
103 |
+++ b/sys-freebsd/boot0/files/boot0-7.0-gentoo.patch |
104 |
@@ -0,0 +1,131 @@ |
105 |
+diff -ur ../src.orig/sys/boot/efi/libefi/Makefile sys/boot/efi/libefi/Makefile |
106 |
+--- ../src.orig/sys/boot/efi/libefi/Makefile 2006-11-05 23:03:03.000000000 +0100 |
107 |
++++ sys/boot/efi/libefi/Makefile 2008-03-14 11:15:48.482695423 +0100 |
108 |
+@@ -8,7 +8,7 @@ |
109 |
+ |
110 |
+ CFLAGS+= -I${.CURDIR}/../include |
111 |
+ CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH:S/amd64/i386/} |
112 |
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand |
113 |
++CFLAGS+= -I/usr/include/libstand |
114 |
+ |
115 |
+ # Pick up the bootstrap header for some interface items |
116 |
+ CFLAGS+= -I${.CURDIR}/../../common |
117 |
+diff -ur ../src.orig/sys/boot/i386/boot2/Makefile sys/boot/i386/boot2/Makefile |
118 |
+--- ../src.orig/sys/boot/i386/boot2/Makefile 2007-05-19 07:07:47.000000000 +0200 |
119 |
++++ sys/boot/i386/boot2/Makefile 2008-03-14 11:21:16.247014910 +0100 |
120 |
+@@ -24,7 +24,7 @@ |
121 |
+ -fno-guess-branch-probability \ |
122 |
+ -fomit-frame-pointer \ |
123 |
+ -fno-unit-at-a-time \ |
124 |
+- -mno-align-long-strings \ |
125 |
++ -march=i586 \ |
126 |
+ -mrtd \ |
127 |
+ -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \ |
128 |
+ -D${BOOT2_UFS} \ |
129 |
+diff -ur ../src.orig/sys/boot/i386/libfirewire/Makefile sys/boot/i386/libfirewire/Makefile |
130 |
+--- ../src.orig/sys/boot/i386/libfirewire/Makefile 2007-05-29 16:35:57.000000000 +0200 |
131 |
++++ sys/boot/i386/libfirewire/Makefile 2008-03-14 11:15:48.502696288 +0100 |
132 |
+@@ -10,7 +10,7 @@ |
133 |
+ CFLAGS+= -D_BOOT |
134 |
+ |
135 |
+ CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. |
136 |
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand |
137 |
++CFLAGS+= -I/usr/include/libstand |
138 |
+ CFLAGS+= -I${.CURDIR}/../btx/lib |
139 |
+ CFLAGS+= -I${.CURDIR}/../libi386 |
140 |
+ |
141 |
+diff -ur ../src.orig/sys/boot/i386/libi386/Makefile sys/boot/i386/libi386/Makefile |
142 |
+--- ../src.orig/sys/boot/i386/libi386/Makefile 2006-04-11 22:11:30.000000000 +0200 |
143 |
++++ sys/boot/i386/libi386/Makefile 2008-03-14 11:15:48.506695959 +0100 |
144 |
+@@ -36,7 +36,7 @@ |
145 |
+ -I${.CURDIR}/../../../contrib/dev/acpica \ |
146 |
+ -I${.CURDIR}/../../.. -I. |
147 |
+ # the location of libstand |
148 |
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ |
149 |
++CFLAGS+= -I/usr/include/libstand/ |
150 |
+ |
151 |
+ .if ${MACHINE_ARCH} == "amd64" |
152 |
+ CLEANFILES+= machine |
153 |
+diff -ur ../src.orig/sys/boot/ia64/common/Makefile sys/boot/ia64/common/Makefile |
154 |
+--- ../src.orig/sys/boot/ia64/common/Makefile 2006-11-05 23:03:03.000000000 +0100 |
155 |
++++ sys/boot/ia64/common/Makefile 2008-03-14 11:15:48.486695372 +0100 |
156 |
+@@ -10,7 +10,7 @@ |
157 |
+ CFLAGS+= -I${.CURDIR}/../../efi/include |
158 |
+ CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_ARCH} |
159 |
+ CFLAGS+= -I${.CURDIR}/../../.. |
160 |
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand |
161 |
++CFLAGS+= -I/usr/include/libstand |
162 |
+ |
163 |
+ .if ${MK_FORTH} != "no" |
164 |
+ BOOT_FORTH= yes |
165 |
+diff -ur ../src.orig/sys/boot/ia64/efi/Makefile sys/boot/ia64/efi/Makefile |
166 |
+--- ../src.orig/sys/boot/ia64/efi/Makefile 2006-11-05 23:03:03.000000000 +0100 |
167 |
++++ sys/boot/ia64/efi/Makefile 2008-03-14 11:15:48.490695322 +0100 |
168 |
+@@ -15,7 +15,7 @@ |
169 |
+ CFLAGS+= -I${.CURDIR}/../../efi/include |
170 |
+ CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_ARCH} |
171 |
+ CFLAGS+= -I${.CURDIR}/../../.. |
172 |
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand |
173 |
++CFLAGS+= -I/usr/include/libstand |
174 |
+ |
175 |
+ LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_ARCH} |
176 |
+ LDFLAGS= -Wl,-T${LDSCRIPT} -shared -symbolic |
177 |
+diff -ur ../src.orig/sys/boot/ia64/ski/Makefile sys/boot/ia64/ski/Makefile |
178 |
+--- ../src.orig/sys/boot/ia64/ski/Makefile 2006-11-05 23:03:04.000000000 +0100 |
179 |
++++ sys/boot/ia64/ski/Makefile 2008-03-14 11:15:48.494695551 +0100 |
180 |
+@@ -14,7 +14,7 @@ |
181 |
+ CFLAGS+= -I${.CURDIR}/../common |
182 |
+ CFLAGS+= -I${.CURDIR}/../../common |
183 |
+ CFLAGS+= -I${.CURDIR}/../../.. |
184 |
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand |
185 |
++CFLAGS+= -I/usr/include/libstand |
186 |
+ |
187 |
+ LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_ARCH} |
188 |
+ LDFLAGS= -Wl,-T${LDSCRIPT} |
189 |
+diff -ur ../src.orig/sys/boot/ofw/libofw/Makefile sys/boot/ofw/libofw/Makefile |
190 |
+--- ../src.orig/sys/boot/ofw/libofw/Makefile 2007-06-17 02:17:15.000000000 +0200 |
191 |
++++ sys/boot/ofw/libofw/Makefile 2008-03-14 11:15:48.478695194 +0100 |
192 |
+@@ -7,7 +7,7 @@ |
193 |
+ ofw_memory.c ofw_module.c ofw_net.c ofw_reboot.c \ |
194 |
+ ofw_time.c openfirm.c |
195 |
+ |
196 |
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ |
197 |
++CFLAGS+= -I/usr/include/libstand/ |
198 |
+ |
199 |
+ # Pick up the bootstrap header for some interface items |
200 |
+ CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. |
201 |
+diff -ur ../src.orig/sys/boot/pc98/libpc98/Makefile sys/boot/pc98/libpc98/Makefile |
202 |
+--- ../src.orig/sys/boot/pc98/libpc98/Makefile 2006-04-11 22:11:30.000000000 +0200 |
203 |
++++ sys/boot/pc98/libpc98/Makefile 2008-03-14 11:15:48.510696188 +0100 |
204 |
+@@ -31,6 +31,6 @@ |
205 |
+ -I${.CURDIR}/../../i386/libi386 \ |
206 |
+ -I${.CURDIR}/../../.. -I. |
207 |
+ # the location of libstand |
208 |
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ |
209 |
++CFLAGS+= -I/usr/include/libstand/ |
210 |
+ |
211 |
+ .include <bsd.lib.mk> |
212 |
+diff -ur ../src.orig/sys/boot/powerpc/loader/Makefile sys/boot/powerpc/loader/Makefile |
213 |
+--- ../src.orig/sys/boot/powerpc/loader/Makefile 2006-03-17 19:54:36.000000000 +0100 |
214 |
++++ sys/boot/powerpc/loader/Makefile 2008-03-14 11:15:48.515695706 +0100 |
215 |
+@@ -82,7 +82,7 @@ |
216 |
+ CFLAGS+= -I${.CURDIR}/../../ofw/libofw |
217 |
+ |
218 |
+ # where to get libstand from |
219 |
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ |
220 |
++CFLAGS+= -I/usr/include/libstand/ |
221 |
+ |
222 |
+ DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} |
223 |
+ LDADD= ${LIBFICL} ${LIBOFW} -lstand |
224 |
+diff -ur ../src.orig/sys/boot/sparc64/loader/Makefile sys/boot/sparc64/loader/Makefile |
225 |
+--- ../src.orig/sys/boot/sparc64/loader/Makefile 2006-03-17 19:54:36.000000000 +0100 |
226 |
++++ sys/boot/sparc64/loader/Makefile 2008-03-14 11:15:48.498695501 +0100 |
227 |
+@@ -65,7 +65,7 @@ |
228 |
+ CFLAGS+= -I${.CURDIR}/../../ofw/libofw/ |
229 |
+ |
230 |
+ # where to get libstand from |
231 |
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ |
232 |
++CFLAGS+= -I/usr/include/libstand/ |
233 |
+ |
234 |
+ DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} |
235 |
+ LDADD= ${LIBFICL} ${LIBOFW} -lstand |
236 |
|
237 |
diff --git a/sys-freebsd/boot0/files/boot0-8.2-zfsboot-makefile.patch b/sys-freebsd/boot0/files/boot0-8.2-zfsboot-makefile.patch |
238 |
new file mode 100644 |
239 |
index 0000000..a3a33d5 |
240 |
--- /dev/null |
241 |
+++ b/sys-freebsd/boot0/files/boot0-8.2-zfsboot-makefile.patch |
242 |
@@ -0,0 +1,13 @@ |
243 |
+diff --git a/sys/boot/i386/zfsboot/Makefile b/sys/boot/i386/zfsboot/Makefile |
244 |
+index bb16ea3..7dedb49 100644 |
245 |
+--- a/sys/boot/i386/zfsboot/Makefile |
246 |
++++ b/sys/boot/i386/zfsboot/Makefile |
247 |
+@@ -83,6 +83,8 @@ zfsboot.bin: zfsboot.out |
248 |
+ zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o util.o |
249 |
+ ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} |
250 |
+ |
251 |
++drv.o: drv.c xreadorg.h |
252 |
++ |
253 |
+ zfsboot.o: zfsboot.s |
254 |
+ |
255 |
+ SRCS= zfsboot.c xreadorg.h |