aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.ravnborg.org>2004-10-17 15:41:54 +0200
committerSam Ravnborg <sam@mars.ravnborg.org>2004-10-17 15:41:54 +0200
commit78a14efa246b43d8bfcd64ffa214183a72f578b5 (patch)
treead8f09ccd725d9a18e6435fb20b27cc144ef0911 /Makefile
parentbd7829aba23654e27df90c2baca600c540464820 (diff)
downloadhistory-78a14efa246b43d8bfcd64ffa214183a72f578b5.tar.gz
kbuild: Add cc-option-align
gcc version >= 3.00 shifted from -malign-* to -falign-*. $(cc-option-align) will based on current gcc version specify the right prefix for the align option. Documented in Documentation/makefiles.txt Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 27b6b47270ddcf..ba82153bbd815c 100644
--- a/Makefile
+++ b/Makefile
@@ -295,6 +295,11 @@ check_gcc = $(warning check_gcc is deprecated - use cc-option) \
cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
> /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
+# cc-option-align
+# Prefix align with either -falign or -malign
+cc-option-align = $(subst -functions=0,,\
+ $(call cc-option,-falign-functions=0,-malign-functions=0))
+
# cc-version
# Usage gcc-ver := $(call cc-version $(CC))
cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \