diff options
Diffstat (limited to 'gcc/opth-gen.awk')
-rw-r--r-- | gcc/opth-gen.awk | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/opth-gen.awk b/gcc/opth-gen.awk index 0d1d0df375a..423328ddfdb 100644 --- a/gcc/opth-gen.awk +++ b/gcc/opth-gen.awk @@ -28,6 +28,7 @@ BEGIN { n_opts = 0 n_langs = 0 n_target_save = 0 + n_extra_vars = 0 n_extra_masks = 0 FS=SUBSEP } @@ -43,6 +44,10 @@ BEGIN { target_save_decl[n_target_save] = $2 n_target_save++ } + else if ($1 == "Variable") { + extra_vars[n_extra_vars] = $2 + n_extra_vars++ + } else { name = opt_args("Mask", $1) if (name == "") { @@ -65,12 +70,17 @@ print "" print "#ifndef OPTIONS_H" print "#define OPTIONS_H" print "" -print "extern int target_flags;" print "extern int target_flags_explicit;" print "" have_save = 0; +for (i = 0; i < n_extra_vars; i++) { + var = extra_vars[i] + sub(" *=.*", "", var) + print "extern " var ";" +} + for (i = 0; i < n_opts; i++) { if (flag_set_p("Save", flags[i])) have_save = 1; |