More dkms fixes for exact cc compiler
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dkms (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Jammy |
New
|
Undecided
|
Unassigned | ||
Kinetic |
Won't Fix
|
Undecided
|
Unassigned | ||
Lunar |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[ Impact ]
* Previously https:/
* Fix those by setting MAKEFLAGS=
Observe the following:
$ cat Makefile.just-cc
all:
echo $(CC)
$ cat Makefile.cc-set
CC=cc-set-
all:
echo $(CC)
# cmdline override works in both cases
$ make -f Makefile.just-cc CC=make-var-cmdline
echo make-var-cmdline
make-var-cmdline
$ make -f Makefile.cc-set CC=make-var-cmdline
echo make-var-cmdline
make-var-cmdline
# environment/shell variable override only works in one of them
$ CC=env-cc make -f Makefile.just-cc
echo env-cc
env-cc
$ CC=env-cc make -f Makefile.cc-set
echo cc-set-in-makefile
cc-set-in-makefile
# unless environment-
$ MAKEFLAGS=
echo env-cc
env-cc
[ Test Plan ]
* Divert /usr/bin/gcc to /bin/false
$ sudo ln -sf /bin/false /usr/bin/gcc
* Install a v5.19 kernel that must be built with gcc-12 and a dkms module that uses a CC variable set inside its makefile
$ sudo apt install linux-virtual-
* Check that dkms status has the module successfully installed for v5.19 kernel
$ dkms status
[ Where problems could occur ]
* dkms cleans environment of all tool-chain related variables already, but MAKEFLAGS=
* A better solution might be for our kernel builds to emit a makefile snippet that is included by the Kbuild makefiles, but that too will only cover a subset of dkms modules, not all of them.
* It might be nice if environment-
[ Other Info ]
* Any better suggestions of how to handle toolchain export would be welcome here, as this is starting to be silly.
This bug was fixed in the package dkms - 3.0.8-3
---------------
dkms (3.0.8-3) unstable; urgency=high
* Revert back to 3.0.8-1 behavior to prevent breakages for sid users
(Closes: #1025214, #1025171)
-- Aron Xu <email address hidden> Fri, 02 Dec 2022 19:49:16 +0800