diff options
Diffstat (limited to 'util/kconfig/patches/0011-remove-include-config-hardcodes.patch')
-rw-r--r-- | util/kconfig/patches/0011-remove-include-config-hardcodes.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/util/kconfig/patches/0011-remove-include-config-hardcodes.patch b/util/kconfig/patches/0011-remove-include-config-hardcodes.patch new file mode 100644 index 0000000000..fa21dac4b4 --- /dev/null +++ b/util/kconfig/patches/0011-remove-include-config-hardcodes.patch @@ -0,0 +1,39 @@ +Index: kconfig/confdata.c +=================================================================== +--- kconfig.orig/confdata.c ++++ kconfig/confdata.c +@@ -241,6 +241,13 @@ static const char *conf_get_autoconfig_n + return name ? name : "include/config/auto.conf"; + } + ++static const char *conf_get_autobase_name(void) ++{ ++ char *name = getenv("KCONFIG_SPLITCONFIG"); ++ ++ return name ? name : "include/config/"; ++} ++ + static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) + { + char *p2; +@@ -1024,7 +1031,7 @@ static int conf_touch_deps(void) + struct symbol *sym; + int res, i; + +- strcpy(depfile_path, "include/config/"); ++ strcpy(depfile_path, conf_get_autobase_name()); + depfile_prefix_len = strlen(depfile_path); + + name = conf_get_autoconfig_name(); +@@ -1102,7 +1109,10 @@ int conf_write_autoconf(int overwrite) + if (!overwrite && is_present(autoconf_name)) + return 0; + +- conf_write_dep("include/config/auto.conf.cmd"); ++ char autoconfcmd_path[PATH_MAX]; ++ snprintf(autoconfcmd_path, sizeof(autoconfcmd_path), "%s%s", ++ conf_get_autobase_name(), "auto.conf.cmd"); ++ conf_write_dep(autoconfcmd_path); + + if (conf_touch_deps()) + return 1; |