* [Qemu-devel] [PATCH 1/2] Remove CFLAGS parameter in cc-option [not found] <cover.1251672463.git.quintela@redhat.com> @ 2009-08-30 22:48 ` Juan Quintela 2009-08-31 6:54 ` [Qemu-devel] " Paolo Bonzini 2009-08-30 22:48 ` [Qemu-devel] [PATCH 2/2] otionrom: Use local CFLAGS no global one Juan Quintela 1 sibling, 1 reply; 3+ messages in thread From: Juan Quintela @ 2009-08-30 22:48 UTC (permalink / raw) To: qemu-devel; +Cc: aliguori With cc-option we are testing if gcc just accept a particular option, we don't need CFLAGS at all. And this fixes the recursive problem with CFLAGS Signed-off-by: Juan Quintela <quintela@redhat.com> --- pc-bios/optionrom/Makefile | 2 +- rules.mak | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index 0fbd3ab..097bcf4 100644 --- a/pc-bios/optionrom/Makefile +++ b/pc-bios/optionrom/Makefile @@ -9,7 +9,7 @@ VPATH=$(SRC_PATH)/pc-bios/optionrom CFLAGS = -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin CFLAGS += -I$(SRC_PATH) -CFLAGS += $(call cc-option, $(CFLAGS), -fno-stack-protector,"") +CFLAGS += $(call cc-option, -fno-stack-protector,"") build-all: multiboot.bin diff --git a/rules.mak b/rules.mak index c0315ac..3fdbfd3 100644 --- a/rules.mak +++ b/rules.mak @@ -19,7 +19,7 @@ LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(1) $(ARLIBS_BEGIN) $(ARLIBS quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1)) # cc-option -# Usage: CFLAGS+=$(call cc-option, $(CFLAGS), -falign-functions=0, -malign-functions=0) +# Usage: CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0) -cc-option = $(shell if $(CC) $(1) $(2) -S -o /dev/null -xc /dev/null \ - > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi ;) +cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \ + > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) -- 1.6.2.5 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] Re: [PATCH 1/2] Remove CFLAGS parameter in cc-option 2009-08-30 22:48 ` [Qemu-devel] [PATCH 1/2] Remove CFLAGS parameter in cc-option Juan Quintela @ 2009-08-31 6:54 ` Paolo Bonzini 0 siblings, 0 replies; 3+ messages in thread From: Paolo Bonzini @ 2009-08-31 6:54 UTC (permalink / raw) To: Juan Quintela; +Cc: aliguori, qemu-devel On 08/31/2009 12:48 AM, Juan Quintela wrote: > With cc-option we are testing if gcc just accept a particular option, we don't need CFLAGS at all. ACK, however these should IMO be moved to configure. This: > CFLAGS += $(call cc-option, -fno-stack-protector,"") is likely responsible of at least 20% system time to the compilation (because one normal compilation costs three forks for gcc+cc1+as, and cc-option costs two more for gcc+cc1). Paolo ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 2/2] otionrom: Use local CFLAGS no global one [not found] <cover.1251672463.git.quintela@redhat.com> 2009-08-30 22:48 ` [Qemu-devel] [PATCH 1/2] Remove CFLAGS parameter in cc-option Juan Quintela @ 2009-08-30 22:48 ` Juan Quintela 1 sibling, 0 replies; 3+ messages in thread From: Juan Quintela @ 2009-08-30 22:48 UTC (permalink / raw) To: qemu-devel; +Cc: aliguori It is needed by %.o : %.c rule. Signed-off-by: Juan Quintela <quintela@redhat.com> --- pc-bios/optionrom/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index 097bcf4..78ce684 100644 --- a/pc-bios/optionrom/Makefile +++ b/pc-bios/optionrom/Makefile @@ -10,6 +10,7 @@ VPATH=$(SRC_PATH)/pc-bios/optionrom CFLAGS = -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin CFLAGS += -I$(SRC_PATH) CFLAGS += $(call cc-option, -fno-stack-protector,"") +QEMU_CFLAGS = $(CFLAGS) build-all: multiboot.bin -- 1.6.2.5 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-31 6:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1251672463.git.quintela@redhat.com>
2009-08-30 22:48 ` [Qemu-devel] [PATCH 1/2] Remove CFLAGS parameter in cc-option Juan Quintela
2009-08-31 6:54 ` [Qemu-devel] " Paolo Bonzini
2009-08-30 22:48 ` [Qemu-devel] [PATCH 2/2] otionrom: Use local CFLAGS no global one Juan Quintela
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.