[PATCH] Introduce new gold plugin option "relocation-pic"

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Feb 14 08:54:44 PST 2014


On 14 February 2014 11:45, Alexey Volkov <avolkov.intel at gmail.com> wrote:
>
>   Unfortunately my last patch cannot work with -Wl compiler option.
>   E.g. passing -Wl,-shared will not set OPT_shared variable and so -shared and -pie both passed to linker.
>   Linker will complain about incompatible options.
>   I am not sure if parsing -Wl option value for shared, static, etc is acceptable here.
>   In my first patch addition of new gold plugin option does not have such problems.

It has stranger ones. The gold plugin and the linker should be in
agreement as to the type of output they are working to produce.

Clang has to parse -Wl options, so maybe the logic in the current
patch should be moved down a bit and work directly on the flags the
driver already has for passing to the linker?

Cheers,
Rafael



More information about the llvm-commits mailing list