- if Options.options.enable_pie == True:
- conf.check_cc(cflags='-fPIE', ldflags='-pie', mandatory=True,
- msg="Checking compiler for PIE support")
- conf.env['ENABLE_PIE'] = True
+ if Options.options.enable_pie != False:
+ if Options.options.enable_pie == True:
+ need_pie = True
+ else:
+ # not specified, only build PIEs if supported by compiler
+ need_pie = False
+ if conf.check_cc(cflags='-fPIE', ldflags='-pie', mandatory=need_pie,
+ msg="Checking compiler for PIE support"):
+ conf.env['ENABLE_PIE'] = True