aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv/ghdllocal.adb
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2015-11-27 05:05:52 +0100
committerTristan Gingold <gingold@adacore.com>2015-11-27 05:05:52 +0100
commitf4c4a9939e9605d4c3a545f0fe89c13f541ba6da (patch)
treea0a2d3425867583f36d0797d818610f40141bec9 /src/ghdldrv/ghdllocal.adb
parentae055ba4bd8afed44a926b2df0024779ea19294a (diff)
downloadghdl-f4c4a9939e9605d4c3a545f0fe89c13f541ba6da.tar.gz
ghdl-f4c4a9939e9605d4c3a545f0fe89c13f541ba6da.tar.bz2
ghdl-f4c4a9939e9605d4c3a545f0fe89c13f541ba6da.zip
Emit a warning for --ieee=synopsys if --std=08
Diffstat (limited to 'src/ghdldrv/ghdllocal.adb')
-rw-r--r--src/ghdldrv/ghdllocal.adb26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb
index bd4257cbe..b79a06fac 100644
--- a/src/ghdldrv/ghdllocal.adb
+++ b/src/ghdldrv/ghdllocal.adb
@@ -159,7 +159,7 @@ package body Ghdllocal is
procedure P (Str : String) renames Put_Line;
begin
P ("Main options (try --options-help for details):");
- P (" --std=XX Use XX as VHDL standard (87,93c,93,00 or 02)");
+ P (" --std=XX Use XX as VHDL standard (87,93c,93,00,02 or 08)");
P (" --work=NAME Set the name of the WORK library");
P (" -PDIR Add DIR in the library search path");
P (" --workdir=DIR Specify the directory of the WORK library");
@@ -367,15 +367,19 @@ package body Ghdllocal is
procedure Add_Library_Path (Name : String)
is
+ Path : constant String := Get_Machine_Path_Prefix & Directory_Separator
+ & Get_Version_Path & Directory_Separator & Name & Directory_Separator;
begin
- Libraries.Add_Library_Path
- (Get_Machine_Path_Prefix & Directory_Separator
- & Get_Version_Path & Directory_Separator
- & Name & Directory_Separator);
+ if not Is_Directory (Path) then
+ Warning
+ ("library " & Name & " does not exists for " & Get_Version_Path);
+ end if;
+ Libraries.Add_Library_Path (Path);
end Add_Library_Path;
procedure Setup_Libraries (Load : Boolean)
is
+ use Flags;
begin
-- Get environment variable.
Prefix_Env := GNAT.OS_Lib.Getenv ("GHDL_PREFIX");
@@ -425,9 +429,17 @@ package body Ghdllocal is
when Lib_Standard =>
Add_Library_Path ("ieee");
when Lib_Synopsys =>
- Add_Library_Path ("synopsys");
+ if Vhdl_Std >= Vhdl_08 then
+ Warning ("--ieee=synopsys is ignored for --std=08");
+ else
+ Add_Library_Path ("synopsys");
+ end if;
when Lib_Mentor =>
- Add_Library_Path ("mentor");
+ if Vhdl_Std >= Vhdl_08 then
+ Warning ("--ieee=mentor is ignored for --std=08");
+ else
+ Add_Library_Path ("mentor");
+ end if;
when Lib_None =>
null;
end case;