driver: Add -Wno-macro-redefinition, properly pass -Wredef to ivlpp
Signed-off-by: Andrew Andrianov <andrew@ncrmnt.org>
This commit is contained in:
parent
9e2252bc39
commit
3e87a4d242
|
|
@ -344,9 +344,12 @@ static int t_version_only(void)
|
||||||
|
|
||||||
static void build_preprocess_command(int e_flag)
|
static void build_preprocess_command(int e_flag)
|
||||||
{
|
{
|
||||||
snprintf(tmp, sizeof tmp, "%s%civlpp %s%s -F\"%s\" -f\"%s\" -p\"%s\" ",
|
snprintf(tmp, sizeof tmp, "%s%civlpp %s%s%s -F\"%s\" -f\"%s\" -p\"%s\" ",
|
||||||
ivlpp_dir, sep, verbose_flag?" -v":"",
|
ivlpp_dir, sep,
|
||||||
e_flag?"":" -L", defines_path, source_path,
|
verbose_flag?" -v":"",
|
||||||
|
e_flag?"":" -L",
|
||||||
|
strchr(warning_flags, 'r') ? " -Wredef " : "",
|
||||||
|
defines_path, source_path,
|
||||||
compiled_defines_path);
|
compiled_defines_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -547,6 +550,12 @@ static void process_warning_switch(const char*name)
|
||||||
cp[0] = cp[1];
|
cp[0] = cp[1];
|
||||||
cp += 1;
|
cp += 1;
|
||||||
}
|
}
|
||||||
|
} else if (strcmp(name,"no-macro-redefinition") == 0) {
|
||||||
|
char*cp = strchr(warning_flags, 'r');
|
||||||
|
if (cp) while (*cp) {
|
||||||
|
cp[0] = cp[1];
|
||||||
|
cp += 1;
|
||||||
|
}
|
||||||
} else if (strcmp(name,"no-floating-nets") == 0) {
|
} else if (strcmp(name,"no-floating-nets") == 0) {
|
||||||
char*cp = strchr(warning_flags, 'f');
|
char*cp = strchr(warning_flags, 'f');
|
||||||
if (cp) while (*cp) {
|
if (cp) while (*cp) {
|
||||||
|
|
@ -1292,9 +1301,10 @@ int main(int argc, char **argv)
|
||||||
/* Write the preprocessor command needed to preprocess a
|
/* Write the preprocessor command needed to preprocess a
|
||||||
single file. This may be used to preprocess library
|
single file. This may be used to preprocess library
|
||||||
files. */
|
files. */
|
||||||
fprintf(iconfig_file, "ivlpp:%s%civlpp -L -F\"%s\" -P\"%s\" %s\n",
|
fprintf(iconfig_file, "ivlpp:%s%civlpp %s -L -F\"%s\" -P\"%s\"\n",
|
||||||
ivlpp_dir, sep, defines_path, compiled_defines_path,
|
ivlpp_dir, sep,
|
||||||
strchr(warning_flags, 'r') ? "-Wredef" : ""
|
strchr(warning_flags, 'r') ? "-Wredef" : "",
|
||||||
|
defines_path, compiled_defines_path
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Done writing to the iconfig file. Close it now. */
|
/* Done writing to the iconfig file. Close it now. */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue