qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Only build with -g CFLAGS/LDFLAGS if using --en


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH] Only build with -g CFLAGS/LDFLAGS if using --enable-debug and add --optflags.
Date: Wed, 07 Sep 2011 12:54:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Brad <address@hidden> wrote:
> ----- Original message -----
>> On 09/06/11 10:02, Brad wrote:
>> > Only build with -g CFLAGS/LDFLAGS if using --enable-debug.
>> > Add --optflags to allow overriding the default optimization
>> > level added to CFLAGS.
>> > 
>> > This is a first draft of coming up with a patch I could potentially
>> > push upstream based on much cruder local patches to do something
>> > similar. I'm trying to eliminate having to patch the configure
>> > script.
>> 
>> You don't have to.   You can just run 'make CFLAGS="$optflags"' to 
>> override the defaults.   Nevertheless having optflags would be nice as 
>> you don't have to type this for each make run then.
>
> I do when its unconditionally on the commandline either way. If the configure 
> scipt didnt put it their if CFLAGS wasnt empty it wouldnt be an issue.

        $(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) 
$(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  CC    $(TARGET_DIR)$@")

this is the rule called in rules.make.  QEMU don't use CFLAGS
internally^W^W^W^W, it is only used for -g -O2, so it should be enough
to use make CFLAGS="" or something like that.

>
>> I don't think we should mess with the -g flag.   It should stay enabled 
>> by default, so you can easily get a useful stacktrace out of a core 
>> without having to rebuild with debug info first.
>
> I dont care what the default is as long as I can disable it without patching.

What is the reason for that?  I guess that compilation speed/memory, but
just to be sure.

Later, Juan.



reply via email to

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