diff options
author | Arnaud Charlet <charlet@adacore.com> | 2020-10-29 10:41:22 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-11-26 03:39:58 -0500 |
commit | 781fb9a006d48621849d4aa45b7f33657733f319 (patch) | |
tree | 66feee5fc3c78220407f59904ba2edd8fb3ac5ab | |
parent | aa83f3d0b7cf49ae10eed1fc4539ba1997035fef (diff) | |
download | gcc-781fb9a006d48621849d4aa45b7f33657733f319.zip gcc-781fb9a006d48621849d4aa45b7f33657733f319.tar.gz gcc-781fb9a006d48621849d4aa45b7f33657733f319.tar.bz2 |
[Ada] Add support for .c output file
gcc/ada/
* osint-c.adb (Set_Output_Object_File_Name): Add support for
.c output file.
-rw-r--r-- | gcc/ada/osint-c.adb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/ada/osint-c.adb b/gcc/ada/osint-c.adb index 8ef8b8b..4fc0998 100644 --- a/gcc/ada/osint-c.adb +++ b/gcc/ada/osint-c.adb @@ -475,15 +475,14 @@ package body Osint.C is begin -- Make sure that the object file has the expected extension + -- Allow for either .o or .c (for C code generation) if NL <= EL or else - (Name (NL - EL + Name'First .. Name'Last) /= Ext + (not Generate_Asm + and then Name (NL - EL + Name'First .. Name'Last) /= Ext and then Name (NL - 2 + Name'First .. Name'Last) /= ".o" - and then not Generate_Asm - and then - (not Generate_C_Code - or else Name (NL - 2 + Name'First .. Name'Last) /= ".c")) + and then Name (NL - 2 + Name'First .. Name'Last) /= ".c") then Fail ("incorrect object file extension"); end if; |