aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv/ghdllocal.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-01-22 12:12:27 +0100
committerTristan Gingold <tgingold@free.fr>2018-01-25 06:07:10 +0100
commit7ef79a53a8f3cbb972d3ac7b8b9ab7754f201001 (patch)
treeea046711a06cc41b4f0f93f52198899052c1fc68 /src/ghdldrv/ghdllocal.adb
parentb1d50e135b86502224f43147f1d93fa3ee5d6f5d (diff)
downloadghdl-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/ghdldrv/ghdllocal.adb')
-rw-r--r--src/ghdldrv/ghdllocal.adb17
1 files changed, 10 insertions, 7 deletions
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;