Author: rurban
Date: Sun Dec 28 05:03:29 2008
New Revision: 34483
Modified:
branches/pdd30install_stage3/config/init/hints/cygwin.pm
Log:
56998-cygdll_versioning
Modified: branches/pdd30install_stage3/config/init/hints/cygwin.pm
==============================================================================
--- branches/pdd30install_stage3/config/init/hints/cygwin.pm (original)
+++ branches/pdd30install_stage3/config/init/hints/cygwin.pm Sun Dec 28
05:03:29 2008
@@ -13,19 +13,31 @@
# in the standard installation, so we get rid of it
my $libs = $conf->data->get('libs');
$libs =~ s/-lutil\b//g;
+ # same for -lm and -dl
+ $libs =~ s/-lm\b//g;
+ $libs =~ s/-ldl\b//g;
my $build_dir = $conf->data->get('build_dir');
$build_dir =~ s/ /\\ /g;
+ my $libparrot_shared = $conf->data->get('libparrot_shared');
+ # force cyg prefix
+ $libparrot_shared =~ s/^lib/cyg/g;
+ # force the dll versioning
+ my @parrot_version = Parrot::BuildUtil::parrot_version();
+ my $dllsuffix = join("_",@parrot_version);
+ $libparrot_shared =~ s/parrot\.dll/parrot$dllsuffix\.dll/;
- # A note about building shared libraries: Perl5 uses the 'ld2' tool, which
- # is installed as part of the perl5 installation. So far, it appears
- # parrot can get by with simply using gcc -shared, so we override the
- # perl5 Configure defaults and use 'gcc -shared' instead of 'ld2'.
- # If this later causes problems, it might be worth revisiting.
- # A. Dougherty 9/9/2002
+ # An old note about building shared libraries: Perl5 used the 'ld2' tool
until
+ # 5.8.8-4, which is installed as part of the perl5 installation. So far, it
+ # appears parrot can get by with simply using gcc -shared, so we override
+ # the perl5 Configure defaults and use 'gcc -shared' instead of 'ld2'. If
+ # this later causes problems, it might be worth revisiting. A. Dougherty
+ # 9/9/2002
$conf->data->set(
build_dir => $build_dir,
- ld => 'gcc',
+ ld => $conf->data->get('ld') eq 'ld2'
+ ? 'gcc' # do not use old perl5 linker helper
+ : $conf->data->get('ld'), # gcc or g++
ld_share_flags => '-shared',
ld_load_flags => '-shared',
libs => $libs,
@@ -34,7 +46,10 @@
parrot_is_shared => 1,
sym_export => '__declspec(dllexport)',
sym_import => '__declspec(dllimport)',
- cygchkdll => 'tools/build/cygchkdll.sh $(MINIPARROT)
$(LIBPARROT)',
+ #cygchkdll => 'tools/build/cygchkdll.sh $(MINIPARROT)
$(LIBPARROT)',
+ libparrot_shared => $libparrot_shared,
+ blib_dir => '.',
+ libparrot_ldflags => '-L' . $build_dir . ' -lparrot',
);
# inet_aton needs to be defined on Cygwin.