2 # SPDX-License-Identifier: GPL-2.0
8 if test -z "$KBUILD_BUILD_USER"; then
9 LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')
11 LINUX_COMPILE_BY=$KBUILD_BUILD_USER
13 if test -z "$KBUILD_BUILD_HOST"; then
14 LINUX_COMPILE_HOST=`uname -n`
16 LINUX_COMPILE_HOST=$KBUILD_BUILD_HOST
19 LD_VERSION=$(LC_ALL=C $LD -v | head -n1 |
20 sed -e 's/(compatible with [^)]*)//' -e 's/[[:space:]]*$//')
23 #define UTS_MACHINE "${UTS_MACHINE}"
24 #define LINUX_COMPILE_BY "${LINUX_COMPILE_BY}"
25 #define LINUX_COMPILE_HOST "${LINUX_COMPILE_HOST}"
26 #define LINUX_COMPILER "${CC_VERSION}, ${LD_VERSION}"