CYG14 Dynaloader without USEIMPORTLIB, and search cyg prefix
authorReini Urban <rurban@x-ray.at>
Tue, 14 Sep 2010 15:48:32 +0000 (17:48 +0200)
committerJesse Vincent <jesse@bestpractical.com>
Mon, 3 Jan 2011 16:29:09 +0000 (00:29 +0800)
commitcc7e77fd5a0ee9f1498e54dddf566117da62754b
tree48411af52debf0c222641876586004009b4ec71e
parentc0a149a90b8b6e1c18de7294ca974265fb559cf5
CYG14 Dynaloader without USEIMPORTLIB, and search cyg prefix

part1: Support the standard cyg dll prefix, which is e.g. needed for FFI's.
Ctypes and C::DynaLib use DynaLoader to find dlls.

part2: With -DUSEIMPORTLIB DynaLoader symbols link against the prefixed
symbol names for the .dll.a importlib, but we need to link against the
symbols directly. We don't link Dynaloader against libperl.dll.a.

Otherwise:
$ g++-4 -o cygperl5_13_4.dll --shared perlsrc.o cygwin.o  DynaLoader.o -ldl -lcrypt
  Creating library file: libperl.dll.a
  DynaLoader.o: In function `XS_DynaLoader_dl_undef_symbols':
  ext/DynaLoader/DynaLoader.c:346: undefined reference to `__imp__PL_stack_sp'
  ext/DynaLoader/DynaLoader.c:346: undefined reference to `__imp__PL_markstack_ptr'
  ext/DynaLoader/DynaLoader.c:346: undefined reference to `__imp__PL_stack_base'
ext/DynaLoader/DynaLoader_pm.PL
ext/DynaLoader/Makefile.PL