-
Notifications
You must be signed in to change notification settings - Fork 1
/
conftest-verbose.patch
51 lines (43 loc) · 1.56 KB
/
conftest-verbose.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Author: Andreas Beckmann <[email protected]>
Description: dump the generated conftest headers
--- a/Kbuild
+++ b/Kbuild
@@ -114,6 +114,16 @@
NV_CONFTEST_HEADERS += $(NV_CONFTEST_COMPILE_TEST_HEADERS)
+.PHONY: conftest-verbose
+conftest-verbose:
+ @echo 'NV_CONFTEST_CMD=$(NV_CONFTEST_CMD)'
+ @echo 'NV_CONFTEST_CFLAGS=$(NV_CONFTEST_CFLAGS)'
+ @echo 'KBUILD_CFLAGS=$(KBUILD_CFLAGS)'
+ @echo 'LINUXINCLUDE=$(LINUXINCLUDE)'
+ @echo 'LDFLAGS=$(LDFLAGS)'
+ @echo 'KBUILD_LDFLAGS=$(KBUILD_LDFLAGS)'
+ @echo 'ARCH=$(ARCH)'
+
#
# Generate a header file for a single conftest compile test. Each compile test
# header depends on conftest.sh, as well as the generated conftest/headers.h
@@ -138,6 +148,8 @@
@mkdir -p $(obj)/conftest
@# concatenate /dev/null to prevent cat from hanging when $$^ is empty
@cat $$^ /dev/null > $$@
+ @echo " CONFTEST $$(notdir $$@):"
+ @cat $$@
endef
#
@@ -157,13 +169,17 @@
$(eval $(call NV_GENERATE_COMPILE_TEST_HEADER,symbols,$(NV_CONFTEST_SYMBOL_COMPILE_TESTS)))
$(eval $(call NV_GENERATE_COMPILE_TEST_HEADER,types,$(NV_CONFTEST_TYPE_COMPILE_TESTS)))
-$(obj)/conftest/patches.h: $(NV_CONFTEST_SCRIPT)
+$(obj)/conftest/patches.h: $(NV_CONFTEST_SCRIPT) conftest-verbose
@mkdir -p $(obj)/conftest
@$(NV_CONFTEST_CMD) patch_check > $@
+ @echo " CONFTEST $(notdir $@):"
+ @cat $@
-$(obj)/conftest/headers.h: $(NV_CONFTEST_SCRIPT)
+$(obj)/conftest/headers.h: $(NV_CONFTEST_SCRIPT) conftest-verbose
@mkdir -p $(obj)/conftest
@$(NV_CONFTEST_CMD) test_kernel_headers > $@
+ @echo " CONFTEST $(notdir $@):"
+ @cat $@
clean-dirs := $(obj)/conftest