52 lines
1.2 KiB
Plaintext
52 lines
1.2 KiB
Plaintext
Mode detection:
|
|
|
|
-E preprocess-only
|
|
-S assembly-only
|
|
-c compile-only
|
|
|
|
--> Consider to drop the various linker options
|
|
|
|
Cleanup:
|
|
|
|
- Remove redundant -D options. Should keep -U in mind.
|
|
|
|
Library path resorting:
|
|
|
|
- Reorder -l to be after all -L options, duplicate -Wl,-dynamic / -Wl,-static
|
|
options in the library list. Should this also take -Wl,-rpath-link into
|
|
account?
|
|
|
|
Scan:
|
|
|
|
- Append extra_args only if -v is not used
|
|
|
|
Scan for ld:
|
|
|
|
- Strip -Wl,
|
|
- Silently drop -pthread
|
|
|
|
Platform specific processing:
|
|
|
|
- All platforms but Darwin have _USE_RPATH=yes. Shouldn't Darwin just
|
|
filter out the rpath rules in a platform specific transformation phase?
|
|
|
|
Transform:
|
|
|
|
- opt:foo:bar: Replace all options matching foo with bar. foo might be
|
|
fnmatch expression. Earlier than other transformations. If bar is empty,
|
|
option is dropped.
|
|
|
|
Libtool:
|
|
|
|
- Drop -L, -l, -Wl,* if not in link mode
|
|
-> see first point
|
|
|
|
rpath aggregation:
|
|
|
|
- OSF1 and HP-UX ld(1) do not support multiple -rpath or +b. Any such instances
|
|
need to be transformed to a colon-separated list. Example:
|
|
|
|
-Wl,-rpath -Wl,/dir1 -Wl,-rpath -Wl,/dir2 --> -Wl,+b -Wl,/dir1:/dir2
|
|
|
|
See cmd-sink-{hpux,osf1}-{ld,cc} in classic wrappers for more information.
|