Skip to content

Commit

Permalink
Revert "kbuild: deb-pkg: add pkg.linux-upstream.nokernelheaders build…
Browse files Browse the repository at this point in the history
… profile"

This reverts commit e2c3182.
  • Loading branch information
frank-w committed Nov 21, 2024
1 parent 8340652 commit 579358a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion scripts/package/builddeb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ install_kernel_headers () {
pdir=debian/$1
version=${1#linux-headers-}

CC="${DEB_HOST_GNU_TYPE}-gcc" "${srctree}/scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}"
"${srctree}/scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}"

mkdir -p $pdir/lib/modules/$version/
ln -s /usr/src/linux-headers-$version $pdir/lib/modules/$version/build
Expand Down
6 changes: 4 additions & 2 deletions scripts/package/install-extmod-build
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ mkdir -p "${destdir}"
fi
} | tar -c -f - -T - | tar -xf - -C "${destdir}"

# When ${CC} and ${HOSTCC} differ, rebuild host programs using ${CC}.
# When ${CC} and ${HOSTCC} differ, we are likely cross-compiling. Rebuild host
# programs using ${CC}. This assumes CC=${CROSS_COMPILE}gcc, which is usually
# the case for package building. It does not cross-compile when CC=clang.
#
# This caters to host programs that participate in Kbuild. objtool and
# resolve_btfids are out of scope.
if [ "${CC}" != "${HOSTCC}" ]; then
if [ "${CC}" != "${HOSTCC}" ] && is_enabled CONFIG_CC_CAN_LINK; then
echo "Rebuilding host programs with ${CC}..."

cat <<-'EOF' > "${destdir}/Kbuild"
Expand Down
9 changes: 1 addition & 8 deletions scripts/package/mkdebian
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ fi

echo $debarch > debian/arch

host_gnu=$(dpkg-architecture -a "${debarch}" -q DEB_HOST_GNU_TYPE | sed 's/_/-/g')

# Generate a simple changelog template
cat <<EOF > debian/changelog
$sourcename ($packageversion) $distribution; urgency=low
Expand All @@ -198,11 +196,7 @@ Priority: optional
Maintainer: $maintainer
Rules-Requires-Root: no
Build-Depends: debhelper-compat (= 12)
Build-Depends-Arch: bc, bison, cpio, flex,
gcc-${host_gnu} <!pkg.${sourcename}.nokernelheaders>,
kmod, libelf-dev:native,
libssl-dev:native, libssl-dev <!pkg.${sourcename}.nokernelheaders>,
rsync
Build-Depends-Arch: bc, bison, cpio, flex, kmod, libelf-dev:native, libssl-dev:native, rsync
Homepage: https://www.kernel.org/
Package: $packagename-$version
Expand Down Expand Up @@ -230,7 +224,6 @@ cat <<EOF >> debian/control
Package: linux-headers-$version
Architecture: $debarch
Build-Profiles: <!pkg.${sourcename}.nokernelheaders>
Description: Linux kernel headers for $version on $debarch
This package provides kernel header files for $version on $debarch
.
Expand Down

0 comments on commit 579358a

Please sign in to comment.