From 48ad1cae7fa8da16006e69a2e71be85c2179c635 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 3 Jul 2016 16:38:46 +0200 Subject: ghdldrv: consider executable suffix for -r. Fixes #110 --- src/ghdldrv/ghdldrv.adb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ghdldrv') 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"); -- cgit v1.2.3