Skip to content

Instantly share code, notes, and snippets.

@dileks
Created April 13, 2011 13:10
Show Gist options
  • Select an option

  • Save dileks/917507 to your computer and use it in GitHub Desktop.

Select an option

Save dileks/917507 to your computer and use it in GitHub Desktop.
Make -freg-struct-return argument a call cc-option
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 637f61a..df7d9f5 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -25,7 +25,8 @@ ifeq ($(CONFIG_X86_32),y)
LDFLAGS_vmlinux := --emit-relocs
endif
- KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return
+ KBUILD_CFLAGS += -msoft-float -mregparm=3 \
+ $(call cc-option,-freg-struct-return)
# prevent gcc from keeping the stack 16 byte aligned
KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment