linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] powerpc: crtsaveres.o needed only when -Os flag is enabled
@ 2014-04-29  0:05 Ram Pai
  2014-04-29 15:38 ` Brian W Hart
  2014-05-02  5:39 ` Aneesh Kumar K.V
  0 siblings, 2 replies; 6+ messages in thread
From: Ram Pai @ 2014-04-29  0:05 UTC (permalink / raw)
  To: benh, paulus; +Cc: Ram Pai, linuxppc-dev, hartb, anton, tony

    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)

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

end of thread, other threads:[~2014-05-02 17:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-29  0:05 [PATCH 1/1] powerpc: crtsaveres.o needed only when -Os flag is enabled Ram Pai
2014-04-29 15:38 ` 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

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).