mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 02:53:55 +00:00
ab6bbdd5cd
Carefully fake cc-version and cc-fullversion to avoid needing a compiler for the kernel itself to build the headers. For some reason, doing `make install_headers` twice, first without INSTALL_HDR_PATH=$out then with, is neccessary to get this to work.
17 lines
634 B
Diff
17 lines
634 B
Diff
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
|
|
index 065324a8046f..d09c67194549 100644
|
|
--- a/scripts/Kbuild.include
|
|
+++ b/scripts/Kbuild.include
|
|
@@ -216,11 +216,8 @@ cc-disable-warning = $(call try-run-cached,\
|
|
cc-name = $(call shell-cached,$(CC) -v 2>&1 | grep -q "clang version" && echo clang || echo gcc)
|
|
|
|
# cc-version
|
|
-cc-version = $(call shell-cached,$(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
|
|
|
|
# cc-fullversion
|
|
-cc-fullversion = $(call shell-cached,$(CONFIG_SHELL) \
|
|
- $(srctree)/scripts/gcc-version.sh -p $(CC))
|
|
|
|
# cc-ifversion
|
|
# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
|