@@ -200,6 +200,7 @@ Processing options:
200200 single caller [on]
201201 - fif- conversion Perform if - conversion (generation of conditional moves) [on]
202202Code generation options : (use - fno-< opt> to turn off - f< opt> )
203+ - fpic / - fPIC Generate position - independent code [off]
203204 - ffpu Use FP registers for some integer operations [on]
204205 - fsmall- data < n> Set maximal size < n> for allocation in small data area
205206 - fsmall- const < n> Set maximal size < n> for allocation in small constant area
@@ -266,6 +267,11 @@ let cmdline_actions =
266267 if n < = 0 || ((n land (n - 1 )) <> 0 ) then
267268 error no_loc " requested alignment %d is not a power of 2" n
268269 in
270+ let set_pic_mode () =
271+ if Configuration. pic_supported
272+ then option_fpic := true
273+ else warning no_loc Unnamed
274+ " option -fpic not supported on this platform, ignored" in
269275 [
270276(* Getting help *)
271277 Exact " -help" , Unit print_usage_and_exit;
@@ -301,7 +307,11 @@ let cmdline_actions =
301307 Exact " -ffloat-const-prop" , Integer (fun n -> option_ffloatconstprop := n);
302308 Exact " -falign-functions" , Integer (fun n -> check_align n; option_falignfunctions := Some n);
303309 Exact " -falign-branch-targets" , Integer (fun n -> check_align n; option_falignbranchtargets := n);
304- Exact " -falign-cond-branches" , Integer (fun n -> check_align n; option_faligncondbranchs := n);] @
310+ Exact " -falign-cond-branches" , Integer (fun n -> check_align n; option_faligncondbranchs := n);
311+ Exact " -fpic" , Unit set_pic_mode;
312+ Exact " -fPIC" , Unit set_pic_mode;
313+ Exact " -fno-pic" , Unset option_fpic;
314+ Exact " -fno-PIC" , Unset option_fpic ] @
305315 f_opt " common" option_fcommon @
306316(* Target processor options *)
307317 (if Configuration. arch = " arm" then
0 commit comments