Skip to content

Commit

Permalink
try various gcc invocations in p5test
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Jan 27, 2012
1 parent 0aaf9bf commit e0b4e76
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions p5test/p5test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@
</configuration>
END

system($csc,"test4.cs");
system("$cc -shared -o test4lib.$Config{so} test4lib.c");
my $ok4 = `mono test4.exe`;
is $ok4,"OK 4\n","We call C code from mono";
for my $invocation ("$cc -shared ","$cc -m32 -shared","$cc -m32 -shared -fPIC","gcc -dynamiclib -current_version 1.0") {
unlink("test4lib.$Config{so}");
system($csc,"test4.cs");
system("$invocation -o test4lib.$Config{so} test4lib.c");
my $ok4 = `mono test4.exe`;
diag('resulting library: '.`file test4lib.$Config{so}`);
is $ok4,"OK 4\n","We call C code from mono using $invocation";
}

my $lib_path5 = rel2abs("test5lib.$Config{so}");
open(my $test5_config,">test5.exe.config");
Expand All @@ -52,7 +56,7 @@ END
system($csc,"test5.cs");
system("$cc -shared -o test5lib.$Config{so} test5lib.c $ccopts $ldopts");
my $ok5 = `mono test5.exe`;
is $ok5,"OK 5\n","We call C code from mono";
is $ok5,"OK 5\n","We call P5 code from mono";


done_testing;
Expand Down

0 comments on commit e0b4e76

Please sign in to comment.