drm/panthor: Don't add write fences to the shared BOs
[drm/drm-misc.git] / scripts / mkcompile_h
blob2596f78e52ef95683a11110085878233d564b40a
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
4 UTS_MACHINE=$1
5 CC_VERSION="$2"
6 LD=$3
8 if test -z "$KBUILD_BUILD_USER"; then
9 LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')
10 else
11 LINUX_COMPILE_BY=$KBUILD_BUILD_USER
13 if test -z "$KBUILD_BUILD_HOST"; then
14 LINUX_COMPILE_HOST=`uname -n`
15 else
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:]]*$//')
22 cat <<EOF
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}"
27 EOF