1 |
On Saturday 04 April 2009 13:17:56 Fabian Groffen (grobian) wrote: |
2 |
> grobian 09/04/04 17:17:56 |
3 |
> |
4 |
> Modified: toolchain-funcs.eclass |
5 |
> Log: |
6 |
> Add support for all Prefix arches, in particular for gen_usr_ld_script, |
7 |
> and add AIX specific function, backport from Prefix |
8 |
|
9 |
you really should have posted this to the toolchain alias before committing. |
10 |
and done a whitespace check as there's incorrect mixing of leading |
11 |
spaces/tabs, as well as trailing whitespace. |
12 |
|
13 |
> + powerpc-apple-darwin*) |
14 |
> + echo ppc-macos;; |
15 |
|
16 |
these should all be on one line each |
17 |
|
18 |
> + # Ensure /lib/${lib} exists to avoid dangling scripts/symlinks. |
19 |
> + # This especially is for AIX where $(get_libname) can return ".a", |
20 |
> + # so /lib/${lib} might be moved to /usr/lib/${lib} (by accident). |
21 |
> + [[ -r "${ED}"/${libdir}/${lib} ]] || continue |
22 |
|
23 |
the quotes are useless. i'm assuming ${ED} is like ${D} and you're not |
24 |
reading stuff in / here. |
25 |
|
26 |
> + *-mint*) |
27 |
> + # do nothing |
28 |
> + return |
29 |
> + ;; |
30 |
|
31 |
this really should be at the top of the function ... doing a case statement |
32 |
inside of the for loop implies that any targets that have made it that far are |
33 |
sane. |
34 |
|
35 |
> +# This function is for AIX only. |
36 |
> +# |
37 |
> +# Showing a sample IMO is the best description: |
38 |
|
39 |
there is a documentation format for eclasses you should have used here |
40 |
|
41 |
> + local sources="$@" |
42 |
|
43 |
this doesnt do what you think it does. it's the same as "$*" which means this |
44 |
function does not handle quoted arguments properly. |
45 |
|
46 |
> + local tmpdir=${TMP}/keep_aix_runtime_object-$$ |
47 |
> + mkdir ${tmpdir} || die |
48 |
|
49 |
eutils already provides a function to create a temp dir |
50 |
|
51 |
> + local origdir=$(pwd) |
52 |
> + ... |
53 |
> + cd "${origdir}" |
54 |
|
55 |
pushd/popd exist for a reason |
56 |
|
57 |
> + cd ${tmpdir} || die |
58 |
|
59 |
changing into the dir in every iteration of the loop is pointless |
60 |
|
61 |
> + chmod +w ${so} && |
62 |
> + $(tc-getSTRIP) -e ${so} && |
63 |
> + $(tc-getAR) -q "${ED}${target}" ${so} && |
64 |
> + eend 0 || |
65 |
> + eend 1 |
66 |
|
67 |
everything after the chmod really needs to be intended |
68 |
-mike |