blob: 7612f1dd9a924947b750da297f2c120fbb6b722d [file] [log] [blame]
--- a/scripts/config/Makefile
+++ b/scripts/config/Makefile
@@ -78,6 +78,10 @@ $(obj)/qconf-moc.cc: $(src)/qconf.h FORCE | $(obj)/qconf-bin
targets += qconf-moc.cc
+# aconf: Used for defconfig merging and incremental subtraction
+hostprogs += aconf
+aconf-objs := aconf.o $(common-objs)
+
# check if necessary packages are available, and configure build flags
cmd_conf_cfg = $< $(addprefix $(obj)/$*conf-, cflags libs bin); touch $(obj)/$*conf-bin
--- a/scripts/config/confdata.c
+++ b/scripts/config/confdata.c
@@ -223,7 +223,7 @@ static const char *conf_get_rustccfg_name(void)
return name ? name : "include/generated/rustc_cfg";
}
-static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
+int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
{
char *p2;
@@ -307,7 +307,7 @@ static int add_byte(int c, char **lineptr, size_t slen, size_t *n)
return 0;
}
-static ssize_t compat_getline(char **lineptr, size_t *n, FILE *stream)
+ssize_t compat_getline(char **lineptr, size_t *n, FILE *stream)
{
char *line = *lineptr;
size_t slen = 0;
@@ -718,7 +718,7 @@ static void __print_symbol(FILE *fp, struct symbol *sym, enum output_n output_n,
free(escaped);
}
-static void print_symbol_for_dotconfig(FILE *fp, struct symbol *sym)
+void print_symbol_for_dotconfig(FILE *fp, struct symbol *sym)
{
__print_symbol(fp, sym, OUTPUT_N_AS_UNSET, true);
}
--- a/scripts/config/lkc.h
+++ b/scripts/config/lkc.h
@@ -43,6 +43,9 @@ extern int recursive_is_error;
/* confdata.c */
const char *conf_get_configname(void);
void set_all_choice_values(struct symbol *csym);
+int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p);
+void print_symbol_for_dotconfig(FILE *fp, struct symbol *sym);
+ssize_t compat_getline(char **lineptr, size_t *n, FILE *stream);
/* confdata.c and expr.c */
static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
@@ -114,6 +117,7 @@ struct property *sym_get_range_prop(struct symbol *sym);
const char *sym_get_string_default(struct symbol *sym);
struct symbol *sym_check_deps(struct symbol *sym);
struct symbol *prop_get_symbol(struct property *prop);
+unsigned strhash(const char *s);
static inline tristate sym_get_tristate_value(struct symbol *sym)
{
--- a/scripts/config/symbol.c
+++ b/scripts/config/symbol.c
@@ -772,7 +772,7 @@ bool sym_is_changeable(struct symbol *sym)
return sym->visible > sym->rev_dep.tri;
}
-static unsigned strhash(const char *s)
+unsigned strhash(const char *s)
{
/* fnv32 hash */
unsigned hash = 2166136261U;