linux-um archives
 help / color / mirror / Atom feed
From: David Shane Holden <dpejesh@yahoo.com>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [PATCH] fix extern inline errors with gcc 4.3.0
Date: Mon, 14 Jul 2008 11:30:15 -0700	[thread overview]
Message-ID: <g5g5vo$hok$1@ger.gmane.org> (raw)
In-Reply-To: <1214488251-20927-1-git-send-email-bhalevy@panasas.com>

I tried to build a UML 2.6.26 kernel on Debian (32-bit) and ran into the 
same problem reported here http://marc.info/?t=121011533500002&r=1&w=2. 
  If I use gcc 4.3 everything works fine, but if I use gcc 4.1 or 4.2, 
UML crashes on startup.  I changed the gcc version check to 0430 and 
both 4.1 and 4.2 compiled kernels worked fine.

Also, is there any chance of getting a SKAS4 patch against 2.6.26?  I 
was trying to test it against 2.6.25.10 and had some strange issues.  I 
was running Debian Etch inside VMWare with a 2.6.25.10 SKAS4-enabled 
kernel.  When I tried to start up a UML instance from root or a non-root 
account I was getting the same problem reported here.. 
http://thread.gmane.org/gmane.linux.uml.user/13045/focus=13059.  Now the 
weird part is if I started UML via sudo from a non-root account I'd get 
a segfault somewhere in libc but then UML would boot up into a working 
Linux environment saying SKAS4 was enabled.  Was hoping to try and test 
it some more on a newer kernel if there's a patch available.

Benny Halevy wrote:
> 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
>  


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  parent reply	other threads:[~2008-07-14 18:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1214488251-20927-1-git-send-email-bhalevy@panasas.com>
2008-06-27 16:26 ` [uml-devel] [PATCH] fix extern inline errors with gcc 4.3.0 Jeff Dike
     [not found]   ` <7225594ED4A1304C9E43D030A886D221050BE1@daytona.int.panasas.com>
2008-06-29  7:32     ` [SPAM] " Benny Halevy
2008-06-30 16:22       ` Jeff Dike
2008-06-30 16:37         ` Benny Halevy
2008-07-07 16:58           ` Jeff Dike
2008-06-30 16:43         ` Adrian Bunk
2008-08-08  1:02         ` Rob Landley
2008-08-08  1:42         ` Rob Landley
2008-07-14 18:30 ` David Shane Holden [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='g5g5vo$hok$1@ger.gmane.org' \
    --to=dpejesh@yahoo.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox