| !Run file for the GNU compilers

if "<GCC$Dir>" = "" then Set Run$Path <Run$Path>,<Obey$Dir>.bin.
Set GCC$Dir <Obey$Dir>
if "<GCC$Path>" = "" then Set GCC$Path <GCC$Dir>.gcc.
if "<GPP$Path>" = "" then Set GPP$Path <GCC$Dir>.gpp.

| Set the return code limit. Unixlib encodes information within this range
Set Sys$RCLimit 65536

| Place to store temporary files
if "<UnixFS$/tmp>" = "" then Set UnixFS$/tmp <Wimp$ScrapDir>

| Our preferred linker. This will be searched for through the standard search path
| Acorn's link program is an alternative
Set GCC$Linker "drlink"

| Ensure correct filename translation for a variety of prefixes
Set UnixFS$sfix "f:for:F:fpp:cc:cxx:cpp:c++:C:ii:rpo:ads:adb:ada:c:m:h:i:s:S:ali:adc:xrb:xrs:l:o:p:pas:ph:gpi:y"

| Set search paths for the Ada run time library files
set GNATada$Path <Obey$Dir>.adainc.
set GNATInc$Path gnatada:1.,gnatada:2.,gnatada:3.,gnatada:4.,gnatada:5.,gnatada:6.,gnatada:7.
set GNATlib$Path gcc:adalib.1.,gcc:adalib.2.,gcc:adalib.3.,gcc:adalib.4.,gcc:adalib.5.,gcc:adalib.6.,gcc:adalib.7.

| Set search path for gnatbl
setmacro path <Run$Path>

| Set aliases for controlling UnixLib heap for dynamic areas and for Virtualise
| See the documentation about UnixLib and dynamic areas.
set Alias$VM_Heap *SetEval UnixLib_Heap %%0|M*SetEval Virtualise$Area_UnixLib_heap %%0
set Alias$DA_Heap *SetEval UnixLib_Heap %%0|M*UnSet Virtualise$Area_UnixLib_heap
set Alias$No_Heap *UnSet UnixLib_Heap|M*UnSet Virtualise$Area_UnixLib_heap

| Uncomment this to enable dynamic area version of UnixLib - Risc PC only
|*DA_Heap 10

| Virtualise$SwapDir controls where the swap files are placed.
|*Set Virtualise$SwapDir <Wimp$ScrapDir>

| Uncomment these if you have a RiscPC and wish to use dynamic areas
set gcc_heap ""

| For GNAT Ada
|set gnatbind_heap ""
|set gnatbl_heap ""
|set gnatchop_heap ""
|set gnatf_heap ""
|set gnatmake_heap ""

| For Fortran 77
|set g77_heap ""

| For C++
|set g++_heap ""

| For Pascal
|set gpc_heap ""

| Used for extended command lines
| Initially, we look in !System for the DDEUtils module supplied by Acorn
| If not present, then we will load the DDEUtilsCy version.
RMEnsure DDEUtils 0.02 run <GCC$Dir>.support.DDEUtilsCy.IFExist System:Modules.DDEUtils Then RMLoad System:Modules.DDEUtils
RMEnsure DDEUtils 0.01 %Obey -c <GCC$Dir>.support.DDEUtilsCy.InitDDECy
RMEnsure DDEUtils 0.01 RMRun <GCC$Dir>.support.DDEUtilsCy.DDEUtilsCy

RMEnsure UtilityModule 3.10 Obey
| Details specific to RISC OS 3.10 and above
RMEnsure UtilityModule 3.70 RMEnsure CallASWI 0.01 RMLoad System:Modules.CallASWI
dir <Obey$Dir>.Files
filer_opendir <Obey$Dir>.files