diff options
Diffstat (limited to 'gcc/opts.c')
-rw-r--r-- | gcc/opts.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -741,6 +741,15 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, if (!opts->x_flag_opts_finished) { + /* We initialize opts->x_flag_pie to -1 so that targets can set a + default value. */ + if (opts->x_flag_pie == -1) + { + if (opts->x_flag_pic == 0) + opts->x_flag_pie = DEFAULT_FLAG_PIE; + else + opts->x_flag_pie = 0; + } if (opts->x_flag_pie) opts->x_flag_pic = opts->x_flag_pie; if (opts->x_flag_pic && !opts->x_flag_pie) |