diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-01-22 12:12:27 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-01-25 06:07:10 +0100 |
commit | 7ef79a53a8f3cbb972d3ac7b8b9ab7754f201001 (patch) | |
tree | ea046711a06cc41b4f0f93f52198899052c1fc68 /src | |
parent | b1d50e135b86502224f43147f1d93fa3ee5d6f5d (diff) | |
download | ghdl-7ef79a53a8f3cbb972d3ac7b8b9ab7754f201001.tar.gz ghdl-7ef79a53a8f3cbb972d3ac7b8b9ab7754f201001.tar.bz2 ghdl-7ef79a53a8f3cbb972d3ac7b8b9ab7754f201001.zip |
Change libraries path to allow installation of system-wide libraries.
For #521
Diffstat (limited to 'src')
-rw-r--r-- | src/ghdldrv/ghdldrv.adb | 2 | ||||
-rw-r--r-- | src/ghdldrv/ghdllocal.adb | 17 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb index 5fe3912c0..96e259da7 100644 --- a/src/ghdldrv/ghdldrv.adb +++ b/src/ghdldrv/ghdldrv.adb @@ -997,8 +997,8 @@ package body Ghdldrv is if Add_Std then Std_File := new String'(Get_Machine_Path_Prefix & Directory_Separator - & Get_Version_Path & Directory_Separator & "std" & Directory_Separator + & Get_Version_Path & Directory_Separator & "std_standard" & Link_Obj_Suffix.all); P := P + 1; Args (P) := Std_File; diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb index 59c02a54e..8cbfa70eb 100644 --- a/src/ghdldrv/ghdllocal.adb +++ b/src/ghdldrv/ghdllocal.adb @@ -323,17 +323,17 @@ package body Ghdllocal is end if; end Get_Machine_Path_Prefix; - procedure Add_Library_Path (Name : String) + procedure Add_Library_Name (Name : String) is Path : constant String := Get_Machine_Path_Prefix & Directory_Separator - & Get_Version_Path & Directory_Separator & Name & Directory_Separator; + & Name & Directory_Separator & Get_Version_Path & Directory_Separator; begin 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; + end Add_Library_Name; procedure Setup_Libraries (Load : Boolean) is @@ -382,21 +382,24 @@ package body Ghdllocal is -- Add paths for predefined libraries. if not Flags.Bootstrap then - Add_Library_Path ("std"); case Flag_Ieee is when Lib_Standard => - Add_Library_Path ("ieee"); + Add_Library_Name ("ieee"); when Lib_Synopsys => - Add_Library_Path ("synopsys"); + Add_Library_Name ("synopsys"); when Lib_Mentor => if Vhdl_Std >= Vhdl_08 then Warning ("--ieee=mentor is ignored for --std=08"); else - Add_Library_Path ("mentor"); + Add_Library_Name ("mentor"); end if; when Lib_None => null; end case; + + -- For std: just add the library prefix. + Libraries.Add_Library_Path + (Get_Machine_Path_Prefix & Directory_Separator); end if; if Load then Libraries.Load_Std_Library; |