config(8): fixes for -fno-common
Move this handful of definitions into main.c, properly declare these as extern in config.h. This fixes the config(8) build with -fno-common. Unexplained in my previous commit to gas, -fno-common will become the default in GCC10 and LLVM11, so it's worth addressing these in advance. MFC after: 3 days
This commit is contained in:
parent
d1df43288e
commit
a33e986417
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=359389
@ -45,7 +45,7 @@ struct cfgfile {
|
|||||||
STAILQ_ENTRY(cfgfile) cfg_next;
|
STAILQ_ENTRY(cfgfile) cfg_next;
|
||||||
char *cfg_path;
|
char *cfg_path;
|
||||||
};
|
};
|
||||||
STAILQ_HEAD(, cfgfile) cfgfiles;
|
extern STAILQ_HEAD(cfgfile_head, cfgfile) cfgfiles;
|
||||||
|
|
||||||
struct file_list {
|
struct file_list {
|
||||||
STAILQ_ENTRY(file_list) f_next;
|
STAILQ_ENTRY(file_list) f_next;
|
||||||
@ -103,8 +103,8 @@ struct config {
|
|||||||
* in the makerules, etc. machinearch is the global notion of the
|
* in the makerules, etc. machinearch is the global notion of the
|
||||||
* MACHINE_ARCH for this MACHINE.
|
* MACHINE_ARCH for this MACHINE.
|
||||||
*/
|
*/
|
||||||
char *machinename;
|
extern char *machinename;
|
||||||
char *machinearch;
|
extern char *machinearch;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For each machine, a set of CPU's may be specified as supported.
|
* For each machine, a set of CPU's may be specified as supported.
|
||||||
@ -115,7 +115,7 @@ struct cputype {
|
|||||||
SLIST_ENTRY(cputype) cpu_next;
|
SLIST_ENTRY(cputype) cpu_next;
|
||||||
};
|
};
|
||||||
|
|
||||||
SLIST_HEAD(, cputype) cputype;
|
extern SLIST_HEAD(cputype_head, cputype) cputype;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A set of options may also be specified which are like CPU types,
|
* A set of options may also be specified which are like CPU types,
|
||||||
@ -131,7 +131,7 @@ struct opt {
|
|||||||
SLIST_ENTRY(opt) op_append;
|
SLIST_ENTRY(opt) op_append;
|
||||||
};
|
};
|
||||||
|
|
||||||
SLIST_HEAD(opt_head, opt) opt, mkopt, rmopts;
|
extern SLIST_HEAD(opt_head, opt) opt, mkopt, rmopts;
|
||||||
|
|
||||||
struct opt_list {
|
struct opt_list {
|
||||||
char *o_name;
|
char *o_name;
|
||||||
@ -141,7 +141,7 @@ struct opt_list {
|
|||||||
SLIST_ENTRY(opt_list) o_next;
|
SLIST_ENTRY(opt_list) o_next;
|
||||||
};
|
};
|
||||||
|
|
||||||
SLIST_HEAD(, opt_list) otab;
|
extern SLIST_HEAD(opt_list_head, opt_list) otab;
|
||||||
|
|
||||||
struct envvar {
|
struct envvar {
|
||||||
char *env_str;
|
char *env_str;
|
||||||
@ -149,21 +149,21 @@ struct envvar {
|
|||||||
STAILQ_ENTRY(envvar) envvar_next;
|
STAILQ_ENTRY(envvar) envvar_next;
|
||||||
};
|
};
|
||||||
|
|
||||||
STAILQ_HEAD(envvar_head, envvar) envvars;
|
extern STAILQ_HEAD(envvar_head, envvar) envvars;
|
||||||
|
|
||||||
struct hint {
|
struct hint {
|
||||||
char *hint_name;
|
char *hint_name;
|
||||||
STAILQ_ENTRY(hint) hint_next;
|
STAILQ_ENTRY(hint) hint_next;
|
||||||
};
|
};
|
||||||
|
|
||||||
STAILQ_HEAD(hint_head, hint) hints;
|
extern STAILQ_HEAD(hint_head, hint) hints;
|
||||||
|
|
||||||
struct includepath {
|
struct includepath {
|
||||||
char *path;
|
char *path;
|
||||||
SLIST_ENTRY(includepath) path_next;
|
SLIST_ENTRY(includepath) path_next;
|
||||||
};
|
};
|
||||||
|
|
||||||
SLIST_HEAD(, includepath) includepath;
|
extern SLIST_HEAD(includepath_head, includepath) includepath;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tag present in the kernconf.tmpl template file. It's mandatory for those
|
* Tag present in the kernconf.tmpl template file. It's mandatory for those
|
||||||
|
@ -72,6 +72,17 @@ static const char rcsid[] =
|
|||||||
|
|
||||||
#define CDIR "../compile/"
|
#define CDIR "../compile/"
|
||||||
|
|
||||||
|
char *machinename;
|
||||||
|
char *machinearch;
|
||||||
|
|
||||||
|
struct cfgfile_head cfgfiles;
|
||||||
|
struct cputype_head cputype;
|
||||||
|
struct opt_head opt, mkopt, rmopts;
|
||||||
|
struct opt_list_head otab;
|
||||||
|
struct envvar_head envvars;
|
||||||
|
struct hint_head hints;
|
||||||
|
struct includepath_head includepath;
|
||||||
|
|
||||||
char * PREFIX;
|
char * PREFIX;
|
||||||
char destdir[MAXPATHLEN];
|
char destdir[MAXPATHLEN];
|
||||||
char srcdir[MAXPATHLEN];
|
char srcdir[MAXPATHLEN];
|
||||||
|
Loading…
Reference in New Issue
Block a user