Lines 18-27
Link Here
|
18 |
|
18 |
|
19 |
RDEPEND="" |
19 |
RDEPEND="" |
20 |
DEPEND="=sys-freebsd/freebsd-mk-defs-${RV}* |
20 |
DEPEND="=sys-freebsd/freebsd-mk-defs-${RV}* |
21 |
=sys-freebsd/freebsd-lib-${RV}*" |
21 |
=sys-freebsd/freebsd-lib-${RV}* |
|
|
22 |
|| ( =sys-devel/gcc-4.5* >=sys-devel/clang-3.0 )" |
22 |
|
23 |
|
23 |
S="${WORKDIR}/sys/boot" |
24 |
S="${WORKDIR}/sys/boot" |
24 |
|
25 |
|
|
|
26 |
PATCHES=( "${FILESDIR}"/${P}-clang.patch ) |
27 |
|
25 |
boot0_use_enable() { |
28 |
boot0_use_enable() { |
26 |
use ${1} && mymakeopts="${mymakeopts} LOADER_${2}_SUPPORT=\"yes\"" |
29 |
use ${1} && mymakeopts="${mymakeopts} LOADER_${2}_SUPPORT=\"yes\"" |
27 |
} |
30 |
} |
Lines 34-40
Link Here
|
34 |
} |
37 |
} |
35 |
|
38 |
|
36 |
src_prepare() { |
39 |
src_prepare() { |
37 |
sed -e '/-fomit-frame-pointer/d' -e '/-mno-align-long-strings/d' \ |
40 |
sed -e '/-mno-align-long-strings/d' \ |
38 |
-i "${S}"/i386/boot2/Makefile \ |
41 |
-i "${S}"/i386/boot2/Makefile \ |
39 |
-i "${S}"/i386/gptboot/Makefile \ |
42 |
-i "${S}"/i386/gptboot/Makefile \ |
40 |
-i "${S}"/i386/gptzfsboot/Makefile \ |
43 |
-i "${S}"/i386/gptzfsboot/Makefile \ |
Lines 44-49
Link Here
|
44 |
src_compile() { |
47 |
src_compile() { |
45 |
strip-flags |
48 |
strip-flags |
46 |
append-flags "-fno-strict-aliasing" |
49 |
append-flags "-fno-strict-aliasing" |
|
|
50 |
|
51 |
if [ -e /usr/bin/clang ] ; then |
52 |
export CC=clang |
53 |
else |
54 |
GCC=`ls -1 /usr/bin/gcc-4.5* | tail -n 1` |
55 |
if [ -e ${GCC} ] ; then |
56 |
export CC=${GCC} |
57 |
fi |
58 |
fi |
59 |
|
47 |
NOFLAGSTRIP="yes" freebsd_src_compile |
60 |
NOFLAGSTRIP="yes" freebsd_src_compile |
48 |
} |
61 |
} |
49 |
|
62 |
|