All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix extern inline errors with gcc 4.3.0
@ 2008-06-26 13:50 Benny Halevy
  2008-06-27 16:26   ` Jeff Dike
  2008-07-14 18:30 ` David Shane Holden
  0 siblings, 2 replies; 23+ messages in thread
From: Benny Halevy @ 2008-06-26 13:50 UTC (permalink / raw)
  To: Jeff Dike; +Cc: user-mode-linux-devel, linux-kernel, Benny Halevy

gcc 4.3.0 needs -funit-at-a-time for extern inline functions
otherwise it doesn't find their body.

For example:
$ gcc --version
gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)

/usr0/export/dev/bhalevy/git/linux-pnfs-bh-nfs41/fs/buffer.c: In function ‘alloc_page_buffers’:
/usr0/export/dev/bhalevy/git/linux-pnfs-bh-nfs41/fs/buffer.c:51: sorry, unimplemented: inlining failed in call to ‘init_buffer’: function body not available
/usr0/export/dev/bhalevy/git/linux-pnfs-bh-nfs41/fs/buffer.c:948: sorry, unimplemented: called from here

Fix follows the lines of commit 22eecde2f9034764a3fd095eecfa3adfb8ec9a98
that was reverted by commit c0a18111e571138747a98af18b3a2124df56a0d1,
just limiting the flag for pre- gcc 4.3.0 rather than 4.0.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 arch/um/Makefile |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/um/Makefile b/arch/um/Makefile
index dbeab15..e7ed37b 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -77,7 +77,11 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
 KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \
 			 -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES))
 KBUILD_CFLAGS += $(KERNEL_DEFINES)
-KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
+# Disable unit-at-a-time mode on pre-gcc-4.3 compilers, it makes gcc use
+# a lot more stack due to the lack of sharing of stacklots:
+# gcc 4.3.0 needs -funit-at-a-time for extern inline functions
+KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0403 ] ; then \
+			echo $(call cc-option,-fno-unit-at-a-time); fi ;)
 
 PHONY += linux
 
-- 
1.5.6.GIT


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

end of thread, other threads:[~2008-08-08  1:43 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-26 13:50 [PATCH] fix extern inline errors with gcc 4.3.0 Benny Halevy
2008-06-27 16:26 ` [uml-devel] " Jeff Dike
2008-06-27 16:26   ` Jeff Dike
2008-06-28 13:10   ` Halevy, Benny
2008-06-29  7:32     ` [SPAM] Re: [uml-devel] " Benny Halevy
2008-06-29  7:32       ` Benny Halevy
2008-06-30 16:22       ` [uml-devel] " Jeff Dike
2008-06-30 16:22         ` Jeff Dike
2008-06-30 16:37         ` [uml-devel] " Benny Halevy
2008-06-30 16:37           ` Benny Halevy
2008-07-07 16:58           ` [uml-devel] " Jeff Dike
2008-07-07 16:58             ` Jeff Dike
2008-06-30 16:43         ` [uml-devel] " Adrian Bunk
2008-06-30 16:43           ` Adrian Bunk
2008-08-08  1:02         ` [uml-devel] " Rob Landley
2008-08-08  1:02           ` Rob Landley
2008-08-08  1:42         ` Rob Landley
2008-08-08  1:42           ` Rob Landley
2008-07-14 18:30 ` David Shane Holden
2008-07-15 16:24   ` Jeff Dike
2008-07-15 18:42     ` [SPAM] " David Shane Holden
2008-07-15 20:13       ` Jeff Dike
     [not found]         ` <487DDF69.9030801@panasas.com>
     [not found]           ` <487DE1B3.1060502@panasas.com>
2008-07-18 20:49             ` Jeff Dike

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.