qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.0] configure: add option to disable -fstac


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH for-2.0] configure: add option to disable -fstack-protector flags
Date: Wed, 9 Apr 2014 08:40:50 +0100

On 8 April 2014 21:47, Noonan, Steven <address@hidden> wrote:
> On Tue, Apr 08, 2014 at 09:37:27PM +0100, Peter Maydell wrote:
>> This is bad because we have that framework argument as part of our
>> linker flags. Effectively this means that clang won't warn about the
>> argument at link time but will warn for every .c->.o compile (as well
>> as ending up with no stack protection).
>
> So -framework is designed to transparently add the appropriate -I and
> -L/-l flags, pointing to the insides of a .framework bundle.
>
> To me, the -framework arguments belong in CFLAGS and LIBS, but not
> LDFLAGS. In the context of QEMU's configure script, I think it'd be
> QEMU_INCLUDES and LIBS.

Unfortunately, putting "-framework CoreFoundation" in CFLAGS
produces a different warning:

manooth$ clang -o /tmp/zz9.o -Werror -fstack-protector -c /tmp/zz9.c
-framework CoreFoundation
clang: error: -framework CoreFoundation: 'linker' input unused

which would seem to imply that you shouldn't be passing it on
the .c->.o compile command line.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]