Lines 57-65
Link Here
|
57 |
tc-getCC ${CTARGET} |
57 |
tc-getCC ${CTARGET} |
58 |
just_headers && export CC=true |
58 |
just_headers && export CC=true |
59 |
|
59 |
|
|
|
60 |
local sysroot |
61 |
is_crosscompile && sysroot=/usr/${CTARGET} |
60 |
./configure \ |
62 |
./configure \ |
61 |
--target="${CTARGET}" \ |
63 |
--target="${CTARGET}" \ |
62 |
--prefix="/usr" \ |
64 |
--prefix="${sysroot}"/usr \ |
|
|
65 |
--syslibdir="${sysroot}"/lib \ |
63 |
--disable-gcc-wrapper |
66 |
--disable-gcc-wrapper |
64 |
} |
67 |
} |
65 |
|
68 |
|
Lines 71-93
Link Here
|
71 |
} |
74 |
} |
72 |
|
75 |
|
73 |
src_install() { |
76 |
src_install() { |
74 |
local sysroot=${D} |
|
|
75 |
is_crosscompile && sysroot+="/usr/${CTARGET}" |
76 |
|
77 |
local target="install" |
77 |
local target="install" |
78 |
just_headers && target="install-headers" |
78 |
just_headers && target="install-headers" |
79 |
emake DESTDIR="${sysroot}" ${target} || die |
79 |
emake DESTDIR="${D}" ${target} || die |
|
|
80 |
just_headers && return 0 |
80 |
|
81 |
|
81 |
# Make sure we install the sys-include symlink so that when |
|
|
82 |
# we build a 2nd stage cross-compiler, gcc finds the target |
83 |
# system headers correctly. See gcc/doc/gccinstall.info |
84 |
if is_crosscompile ; then |
85 |
dosym usr/include /usr/${CTARGET}/sys-include |
86 |
fi |
87 |
|
82 |
|
88 |
# musl provides ldd via a sym link to its ld.so |
83 |
# musl provides ldd via a sym link to its ld.so |
89 |
local ldso=$(basename ${D}/lib/ld-musl-*) |
84 |
local ldso=$(basename "${D}"/lib/ld-musl-*) |
90 |
dosym /lib/${ldso} /usr/bin/ldd |
85 |
local sysroot=/ |
|
|
86 |
is_crosscompile && sysroot=/usr/${CTARGET} |
87 |
dosym /lib/${ldso} ${sysroot}/usr/bin/ldd |
91 |
} |
88 |
} |
92 |
|
89 |
|
93 |
pkg_postinst() { |
90 |
pkg_postinst() { |