aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 9deb8df..9793999 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -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)