locking/atomic: Correct (cmp)xchg() instrumentation
[linux-block.git] / scripts / package / deb-build-option
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0-only
3
4 # Set up CROSS_COMPILE if we are cross-compiling, but not called from the
5 # kernel toplevel Makefile
6 if [ -z "${CROSS_COMPILE}${cross_compiling}" -a "${DEB_HOST_ARCH}" != "${DEB_BUILD_ARCH}" ]; then
7         echo CROSS_COMPILE=${DEB_HOST_GNU_TYPE}-
8 fi
9
10 version=$(dpkg-parsechangelog -S Version)
11 version_upstream="${version%-*}"
12 debian_revision="${version#${version_upstream}}"
13 debian_revision="${debian_revision#*-}"
14
15 echo KERNELRELEASE=${version_upstream}
16 echo KBUILD_BUILD_VERSION=${debian_revision}