Lines 34-70
toolchain-glibc_src_install() {
Link Here
|
34 |
else |
34 |
else |
35 |
src_lib=$(eval echo */${l}) |
35 |
src_lib=$(eval echo */${l}) |
36 |
fi |
36 |
fi |
37 |
cp -a ${src_lib} "${D}"$(alt_libdir)/tls/${l} || die "copying nptl ${l}" |
37 |
cp -a ${src_lib} "${ED}"$(alt_libdir)/tls/${l} || die "copying nptl ${l}" |
38 |
fperms a+rx $(alt_libdir)/tls/${l} |
38 |
fperms a+rx $(alt_libdir)/tls/${l} |
39 |
dosym ${l} $(alt_libdir)/tls/$(scanelf -qSF'%S#F' ${src_lib}) |
39 |
dosym ${l} $(alt_libdir)/tls/$(scanelf -qSF'%S#F' ${src_lib}) |
40 |
|
40 |
|
41 |
# then grab the linker script or the symlink ... |
41 |
# then grab the linker script or the symlink ... |
42 |
if [[ -L ${D}$(alt_usrlibdir)/${l} ]] ; then |
42 |
if [[ -L ${ED}$(alt_usrlibdir)/${l} ]] ; then |
43 |
dosym $(alt_libdir)/tls/${l} $(alt_usrlibdir)/nptl/${l} |
43 |
dosym $(alt_libdir)/tls/${l} $(alt_usrlibdir)/nptl/${l} |
44 |
else |
44 |
else |
45 |
sed \ |
45 |
sed \ |
46 |
-e "s:/${l}:/tls/${l}:g" \ |
46 |
-e "s:/${l}:/tls/${l}:g" \ |
47 |
-e "s:/${l/%.so/_nonshared.a}:/nptl/${l/%.so/_nonshared.a}:g" \ |
47 |
-e "s:/${l/%.so/_nonshared.a}:/nptl/${l/%.so/_nonshared.a}:g" \ |
48 |
"${D}"$(alt_usrlibdir)/${l} > "${D}"$(alt_usrlibdir)/nptl/${l} |
48 |
"${ED}"$(alt_usrlibdir)/${l} > "${ED}"$(alt_usrlibdir)/nptl/${l} |
49 |
fi |
49 |
fi |
50 |
|
50 |
|
51 |
# then grab the static lib ... |
51 |
# then grab the static lib ... |
52 |
src_lib=${src_lib/%.so/.a} |
52 |
src_lib=${src_lib/%.so/.a} |
53 |
[[ ! -e ${src_lib} ]] && src_lib=${src_lib/%.a/_pic.a} |
53 |
[[ ! -e ${src_lib} ]] && src_lib=${src_lib/%.a/_pic.a} |
54 |
cp -a ${src_lib} "${D}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" |
54 |
cp -a ${src_lib} "${ED}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" |
55 |
src_lib=${src_lib/%.a/_nonshared.a} |
55 |
src_lib=${src_lib/%.a/_nonshared.a} |
56 |
if [[ -e ${src_lib} ]] ; then |
56 |
if [[ -e ${src_lib} ]] ; then |
57 |
cp -a ${src_lib} "${D}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" |
57 |
cp -a ${src_lib} "${ED}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" |
58 |
fi |
58 |
fi |
59 |
done |
59 |
done |
60 |
|
60 |
|
61 |
# use the nptl linker instead of the linuxthreads one as the linuxthreads |
61 |
# use the nptl linker instead of the linuxthreads one as the linuxthreads |
62 |
# one may lack TLS support and that can be really bad for business |
62 |
# one may lack TLS support and that can be really bad for business |
63 |
cp -a elf/ld.so "${D}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp" |
63 |
cp -a elf/ld.so "${ED}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp" |
64 |
fi |
64 |
fi |
65 |
|
65 |
|
66 |
# We'll take care of the cache ourselves |
66 |
# We'll take care of the cache ourselves |
67 |
rm -f "${D}"/etc/ld.so.cache |
67 |
rm -f "${ED}"/etc/ld.so.cache |
68 |
|
68 |
|
69 |
# Everything past this point just needs to be done once ... |
69 |
# Everything past this point just needs to be done once ... |
70 |
is_final_abi || return 0 |
70 |
is_final_abi || return 0 |
Lines 92-99
toolchain-glibc_src_install() {
Link Here
|
92 |
sparc32 /lib/ld-linux.so.2 |
92 |
sparc32 /lib/ld-linux.so.2 |
93 |
sparc64 /lib64/ld-linux.so.2 |
93 |
sparc64 /lib64/ld-linux.so.2 |
94 |
) |
94 |
) |
95 |
if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${D}/$(alt_prefix)/lib ]] ; then |
95 |
if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${D}$(alt_eprefix)/$(alt_prefix)/lib ]] ; then |
96 |
dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib |
96 |
dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_arch_prefix)/lib |
97 |
fi |
97 |
fi |
98 |
for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do |
98 |
for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do |
99 |
ldso_abi=${ldso_abi_list[i]} |
99 |
ldso_abi=${ldso_abi_list[i]} |
Lines 122-133
toolchain-glibc_src_install() {
Link Here
|
122 |
# gcc likes to use relative paths to get to its multilibs like |
122 |
# gcc likes to use relative paths to get to its multilibs like |
123 |
# /usr/lib/../lib64/. So while we don't install any files into |
123 |
# /usr/lib/../lib64/. So while we don't install any files into |
124 |
# /usr/lib/, we do need it to exist. |
124 |
# /usr/lib/, we do need it to exist. |
125 |
cd "${D}"$(alt_libdir)/.. |
125 |
cd "${ED}"$(alt_libdir)/.. |
126 |
[[ -e lib ]] || mkdir lib |
126 |
[[ -e lib ]] || mkdir lib |
127 |
cd "${D}"$(alt_usrlibdir)/.. |
127 |
cd "${ED}"$(alt_usrlibdir)/.. |
128 |
[[ -e lib ]] || mkdir lib |
128 |
[[ -e lib ]] || mkdir lib |
129 |
|
129 |
|
130 |
dosym usr/include $(alt_prefix)/sys-include |
130 |
dosym usr/include $(alt_arch_prefix)/sys-include |
131 |
return 0 |
131 |
return 0 |
132 |
fi |
132 |
fi |
133 |
|
133 |
|
Lines 137-143
toolchain-glibc_src_install() {
Link Here
|
137 |
-e "/^#/d" \ |
137 |
-e "/^#/d" \ |
138 |
-e "/SUPPORTED-LOCALES=/d" \ |
138 |
-e "/SUPPORTED-LOCALES=/d" \ |
139 |
-e "s: \\\\::g" -e "s:/: :g" \ |
139 |
-e "s: \\\\::g" -e "s:/: :g" \ |
140 |
"${S}"/localedata/SUPPORTED > "${D}"/usr/share/i18n/SUPPORTED \ |
140 |
"${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ |
141 |
|| die "generating /usr/share/i18n/SUPPORTED failed" |
141 |
|| die "generating /usr/share/i18n/SUPPORTED failed" |
142 |
cd "${WORKDIR}"/extra/locale |
142 |
cd "${WORKDIR}"/extra/locale |
143 |
dosbin locale-gen || die |
143 |
dosbin locale-gen || die |
Lines 150-156
toolchain-glibc_src_install() {
Link Here
|
150 |
local a |
150 |
local a |
151 |
keepdir /usr/$(get_libdir)/locale |
151 |
keepdir /usr/$(get_libdir)/locale |
152 |
for a in $(get_install_abis) ; do |
152 |
for a in $(get_install_abis) ; do |
153 |
if [[ ! -e ${D}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then |
153 |
if [[ ! -e ${ED}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then |
154 |
dosym /usr/$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale |
154 |
dosym /usr/$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale |
155 |
fi |
155 |
fi |
156 |
done |
156 |
done |
Lines 166-178
toolchain-glibc_src_install() {
Link Here
|
166 |
doinitd "${WORKDIR}"/extra/etc/nscd || die |
166 |
doinitd "${WORKDIR}"/extra/etc/nscd || die |
167 |
|
167 |
|
168 |
local nscd_args=( |
168 |
local nscd_args=( |
169 |
-e "s:@PIDFILE@:$(strings "${D}"/usr/sbin/nscd | grep nscd.pid):" |
169 |
-e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" |
170 |
) |
170 |
) |
171 |
version_is_at_least 2.16 || nscd_args+=( -e 's: --foreground : :' ) |
171 |
version_is_at_least 2.16 || nscd_args+=( -e 's: --foreground : :' ) |
172 |
sed -i "${nscd_args[@]}" "${D}"/etc/init.d/nscd |
172 |
sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd |
173 |
else |
173 |
else |
174 |
# Do this since extra/etc/*.conf above might have nscd.conf. |
174 |
# Do this since extra/etc/*.conf above might have nscd.conf. |
175 |
rm -f "${D}"/etc/nscd.conf |
175 |
rm -f "${ED}"/etc/nscd.conf |
176 |
fi |
176 |
fi |
177 |
|
177 |
|
178 |
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc |
178 |
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc |
Lines 184-190
toolchain-glibc_src_install() {
Link Here
|
184 |
|
184 |
|
185 |
# Prevent overwriting of the /etc/localtime symlink. We'll handle the |
185 |
# Prevent overwriting of the /etc/localtime symlink. We'll handle the |
186 |
# creation of the "factory" symlink in pkg_postinst(). |
186 |
# creation of the "factory" symlink in pkg_postinst(). |
187 |
rm -f "${D}"/etc/localtime |
187 |
rm -f "${ED}"/etc/localtime |
188 |
} |
188 |
} |
189 |
|
189 |
|
190 |
toolchain-glibc_headers_install() { |
190 |
toolchain-glibc_headers_install() { |
Lines 216-222
src_strip() {
Link Here
|
216 |
# if user has stripping enabled and does not have split debug turned on, |
216 |
# if user has stripping enabled and does not have split debug turned on, |
217 |
# then leave the debugging sections in libpthread. |
217 |
# then leave the debugging sections in libpthread. |
218 |
if ! has nostrip ${FEATURES} && ! has splitdebug ${FEATURES} ; then |
218 |
if ! has nostrip ${FEATURES} && ! has splitdebug ${FEATURES} ; then |
219 |
${STRIP:-${CTARGET}-strip} --strip-debug "${D}"/*/libpthread-*.so |
219 |
${STRIP:-${CTARGET}-strip} --strip-debug "${ED}"/*/libpthread-*.so |
220 |
fi |
220 |
fi |
221 |
} |
221 |
} |
222 |
|
222 |
|