All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] compile with -funit-at-a-time option of gcc
@ 2005-06-30  4:53 aq
  2005-06-30  8:02 ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: aq @ 2005-06-30  4:53 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

This patch makes xen compiled with gcc option -funit-at-a-time if
supported. This option is available for gcc 3.4 and upward, which
reduces the .text binary size considerably.

Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>

$ diffstat configmk.patch 
 Config.mk |    6 ++++++
 1 files changed, 6 insertions(+)

[-- Attachment #2: configmk.patch --]
[-- Type: application/octet-stream, Size: 632 bytes --]

===== Config.mk 1.6 vs edited =====
--- 1.6/Config.mk	2005-06-18 18:24:47 +09:00
+++ edited/Config.mk	2005-06-30 13:41:06 +09:00
@@ -29,8 +29,14 @@
 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
 endif
 
+cc-option := $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
+             > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
+
+check_gcc := $(call cc-option, $(1),$(2))
+
 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) 
 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
+CFLAGS += $(call check_gcc,-funit-at-a-time,)
 
 # Choose the best mirror to download linux kernel
 KERNEL_REPO = http://www.kernel.org

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: [PATCH] compile with -funit-at-a-time option of gcc
@ 2005-06-30  7:21 Ian Pratt
  2005-06-30  8:04 ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Pratt @ 2005-06-30  7:21 UTC (permalink / raw)
  To: aq, xen-devel

> This patch makes xen compiled with gcc option 
> -funit-at-a-time if supported. This option is available for 
> gcc 3.4 and upward, which reduces the .text binary size considerably.

I haven't come across this option before. What does it actually do?  

Thanks,
Ian

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-06-30  9:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-30  4:53 [PATCH] compile with -funit-at-a-time option of gcc aq
2005-06-30  8:02 ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2005-06-30  7:21 Ian Pratt
2005-06-30  8:04 ` Keir Fraser
2005-06-30  9:12   ` Andi Kleen

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.