From f4c4a9939e9605d4c3a545f0fe89c13f541ba6da Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 27 Nov 2015 05:05:52 +0100 Subject: Emit a warning for --ieee=synopsys if --std=08 --- src/ghdldrv/ghdllocal.adb | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'src/ghdldrv/ghdllocal.adb') 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; -- cgit v1.2.3