Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 05118c5

Browse files
committed
cygwin: skip -flto on all cygwins
and revert --enable-auto-image-base. Didn't work even on 64bit. -flto just move the symbols round too much for 32 relocations. Invalid relocation. Offset 0x.. at address 0x.. doesn't fit into 32 bits
1 parent 60a920f commit 05118c5

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

Configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5743,8 +5743,8 @@ $define)
57435743
esac
57445744

57455745
: probe for -flto
5746-
case "$myarchname" in
5747-
i686-pc-cygwin) ;;
5746+
case "$osname" in
5747+
cygwin) ;;
57485748
*)
57495749
case "$cc $ccflags $dflt" in
57505750
*-DDEBUGGING*)

Makefile.SH

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,8 @@ true)
7575
-install_name \$(shrpdir)/\$@"
7676
;;
7777
cygwin*)
78-
shrpldflags="$shrpldflags -Wl,--out-implib=libcperl.dll.a"
79-
case $ccflags in
80-
*flto*) shrpldflags="$shrpldflags -Wl,--enable-auto-image-base" ;;
81-
*) shrpldflags="$shrpldflags -Wl,--image-base,0x52000000" ;;
82-
esac
78+
shrpldflags="$shrpldflags -Wl,--out-implib=libcperl.dll.a \
79+
-Wl,--image-base,0x52000000"
8380
linklibperl="-L. -lcperl"
8481
;;
8582
sunos*)

pod/perlcdelta.pod

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,10 @@ Fixed C<boot_Win32CORE> prototype to skip dllexport, fatal with C<-flto>.
404404

405405
Fixed ar for F<Win32CORE.a> by using the gcc liblto plugin.
406406

407-
Skip probing for C<-flto> on 32bit cygwin. This reliably fails to find
408-
a proper image-base with that many new symbols, the adress space is just
409-
too small.
407+
Skip probing for C<-flto> on cygwin. This reliably fails to find a
408+
proper image-base with that many new symbols, the adress space is just
409+
too small:
410+
C<Invalid relocation. Offset 0x.. at address 0x.. doesn't fit into 32 bits>
410411

411412
=back
412413

0 commit comments

Comments
 (0)