linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: Jeff Mahoney <jeffm@suse.de>
Cc: linuxppc-dev@ozlabs.org, reiserfs-dev@namesys.com
Subject: [PATCH] make gcc -O1 in fs/reiserfs optional
Date: Tue, 26 Apr 2005 23:10:19 +0200	[thread overview]
Message-ID: <20050426211019.GA11579@suse.de> (raw)

Jeff,

you added this EXTRA_CFLAGS= during 2.4 development, I think the broken
compiler was gcc 3.2 on SLES8. Can we turn this -O1 into a .config
option?


Signed-off-by: Olaf Hering <olh@suse.de>

Index: linux-2.6.12-rc3-olh/fs/reiserfs/Makefile
===================================================================
--- linux-2.6.12-rc3-olh.orig/fs/reiserfs/Makefile
+++ linux-2.6.12-rc3-olh/fs/reiserfs/Makefile
@@ -21,13 +21,7 @@ ifeq ($(CONFIG_REISERFS_FS_POSIX_ACL),y)
 reiserfs-objs += xattr_acl.o
 endif
 
-# gcc -O2 (the kernel default)  is overaggressive on ppc32 when many inline
-# functions are used.  This causes the compiler to advance the stack
-# pointer out of the available stack space, corrupting kernel space,
-# and causing a panic. Since this behavior only affects ppc32, this ifeq
-# will work around it. If any other architecture displays this behavior,
-# add it here.
-ifeq ($(CONFIG_PPC32),y)
+ifeq ($(CONFIG_REISERFS_CC_REDUCE_OPTIMZE),y)
 EXTRA_CFLAGS := -O1
 endif
 
Index: linux-2.6.12-rc3-olh/fs/Kconfig
===================================================================
--- linux-2.6.12-rc3-olh.orig/fs/Kconfig
+++ linux-2.6.12-rc3-olh/fs/Kconfig
@@ -186,6 +186,18 @@ config REISERFS_FS
 	  If you like it, you can pay us to add new features to it that you
 	  need, buy a support contract, or pay us to port it to another OS.
 
+config REISERFS_CC_REDUCE_OPTIMZE
+	bool "Reduce CC optimization level to workaround compiler bugs"
+	depends on PPC32
+	default n
+	help
+	  gcc -O2 (the kernel default) is overaggressive on ppc32 when many inline
+	  functions are used.  This causes the compiler to advance the stack
+	  pointer out of the available stack space, corrupting kernel space,
+	  and causing a panic. Since this behavior only affects ppc32, this ifeq
+	  will work around it. If any other architecture displays this behavior,
+	  add it here.
+
 config REISERFS_CHECK
 	bool "Enable reiserfs debug mode"
 	depends on REISERFS_FS

             reply	other threads:[~2005-04-26 21:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-26 21:10 Olaf Hering [this message]
2005-04-26 21:46 ` [PATCH] make gcc -O1 in fs/reiserfs optional Jeff Mahoney
2005-04-27 13:40 ` Hans Reiser
2005-10-11 19:01   ` Olaf Hering
2005-10-11 20:04     ` Hans Reiser
2005-10-13 23:27     ` Andrew Morton
2005-10-14  1:17       ` Jeff Mahoney
2006-07-24  6:52     ` [PATCH] use gcc -O1 in fs/reiserfs only for ancient gcc versions Olaf Hering

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=20050426211019.GA11579@suse.de \
    --to=olh@suse.de \
    --cc=jeffm@suse.de \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=reiserfs-dev@namesys.com \
    /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;
as well as URLs for NNTP newsgroup(s).