All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ram Pai <linuxram@us.ibm.com>
To: benh@kernel.crashing.org, paulus@samba.org
Cc: Ram Pai <linuxram@us.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, hartb@us.ibm.com, anton@samba.org,
	tony@ozlabs.au.ibm.com
Subject: [PATCH 1/1] powerpc: crtsaveres.o needed only when -Os flag is enabled
Date: Mon, 28 Apr 2014 17:05:08 -0700	[thread overview]
Message-ID: <1398729908-15787-1-git-send-email-linuxram@us.ibm.com> (raw)

    powerpc: crtsaveres.o needed only when -Os flag is enabled
    
    Currently on powerpc arch, out-of-tree module fails to build without
    crtsaveres.o, even when the module has no dependency on the symbols
    provided by the file; when built without the -Os flag.
    
    BTW: '-Os' flag is enabled when CONFIG_CC_OPTIMIZE_FOR_SIZE is
    configured.
    
    This patch fixes that problem.
    
Signed-off-by: Ram Pai <linuxram@us.ibm.com>

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 4c0cedf..cf12f38 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -157,7 +157,10 @@ CPP		= $(CC) -E $(KBUILD_CFLAGS)
 
 CHECKFLAGS	+= -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__
 
+ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
+endif
+
 
 # No AltiVec or VSX instructions when building kernel
 KBUILD_CFLAGS += $(call cc-option,-mno-altivec)

             reply	other threads:[~2014-04-29  0:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-29  0:05 Ram Pai [this message]
2014-04-29 15:38 ` [PATCH 1/1] powerpc: crtsaveres.o needed only when -Os flag is enabled Brian W Hart
2014-04-30  5:14   ` Benjamin Herrenschmidt
2014-04-30 18:43     ` Ram Pai
2014-05-02  5:39 ` Aneesh Kumar K.V
2014-05-02 17:47   ` Ram Pai

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=1398729908-15787-1-git-send-email-linuxram@us.ibm.com \
    --to=linuxram@us.ibm.com \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=hartb@us.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    --cc=tony@ozlabs.au.ibm.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 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.