I am eagar to build under the scripts/ directory only with $(HOSTCC), but scripts/mod/ highly depends on the $(CC) and target arch headers. That it why the 'scripts' target must depend on 'asm-generic', 'gcc-plugins', and $(autoksyms_h). Move it to the 'prepare0' stage. I know this is a cheesy workaround, but better than the current situation.
Showing the changes to scripts (2 of 3 files). Show all
Unified · Split
| @@ -37,9 +37,8 @@ build_unifdef: $(obj)/unifdef · 36 unmodified lines | |||
| 37 | @: | 37 | @: |
| 38 | 38 | ||
| 39 | subdir-$(CONFIG_MODVERSIONS) += genksyms | 39 | subdir-$(CONFIG_MODVERSIONS) += genksyms |
| 40 | subdir-y += mod | ||
| 41 | subdir-$(CONFIG_SECURITY_SELINUX) += selinux | 40 | subdir-$(CONFIG_SECURITY_SELINUX) += selinux |
| 42 | subdir-$(CONFIG_GDB_SCRIPTS) += gdb | 41 | subdir-$(CONFIG_GDB_SCRIPTS) += gdb |
| 43 | 42 | ||
| 44 | # Let clean descend into subdirs | 43 | # Let clean descend into subdirs |
| 45 | subdir- += basic dtc kconfig package gcc-plugins | 44 | subdir- += basic dtc kconfig mod package gcc-plugins |
| @@ -4,8 +4,6 @@ OBJECT_FILES_NON_STANDARD := y · 3 unmodified lines | |||
| 4 | hostprogs-y := modpost mk_elfconfig | 4 | hostprogs-y := modpost mk_elfconfig |
| 5 | always := $(hostprogs-y) empty.o | 5 | always := $(hostprogs-y) empty.o |
| 6 | 6 | ||
| 7 | CFLAGS_REMOVE_empty.o := $(ASM_MACRO_FLAGS) | ||
| 8 | |||
| 9 | modpost-objs := modpost.o file2alias.o sumversion.o | 7 | modpost-objs := modpost.o file2alias.o sumversion.o |
| 10 | 8 | ||
| 11 | devicetable-offsets-file := devicetable-offsets.h | 9 | devicetable-offsets-file := devicetable-offsets.h |