aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv/ghdldrv.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-07-03 16:38:46 +0200
committerTristan Gingold <tgingold@free.fr>2016-07-05 08:06:40 +0200
commit48ad1cae7fa8da16006e69a2e71be85c2179c635 (patch)
treea8625408bb11a4b43cd2acb5cf275eeef1f0df0a /src/ghdldrv/ghdldrv.adb
parent53b1d9101cbff266c4c34c72dd77970bba0e9718 (diff)
downloadghdl-48ad1cae7fa8da16006e69a2e71be85c2179c635.tar.gz
ghdl-48ad1cae7fa8da16006e69a2e71be85c2179c635.tar.bz2
ghdl-48ad1cae7fa8da16006e69a2e71be85c2179c635.zip
ghdldrv: consider executable suffix for -r.
Fixes #110
Diffstat (limited to 'src/ghdldrv/ghdldrv.adb')
-rw-r--r--src/ghdldrv/ghdldrv.adb7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb
index 3442ba157..2bb281cf5 100644
--- a/src/ghdldrv/ghdldrv.adb
+++ b/src/ghdldrv/ghdldrv.adb
@@ -1023,13 +1023,16 @@ package body Ghdldrv is
procedure Perform_Action (Cmd : in out Command_Run; Args : Argument_List)
is
pragma Unreferenced (Cmd);
+ Suffix : constant String_Access := Get_Executable_Suffix;
Opt_Arg : Natural;
begin
Extract_Elab_Unit ("-r", Args, Opt_Arg);
if Sec_Name = null then
- Base_Name := Prim_Name;
+ Base_Name := new String'
+ (Prim_Name.all & Suffix.all);
else
- Base_Name := new String'(Prim_Name.all & '-' & Sec_Name.all);
+ Base_Name := new String'
+ (Prim_Name.all & '-' & Sec_Name.all & Suffix.all);
end if;
if not Is_Regular_File (Base_Name.all & Nul) then
Error ("file '" & Base_Name.all & "' does not exists");