[cfe-commits] r118382 - in /cfe/trunk: include/clang/Driver/Options.td lib/Driver/ToolChains.cpp lib/Driver/ToolChains.h lib/Driver/Tools.cpp lib/Driver/Tools.h test/Driver/emit-llvm.c test/Driver/sysroot-flags.c

İsmail Dönmez ismail at namtrac.org
Mon Nov 8 02:25:47 PST 2010


Hi;

On Mon, Nov 8, 2010 at 12:16 PM, Frits van Bommel <fvbommel at gmail.com>wrote:

> On Sun, Nov 7, 2010 at 9:14 PM, Rafael Espindola
> <rafael.espindola at gmail.com> wrote:
> > +  if (IsUbuntu(Distro))
> > +    ExtraOpts.push_back("-z relro");
>
> Regular binutils ld doesn't mind this, but gold gives an error: "ld:
> relro: unknown -z option" (note that there are _two_ spaces in front
> of "relro" there)
> I think the problem is that you're pushing this as a single argument
> with a space in it, and apparently gold doesn't strip the space when
> it processes the -z option.
> You should probably either push "-zrelro" or push "-z" and "relro"
> separately. (neither give an error from the command line, though I
> don't know what it's supposed to do so I can't check whether the first
> does what's expected...)
> The attached patch implements the second option.
>

As far as I know "-z,relro" should work too.

Regards,
ismail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101108/a14d3fbf/attachment.html>


More information about the cfe-commits mailing list