| @@ -1,42 +1,51 @@ | | | @@ -1,42 +1,51 @@ |
1 | Mode detection: | | 1 | Mode detection: |
2 | | | 2 | |
3 | -E preprocess-only | | 3 | -E preprocess-only |
4 | -S assembly-only | | 4 | -S assembly-only |
5 | -c compile-only | | 5 | -c compile-only |
6 | | | 6 | |
7 | --> Consider to drop the various linker options | | 7 | --> Consider to drop the various linker options |
8 | | | 8 | |
9 | Cleanup: | | 9 | Cleanup: |
10 | | | 10 | |
11 | - Remove redundant -D options. Should keep -U in mind. | | 11 | - Remove redundant -D options. Should keep -U in mind. |
12 | | | 12 | |
13 | Library path resorting: | | 13 | Library path resorting: |
14 | | | 14 | |
15 | - Reorder -l to be after all -L options, duplicate -Wl,-dynamic / -Wl,-static | | 15 | - Reorder -l to be after all -L options, duplicate -Wl,-dynamic / -Wl,-static |
16 | options in the library list. Should this also take -Wl,-rpath-link into | | 16 | options in the library list. Should this also take -Wl,-rpath-link into |
17 | account? | | 17 | account? |
18 | | | 18 | |
19 | Scan: | | 19 | Scan: |
20 | | | 20 | |
21 | - Append extra_args only if -v is not used | | 21 | - Append extra_args only if -v is not used |
22 | | | 22 | |
23 | Scan for ld: | | 23 | Scan for ld: |
24 | | | 24 | |
25 | - Strip -Wl, | | 25 | - Strip -Wl, |
26 | - Silently drop -pthread | | 26 | - Silently drop -pthread |
27 | | | 27 | |
28 | Platform specific processing: | | 28 | Platform specific processing: |
29 | | | 29 | |
30 | - All platforms but Darwin have _USE_RPATH=yes. Shouldn't Darwin just | | 30 | - All platforms but Darwin have _USE_RPATH=yes. Shouldn't Darwin just |
31 | filter out the rpath rules in a platform specific transformation phase? | | 31 | filter out the rpath rules in a platform specific transformation phase? |
32 | | | 32 | |
33 | Transform: | | 33 | Transform: |
34 | | | 34 | |
35 | - opt:foo:bar: Replace all options matching foo with bar. foo might be | | 35 | - opt:foo:bar: Replace all options matching foo with bar. foo might be |
36 | fnmatch expression. Earlier than other transformations. If bar is empty, | | 36 | fnmatch expression. Earlier than other transformations. If bar is empty, |
37 | option is dropped. | | 37 | option is dropped. |
38 | | | 38 | |
39 | Libtool: | | 39 | Libtool: |
40 | | | 40 | |
41 | - Drop -L, -l, -Wl,* if not in link mode | | 41 | - Drop -L, -l, -Wl,* if not in link mode |
42 | -> see first point | | 42 | -> see first point |
| | | 43 | |
| | | 44 | rpath aggregation: |
| | | 45 | |
| | | 46 | - OSF1 and HP-UX ld(1) do not support multiple -rpath or +b. Any such instances |
| | | 47 | need to be transformed to a colon-separated list. Example: |
| | | 48 | |
| | | 49 | -Wl,-rpath -Wl,/dir1 -Wl,-rpath -Wl,/dir2 --> -Wl,+b -Wl,/dir1:/dir2 |
| | | 50 | |
| | | 51 | See cmd-sink-{hpux,osf1}-{ld,cc} in classic wrappers for more information. |