Skip to content
Snippets Groups Projects
Commit bd5bdd87 authored by Sam Ravnborg's avatar Sam Ravnborg
Browse files

kbuild: "PREEMPT" in UTS_VERSION


From: Matt Mackall <mpm@selenic.com>

Add PREEMPT to UTS_VERSION where enabled as is done for SMP to make
preempt kernels easily identifiable.
Added SMP PREEMPT as comment in compile.h to force it to be
updated when they change (sam).

Signed-off-by: default avatarMatt Mackall <mpm@selenic.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 6d30e3a8
No related branches found
No related tags found
No related merge requests found
...@@ -25,4 +25,5 @@ $(obj)/version.o: include/linux/compile.h ...@@ -25,4 +25,5 @@ $(obj)/version.o: include/linux/compile.h
include/linux/compile.h: FORCE include/linux/compile.h: FORCE
@echo ' CHK $@' @echo ' CHK $@'
@$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)" $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
"$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(CFLAGS)"
TARGET=$1 TARGET=$1
ARCH=$2 ARCH=$2
SMP=$3 SMP=$3
CC=$4 PREEMPT=$4
CC=$5
# If compile.h exists already and we don't own autoconf.h # If compile.h exists already and we don't own autoconf.h
# (i.e. we're not the same user who did make *config), don't # (i.e. we're not the same user who did make *config), don't
...@@ -26,8 +27,10 @@ fi ...@@ -26,8 +27,10 @@ fi
UTS_VERSION="#$VERSION" UTS_VERSION="#$VERSION"
if [ -n "$SMP" ] ; then UTS_VERSION="$UTS_VERSION SMP"; fi CONFIG_FLAGS=""
UTS_VERSION="$UTS_VERSION `LC_ALL=C LANG=C date`" if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi
if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi
UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS `LC_ALL=C LANG=C date`"
# Truncate to maximum length # Truncate to maximum length
...@@ -37,7 +40,8 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/" ...@@ -37,7 +40,8 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/"
# Generate a temporary compile.h # Generate a temporary compile.h
( echo /\* This file is auto generated, version $VERSION \*/ ( echo /\* This file is auto generated, version $VERSION \*/
if [ -n "$CONFIG_FLAGS" ] ; then echo "/* $CONFIG_FLAGS */"; fi
echo \#define UTS_MACHINE \"$ARCH\" echo \#define UTS_MACHINE \"$ARCH\"
echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\" echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment