1 |
Author: grobian |
2 |
Date: 2009-10-30 21:41:43 +0000 (Fri, 30 Oct 2009) |
3 |
New Revision: 14748 |
4 |
|
5 |
Modified: |
6 |
main/branches/prefix/bin/misc-functions.sh |
7 |
Log: |
8 |
add finetunings by haubi |
9 |
|
10 |
Modified: main/branches/prefix/bin/misc-functions.sh |
11 |
=================================================================== |
12 |
--- main/branches/prefix/bin/misc-functions.sh 2009-10-30 21:39:56 UTC (rev 14747) |
13 |
+++ main/branches/prefix/bin/misc-functions.sh 2009-10-30 21:41:43 UTC (rev 14748) |
14 |
@@ -881,6 +881,13 @@ |
15 |
fi |
16 |
|
17 |
rm -f "${PORTAGE_BUILDDIR}"/build-info/NEEDED.XCOFF.1 |
18 |
+ |
19 |
+ local neededfd |
20 |
+ for neededfd in {3..1024} none; do ( : <&${neededfd} ) 2>/dev/null || break; done |
21 |
+ [[ ${neededfd} != none ]] || die "cannot find free file descriptor handle" |
22 |
+ |
23 |
+ eval "exec ${neededfd}>\"${PORTAGE_BUILDDIR}\"/build-info/NEEDED.XCOFF.1" || die "cannot open ${PORTAGE_BUILDDIR}/build-info/NEEDED.XCOFF.1" |
24 |
+ |
25 |
find "${ED}" -not -type d -exec \ |
26 |
"${EPREFIX}/usr/bin/aixdll-query" '{}' FILE MEMBER FLAGS FORMAT RUNPATH DEPLIBS ';' \ |
27 |
> "${T}"/needed 2>/dev/null |
28 |
@@ -917,7 +924,7 @@ |
29 |
|
30 |
if [[ ${prev_FILE} != ${FILE} ]]; then |
31 |
# Save NEEDED information for the archive library stub |
32 |
- echo "${FORMAT##* }${FORMAT%%-*};${FILE#${D%/}};${FILE##*/};;" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.XCOFF.1 |
33 |
+ echo "${FORMAT##* }${FORMAT%%-*};${FILE#${D%/}};${FILE##*/};;" >&${neededfd} |
34 |
fi |
35 |
|
36 |
# Make sure we disallow insecure RUNPATH's |
37 |
@@ -925,8 +932,8 @@ |
38 |
# (older, broken libtools would do this). Also check for null paths |
39 |
# because the loader will search $PWD when it finds null paths. |
40 |
# And we really want absolute paths only. |
41 |
- if [[ -n $(echo ":${RUNPATH}:" | grep -E "(${PORTAGE_BUILDDIR}|::|:[^/])") ]]; then |
42 |
- insecure_rpath_list="${insecure_rpath_list}\n${FILE}" |
43 |
+ if [[ " ${FLAGS} " == *" SHROBJ "* && -n $(echo ":${RUNPATH}:" | grep -E "(${PORTAGE_BUILDDIR}|::|:[^/])") ]]; then |
44 |
+ insecure_rpath_list="${insecure_rpath_list}\n${FILE}${MEMBER:+[${MEMBER}]}" |
45 |
fi |
46 |
|
47 |
# Although we do have runtime linking, we don't want undefined symbols. |
48 |
@@ -945,9 +952,11 @@ |
49 |
|
50 |
[[ -n ${MEMBER} ]] && MEMBER="[${MEMBER}]" |
51 |
# Save NEEDED information |
52 |
- echo "${FORMAT##* }${FORMAT%%-*};${FILE}${MEMBER};${FILE##*/}${MEMBER};${RUNPATH};${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.XCOFF.1 |
53 |
+ echo "${FORMAT##* }${FORMAT%%-*};${FILE}${MEMBER};${FILE##*/}${MEMBER};${RUNPATH};${needed}" >&${neededfd} |
54 |
done <"${T}"/needed |
55 |
|
56 |
+ eval "exec ${neededfd}>&-" || die "cannot close handle to ${PORTAGE_BUILDDIR}/build-info/NEEDED.XCOFF.1" |
57 |
+ |
58 |
if [[ -n ${undefined_symbols_list} ]]; then |
59 |
vecho -ne '\a\n' |
60 |
eqawarn "QA Notice: The following files contain undefined symbols." |
61 |
@@ -964,7 +973,7 @@ |
62 |
eqawarn " with 'prefix' as the maintaining herd of the package." |
63 |
eqawarn "${insecure_rpath_list}" |
64 |
vecho -ne '\a\n' |
65 |
- if [[ -n ${x} ]] || has stricter ${FEATURES} ; then |
66 |
+ if has stricter ${FEATURES} ; then |
67 |
insecure_rpath=1 |
68 |
fi |
69 |
fi |