mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 04:02:25 +00:00
Update Visual C make.cmd, use separate compilation for LOLA conf test.
This commit is contained in:
parent
305781e000
commit
3ba0d7ae2c
5 changed files with 135 additions and 104 deletions
|
|
@ -1,19 +1,34 @@
|
|||
MODULE extTools;
|
||||
|
||||
IMPORT Strings, Out, Configuration, Platform, Modules, OPM;
|
||||
IMPORT Strings, Out, Configuration, Platform, Modules, Heap, OPM;
|
||||
|
||||
VAR CFLAGS: ARRAY 1023 OF CHAR;
|
||||
TYPE CommandString = ARRAY 4096 OF CHAR;
|
||||
|
||||
VAR CFLAGS: CommandString;
|
||||
|
||||
|
||||
PROCEDURE execute(title: ARRAY OF CHAR; cmd: ARRAY OF CHAR);
|
||||
VAR r, status, exitcode: INTEGER;
|
||||
VAR r, status, exitcode: INTEGER; fullcmd: CommandString;
|
||||
BEGIN
|
||||
IF OPM.verbose IN OPM.Options THEN
|
||||
Out.String(title); Out.String(cmd); Out.Ln
|
||||
Out.String(" "); Out.String(fullcmd); Out.Ln
|
||||
END;
|
||||
r := Platform.System(cmd);
|
||||
status := r MOD 128;
|
||||
exitcode := r DIV 256;
|
||||
|
||||
(* Hack to suppress unwanted filename display by Microsoft C compiler on successful compilations. *)
|
||||
IF Configuration.compiler = "MSC" THEN
|
||||
fullcmd := "cmd /c ";
|
||||
Strings.Append(cmd, fullcmd);
|
||||
Strings.Append(" >msc-listing || type msc-listing", fullcmd)
|
||||
ELSE
|
||||
COPY(cmd, fullcmd);
|
||||
END;
|
||||
|
||||
(* Get GC to run file finalizers closing generated C files as otherwise Microsoft C cannot open them. *)
|
||||
Heap.GC(FALSE);
|
||||
|
||||
r := Platform.System(fullcmd);
|
||||
|
||||
status := r MOD 128; exitcode := r DIV 256;
|
||||
IF exitcode > 127 THEN exitcode := exitcode - 256 END; (* Handle signed exit code *)
|
||||
|
||||
IF r # 0 THEN
|
||||
|
|
@ -43,7 +58,7 @@ END InitialiseCompilerCommand;
|
|||
|
||||
PROCEDURE Assemble*(moduleName: ARRAY OF CHAR);
|
||||
VAR
|
||||
cmd: ARRAY 1023 OF CHAR;
|
||||
cmd: CommandString;
|
||||
BEGIN
|
||||
InitialiseCompilerCommand(cmd);
|
||||
Strings.Append("-c ", cmd);
|
||||
|
|
@ -55,7 +70,7 @@ PROCEDURE Assemble*(moduleName: ARRAY OF CHAR);
|
|||
|
||||
PROCEDURE LinkMain*(VAR moduleName: ARRAY OF CHAR; statically: BOOLEAN; additionalopts: ARRAY OF CHAR);
|
||||
VAR
|
||||
cmd: ARRAY 1023 OF CHAR;
|
||||
cmd: CommandString;
|
||||
BEGIN
|
||||
InitialiseCompilerCommand(cmd);
|
||||
Strings.Append(moduleName, cmd);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/sh
|
||||
. ../testenv.sh
|
||||
$OBECOMP LSS.Mod LSB.Mod LSC.Mod LSV.Mod lola.Mod -m
|
||||
$OBECOMP LSS.Mod
|
||||
$OBECOMP LSB.Mod
|
||||
$OBECOMP LSC.Mod
|
||||
$OBECOMP LSV.Mod
|
||||
$OBECOMP lola.Mod -m
|
||||
./Lola RISC5.Lola result
|
||||
. ../testresult.sh
|
||||
|
|
|
|||
|
|
@ -14,12 +14,7 @@ export LD_LIBRARY_PATH=$1/lib:$LD_LIBRARY_PATH
|
|||
rm -f *.o *.obj *.exe *.sym *.c *.h result new.asm $(basename $PWD)
|
||||
|
||||
# Under gcc generate assembly source for source change test.
|
||||
# NOTE: The following CFLAGS causes the assembler to write source
|
||||
# to a single file. When there are multiple Mod files, each
|
||||
# corresponding assembly file will overwrite the previous. I
|
||||
# cannot see any way to overcome this short of using -S
|
||||
# on the voc command and calling 'as' explicitly.
|
||||
# NOTE 2: The cygwin 64 bit build has relocation errors with
|
||||
# NOTE: The cygwin 64 bit build has relocation errors with
|
||||
# these assembly generation options.
|
||||
if [ "$COMPILER" = "gcc" -a "$FLAVOUR" != "cygwin.LP64.gcc" ]
|
||||
then export CFLAGS="-gstabs -g1 -Wa,-acdhln=new.asm -Wl,-Map=output.map"
|
||||
|
|
|
|||
|
|
@ -413,6 +413,7 @@ void writeConfigurationMod() {
|
|||
fprintf(fd, " linkflags* = '%s';\n", linkflags);
|
||||
fprintf(fd, " libspec* = '%s';\n", libspec);
|
||||
fprintf(fd, " libext* = '%s';\n", libext);
|
||||
fprintf(fd, " compiler* = '%s';\n", compiler);
|
||||
fprintf(fd, " compile* = '%s';\n", cc);
|
||||
fprintf(fd, " installdir* = '%s';\n", installdir);
|
||||
fprintf(fd, " staticLink* = '%s';\n", staticlink);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue