aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv/ghdldrv.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-07-23 18:41:33 +0200
committerTristan Gingold <tgingold@free.fr>2021-07-23 18:41:33 +0200
commit1660e1b6a340a090399d56e685585f43fdf40305 (patch)
tree94345388ed16683a916738511d61db8dd325cdcc /src/ghdldrv/ghdldrv.adb
parenta4a922a1dc053fdd382cd942311bd50d8808799d (diff)
downloadghdl-1660e1b6a340a090399d56e685585f43fdf40305.tar.gz
ghdl-1660e1b6a340a090399d56e685585f43fdf40305.tar.bz2
ghdl-1660e1b6a340a090399d56e685585f43fdf40305.zip
ghdldrv.adb: pass option -auxbase to ghdl1. For #1817
Diffstat (limited to 'src/ghdldrv/ghdldrv.adb')
-rw-r--r--src/ghdldrv/ghdldrv.adb15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb
index 2d56dd821..f77c097ee 100644
--- a/src/ghdldrv/ghdldrv.adb
+++ b/src/ghdldrv/ghdldrv.adb
@@ -54,6 +54,9 @@ package body Ghdldrv is
-- "-quiet" option.
Dash_Quiet : constant String_Access := new String'("-quiet");
+ -- "-auxbase" option.
+ Dash_Auxbase : constant String_Access := new String'("-auxbase");
+
-- "-fpic" option.
Dash_Fpic : constant String_Access := new String'("-fpic");
@@ -170,6 +173,7 @@ package body Ghdldrv is
is
Obj_File : String_Access;
Asm_File : String_Access;
+ Aux_File : String_Access;
Post_File : String_Access;
Success : Boolean;
begin
@@ -182,6 +186,7 @@ package body Ghdldrv is
case Backend is
when Backend_Gcc =>
Asm_File := Append_Suffix (File, Asm_Suffix, In_Work);
+ Aux_File := new String'(Get_Base_Name (File));
when Backend_Llvm
| Backend_Mcode =>
null;
@@ -194,7 +199,7 @@ package body Ghdldrv is
declare
P : Natural;
Nbr_Args : constant Natural :=
- Last (Cmd.Compiler_Args) + Options'Length + 5;
+ Last (Cmd.Compiler_Args) + Options'Length + 7;
Args : Argument_List (1 .. Nbr_Args);
begin
P := 0;
@@ -215,6 +220,10 @@ package body Ghdldrv is
P := P + 1;
Args (P) := Dash_Quiet;
end if;
+ P := P + 1;
+ Args (P) := Dash_Auxbase;
+ P := P + 1;
+ Args (P) := Aux_File;
when Backend_Llvm =>
P := P + 1;
Args (P) := Dash_c;
@@ -281,6 +290,10 @@ package body Ghdldrv is
P := P + 1;
Args (P) := Dash_Quiet;
end if;
+ P := P + 1;
+ Args (P) := Dash_Auxbase;
+ P := P + 1;
+ Args (P) := Aux_File;
when Backend_Llvm =>
null;
when Backend_Mcode =>