diff options
Diffstat (limited to 'gcc/ada/make.adb')
-rw-r--r-- | gcc/ada/make.adb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb index 79a8390569f..46af1ffccd9 100644 --- a/gcc/ada/make.adb +++ b/gcc/ada/make.adb @@ -8060,12 +8060,12 @@ package body Make is elsif Argv (2) = 'L' then Add_Switch (Argv, Linker, And_Save => And_Save); - -- For -gxxxxx, -pg, -mxxx, -fxxx: give the switch to both the + -- For -gxxx, -pg, -mxxx, -fxxx, -Oxxx, pass the switch to both the -- compiler and the linker (except for -gnatxxx which is only for the -- compiler). Some of the -mxxx (for example -m64) and -fxxx (for -- example -ftest-coverage for gcov) need to be used when compiling -- the binder generated files, and using all these gcc switches for - -- the binder generated files should not be a problem. + -- them should not be a problem. Pass -Oxxx to the linker for LTO. elsif (Argv (2) = 'g' and then (Argv'Last < 5 @@ -8073,6 +8073,7 @@ package body Make is or else Argv (2 .. Argv'Last) = "pg" or else (Argv (2) = 'm' and then Argv'Last > 2) or else (Argv (2) = 'f' and then Argv'Last > 2) + or else (Argv (2) = 'O' and then Argv'Last > 2) then Add_Switch (Argv, Compiler, And_Save => And_Save); Add_Switch (Argv, Linker, And_Save => And_Save); |