Lines 40-48
Link Here
|
40 |
|
40 |
|
41 |
pkg_setup() { |
41 |
pkg_setup() { |
42 |
if [ "$(gcc-major-version)" == "4" ]; then |
42 |
if [ "$(gcc-major-version)" == "4" ]; then |
43 |
eerror "qemu requires gcc-3 in order to build and work correctly" |
43 |
ewarn "qemu requires gcc-3 in order to build and work correctly" |
44 |
eerror "please compile it with gcc-3" |
44 |
ewarn "please compile it with gcc-3" |
45 |
die "gcc 4 cannot build qemu" |
45 |
ewarn "trying to find it on your system..." |
|
|
46 |
AUTODETECT_GCC3=yes |
47 |
export AUTODETECT_GCC3 |
46 |
fi |
48 |
fi |
47 |
} |
49 |
} |
48 |
|
50 |
|
Lines 52-57
Link Here
|
52 |
cd "${S}" |
54 |
cd "${S}" |
53 |
epatch "${FILESDIR}"/qemu-${PV}-linux-headers.patch |
55 |
epatch "${FILESDIR}"/qemu-${PV}-linux-headers.patch |
54 |
epatch "${FILESDIR}"/qemu-${PV}-sparc-fp.patch |
56 |
epatch "${FILESDIR}"/qemu-${PV}-sparc-fp.patch |
|
|
57 |
epatch "${FILESDIR}"/qemu-${PV}-detect-gcc3.patch |
58 |
epatch "${FILESDIR}"/qemu-${PV}-detect-gentoo-gcc3.patch |
55 |
# Alter target makefiles to accept CFLAGS set via flag-o. |
59 |
# Alter target makefiles to accept CFLAGS set via flag-o. |
56 |
sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \ |
60 |
sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \ |
57 |
Makefile Makefile.target tests/Makefile |
61 |
Makefile Makefile.target tests/Makefile |
Lines 72-93
Link Here
|
72 |
|
76 |
|
73 |
set_target_list |
77 |
set_target_list |
74 |
|
78 |
|
75 |
myconf="--disable-gcc-check" |
|
|
76 |
if ! use sdl ; then |
79 |
if ! use sdl ; then |
77 |
myconf="$myconf --disable-gfx-check" |
80 |
myconf="$myconf --disable-gfx-check" |
78 |
fi |
81 |
fi |
79 |
./configure \ |
82 |
|
80 |
--prefix=/usr \ |
83 |
if [ "${AUTODETECT_GCC3}" = "yes" ]; then |
81 |
--target-list="${TARGET_LIST}" \ |
84 |
./configure \ |
82 |
--enable-slirp --enable-adlib \ |
85 |
--prefix=/usr \ |
83 |
--cc=$(tc-getCC) \ |
86 |
--target-list="${TARGET_LIST}" \ |
84 |
--host-cc=$(tc-getCC) \ |
87 |
--enable-slirp --enable-adlib \ |
85 |
--kernel-path=${KV_DIR} \ |
88 |
--kernel-path=${KV_DIR} \ |
86 |
$(use_enable sdl)\ |
89 |
$(use_enable sdl) \ |
87 |
$(use_enable kqemu) \ |
90 |
$(use_enable kqemu) \ |
88 |
$(use_enable alsa) \ |
91 |
$(use_enable alsa) \ |
89 |
${myconf} \ |
92 |
${myconf} \ |
90 |
|| die "could not configure" |
93 |
|| die "could not configure" |
|
|
94 |
else { |
95 |
myconf="--disable-gcc-check" |
96 |
./configure \ |
97 |
--prefix=/usr \ |
98 |
--target-list="${TARGET_LIST}" \ |
99 |
--enable-slirp --enable-adlib \ |
100 |
--cc=$(tc-getCC) \ |
101 |
--host-cc=$(tc-getCC) \ |
102 |
--kernel-path=${KV_DIR} \ |
103 |
$(use_enable sdl)\ |
104 |
$(use_enable kqemu) \ |
105 |
$(use_enable alsa) \ |
106 |
${myconf} \ |
107 |
|| die "could not configure" |
108 |
}; fi |
91 |
|
109 |
|
92 |
emake || die "make failed" |
110 |
emake || die "make failed" |
93 |
} |
111 |
} |