diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-07-23 18:41:33 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-07-23 18:41:33 +0200 |
commit | 1660e1b6a340a090399d56e685585f43fdf40305 (patch) | |
tree | 94345388ed16683a916738511d61db8dd325cdcc /src/ghdldrv | |
parent | a4a922a1dc053fdd382cd942311bd50d8808799d (diff) | |
download | ghdl-1660e1b6a340a090399d56e685585f43fdf40305.tar.gz ghdl-1660e1b6a340a090399d56e685585f43fdf40305.tar.bz2 ghdl-1660e1b6a340a090399d56e685585f43fdf40305.zip |
ghdldrv.adb: pass option -auxbase to ghdl1. For #1817
Diffstat (limited to 'src/ghdldrv')
-rw-r--r-- | src/ghdldrv/ghdldrv.adb | 15 |
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 => |