aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-03 21:27:27 +0100
committerTristan Gingold <tgingold@free.fr>2020-03-04 16:40:42 +0100
commit05b8fe710d53d0db9c8d956bf9aa8bec526ac079 (patch)
treec95bfe79f8c38f8a138b53a6e6458f8a231c844d /src/ghdldrv
parent76955e2a3cc2c173d6db91e89afe6f476e8735be (diff)
downloadghdl-05b8fe710d53d0db9c8d956bf9aa8bec526ac079.tar.gz
ghdl-05b8fe710d53d0db9c8d956bf9aa8bec526ac079.tar.bz2
ghdl-05b8fe710d53d0db9c8d956bf9aa8bec526ac079.zip
vhdl: merge synopsys into the ieee libraries. For #980
Diffstat (limited to 'src/ghdldrv')
-rw-r--r--src/ghdldrv/ghdldrv.adb10
-rw-r--r--src/ghdldrv/ghdllocal.adb6
2 files changed, 14 insertions, 2 deletions
diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb
index dd2320daf..4d4ebfa61 100644
--- a/src/ghdldrv/ghdldrv.adb
+++ b/src/ghdldrv/ghdldrv.adb
@@ -26,6 +26,7 @@ with Dyn_Tables;
with Files_Map;
with Libraries;
with Default_Paths;
+with Flags;
with Simple_IO; use Simple_IO;
with Name_Table; use Name_Table;
with Vhdl.Std_Package;
@@ -688,6 +689,15 @@ package body Ghdldrv is
Error ("option --time-resolution not supported by back-end");
Res := Option_Err;
return;
+ elsif Opt = "--ieee=synopsys" or else Opt = "--ieee=none" then
+ -- Automatically translate the option.
+ if Backend = Backend_Gcc then
+ Add_Argument (Compiler_Args, new String'("--ghdl-fsynopsys"));
+ else
+ Add_Argument (Compiler_Args, new String'("-fsynopsys"));
+ end if;
+ Flags.Flag_Synopsys := True;
+ Res := Option_Ok;
else
Res := Options.Parse_Option (Opt);
if Res = Option_Ok then
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb
index 5745b2b50..40f2eb984 100644
--- a/src/ghdldrv/ghdllocal.adb
+++ b/src/ghdldrv/ghdllocal.adb
@@ -444,9 +444,11 @@ package body Ghdllocal is
when Lib_Standard =>
Add_Library_Name ("ieee");
when Lib_Synopsys =>
- Add_Library_Name ("synopsys");
+ Add_Library_Name ("ieee");
+ Flag_Synopsys := True;
when Lib_None =>
- null;
+ -- Allow synopsys packages.
+ Flag_Synopsys := True;
end case;
-- For std: just add the library prefix.