From 19f2a76f9b5ea3503c2cb8d3153f212e77eda92d Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Fri, 13 May 2016 09:29:09 +0200 Subject: Added option to pass linker options to gcc. Some gcc options have influence on the linking (especially -march, etc.). The new -WUl options allows it to pass the options to the gcc called for linking instead of passing them to the linker directly. Bug 18949. --- driver/Driver.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'driver/Driver.ml') diff --git a/driver/Driver.ml b/driver/Driver.ml index 17d7b997..567ff018 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -551,6 +551,7 @@ Linking options: -static Prevent linking with the shared libraries -T Use as linker command file -Wl, Pass option to the linker + -WUl, (GCC only) Pass option to the gcc used for linking -Xlinker Pass as an option to the linker -u Pretend the symbol is undefined to force linking of library modules to define it. @@ -738,6 +739,7 @@ let cmdline_actions = else push_linker_arg s); Prefix "-Wl,", Self push_linker_arg; + Prefix "-WUl,", Self (fun s -> List.iter push_linker_arg (explode_comma_option s)); Exact "-u", Self push_linker_arg; (* Tracing options *) Exact "-dprepro", Set option_dprepro; -- cgit