Package: dkms
Version: 3.0.8-2
Severity: serious

Hi,

export MAKEFLAGS="--environment-overrides" causes several modules to
fail to build since this seems to inject unwanted environment variable
values into various build processes.

E.g. the nvidia modules react fragile to the ARCH variable, therefore we
unset that variable first:
  MAKE[0]="unset ARCH; env NV_VERBOSE=1 \
    make ${parallel_jobs+-j$parallel_jobs} modules KERNEL_UNAME=${kernelver}"
but that does not work any longer. Verbose output shows that it tries to
build with ARCH=x86 (I have no clue where that value comes from)
instead of ARCH=x86_64 (which it even attempts to set).

I think you are mixing two things in the export-CC.patch:

1.) try to get the correct CC value from the kernel (.kernelvariables,
    .config, ...) and export that for the benefit of the module build
    system, overriding any CC value found in the environment (which is
    likely to be wrong) (this does not need to be propagated back to
    kbuild)

2.) support overriding the CC used by kbuild (and the module build
system) with some custom value


Andreas

PS: shouldn't you rather append to MAKEFLAGS and not override them?

Reply via email to