Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

another tiny edit for win32 #423

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions script/cc_harness
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ if (grep(/^-[cES]$/, @ARGV)) { # compile-only with -c -E or -S
# another ldopts bug: ensure Win32CORE gets added.
if ($^O =~ /^(cygwin|MSWin32|msys)/) {
if (index($linkargs, "Win32CORE") < 0) {
my $archdir = $ENV{PERL_CORE} ? "../.." : $Config{archlib};
my $archdir = $ENV{PERL_CORE} ? "../.." : "$Config{archlib}/..";
my $win32core = "-L$archdir/lib/auto/Win32CORE -lWin32CORE";
if (-e "$archdir/lib/auto/Win32CORE/Win32CORE.a") {
$win32core = "$archdir/lib/auto/Win32CORE/Win32CORE.a";
Expand Down Expand Up @@ -135,7 +135,7 @@ sub cc_harness_msvc {
$link .= " /OPT:NOREF" if $ENV{APPVEYOR} and $^O eq 'MSWin32';
}
if (index($link, "Win32CORE") < 0) {
my $archdir = $ENV{PERL_CORE} ? "../.." : $Config{archlib};
my $archdir = $ENV{PERL_CORE} ? "../.." : "$Config{archlib}/..";
my $win32core = "-L$archdir/lib/auto/Win32CORE -lWin32CORE";
if (-e "$archdir/lib/auto/Win32CORE/Win32CORE.lib") {
$win32core = "$archdir/lib/auto/Win32CORE/Win32CORE.lib";
Expand Down Expand Up @@ -183,4 +183,4 @@ $ccflags .= $B::C::Config::extra_cflags;

my $cccmd = "$Config{cc} $ccflags -I$coredir @ARGV $linkargs";
print "$cccmd\n" unless $quiet;
exec $cccmd;
system($cccmd);
4 changes: 2 additions & 2 deletions script/perlcc.PL
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ sub cc_harness_msvc {

# another ldopts bug: ensure Win32CORE gets added.
if (index($link, "Win32CORE") < 0) {
my $archdir = $ENV{PERL_CORE} ? "../.." : $Config{archlib};
my $archdir = $ENV{PERL_CORE} ? "../.." : "$Config{archlib}/..";
my $win32core = "-L$archdir/lib/auto/Win32CORE -lWin32CORE";
if (-e "$archdir/lib/auto/Win32CORE/Win32CORE.a") {
$win32core = "$archdir/lib/auto/Win32CORE/Win32CORE.a";
Expand Down Expand Up @@ -754,7 +754,7 @@ print OUT <<'!NO!SUBS!';
# another ldopts bug: ensure Win32CORE gets added, before -lperl
if (is_winlike()) {
if (index($ldopts, "Win32CORE") < 0) {
my $archdir = $ENV{PERL_CORE} ? "../.." : $Config{archlib};
my $archdir = $ENV{PERL_CORE} ? "../.." : $Config{archlib}/..";
my $win32core = "-L$archdir/lib/auto/Win32CORE -lWin32CORE";
if (-e "$archdir/lib/auto/Win32CORE/Win32CORE.a") {
$win32core = "$archdir/lib/auto/Win32CORE/Win32CORE.a";
Expand Down
2 changes: 1 addition & 1 deletion t/TestBC.pm
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ sub run_cc_test {

if ($^O =~ /^(cygwin|MSWin32|msys)/) {
if (index($command, "Win32CORE") < 0) {
my $archdir = $ENV{PERL_CORE} ? "../.." : $Config{archlib};
my $archdir = $ENV{PERL_CORE} ? "../.." : "$Config{archlib}/..";
my $win32core = "-L$archdir/lib/auto/Win32CORE -lWin32CORE";
if (-e "$archdir/lib/auto/Win32CORE/Win32CORE.a") {
$win32core = "$archdir/lib/auto/Win32CORE/Win32CORE.a";
Expand Down