diff options
author | gingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7> | 2005-12-10 17:08:01 +0000 |
---|---|---|
committer | gingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7> | 2005-12-10 17:08:01 +0000 |
commit | 632952160f9a7e5a9b4bb7bdd99ae76b3ec0e96a (patch) | |
tree | 8d3d25dd5ede4ac0c1ed7a0cb4bb914ea90d6e87 /translate/ghdldrv/ghdllocal.adb | |
parent | 54ee7a02a6b3d622545aceff27cf43eeefb883f4 (diff) | |
download | ghdl-632952160f9a7e5a9b4bb7bdd99ae76b3ec0e96a.tar.gz ghdl-632952160f9a7e5a9b4bb7bdd99ae76b3ec0e96a.tar.bz2 ghdl-632952160f9a7e5a9b4bb7bdd99ae76b3ec0e96a.zip |
-m32 flag added, general substitution in .lst file
Diffstat (limited to 'translate/ghdldrv/ghdllocal.adb')
-rw-r--r-- | translate/ghdldrv/ghdllocal.adb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/translate/ghdldrv/ghdllocal.adb b/translate/ghdldrv/ghdllocal.adb index 3abd5559f..4a9f62f5a 100644 --- a/translate/ghdldrv/ghdllocal.adb +++ b/translate/ghdldrv/ghdllocal.adb @@ -42,6 +42,9 @@ package body Ghdllocal is Flag_Create_Default_Config : Boolean := True; + -- If TRUE, generate 32bits code on 64bits machines. + Flag_32bit : Boolean := False; + procedure Finish_Compilation (Unit : Iir_Design_Unit; Main : Boolean := False) is @@ -125,6 +128,9 @@ package body Ghdllocal is elsif Option = "--ieee=standard" then Flag_Ieee := Lib_Standard; Res := Option_Ok; + elsif Option = "-m32" then + Flag_32bit := True; + Res := Option_Ok; elsif Option'Length >= 2 and then (Option (2) = 'g' or Option (2) = 'O') then @@ -169,11 +175,20 @@ package body Ghdllocal is end case; end Get_Version_Path; + function Get_Machine_Path_Prefix return String is + begin + if Flag_32bit then + return Prefix_Path.all & "32" & Directory_Separator; + else + return Prefix_Path.all; + end if; + end Get_Machine_Path_Prefix; + procedure Add_Library_Path (Name : String) is begin Libraries.Add_Library_Path - (Prefix_Path.all & Get_Version_Path & Directory_Separator + (Get_Machine_Path_Prefix & Get_Version_Path & Directory_Separator & Name & Directory_Separator); end Add_Library_Path; @@ -182,6 +197,9 @@ package body Ghdllocal is begin if Prefix_Path = null then Prefix_Path := new String'(Default_Pathes.Prefix); + else + -- assume the user has set the correct path, so do not insert 32 + Flag_32bit := False; end if; -- Add pathes for predefined libraries. |