develooper Front page | perl.perl5.porters | Postings from July 2016

Re: [perl #128358] Cygwin: nm detects memmem, but headers don'texpose it, leading to tests crashing

From:
Achim Gratz
Date:
July 18, 2016 19:51
Subject:
Re: [perl #128358] Cygwin: nm detects memmem, but headers don'texpose it, leading to tests crashing
Message ID:
871t2q209d.fsf@Rainer.invalid
Dan Collins (via RT) writes:
> Are there any risks or downsides to enabling this flag on Cygwin? Are
> there any other configurations you'd like me to test?

FWIW, here's my patch for the Perl that comes with Cygwin (and don't use
nm, it doesn't work correctly):

--- buildperl/hints/cygwin.sh.orig
+++ buildperl/hints/cygwin.sh
@@ -25,13 +25,22 @@
 libswanted=`echo " $libswanted " | sed -e 's/ m / /g'`
 # - eliminate -lutil, symbols are all in libcygwin.a
 libswanted=`echo " $libswanted " | sed -e 's/ util / /g'`
+ignore_versioned_solibs='y'
+usenm='no'
+libc='/usr/lib/libcygwin.a'
+loclibpth=' '
+glibpth=' '
+plibpth=' '
+libpth=' '
+PATH='.:/usr/bin/'
 # - add libgdbm_compat $libswanted
 libswanted="$libswanted gdbm_compat"
 test -z "$optimize" && optimize='-O3'
 man3ext='3pm'
 test -z "$use64bitint" && use64bitint='define'
 test -z "$useithreads" && useithreads='define'
-ccflags="$ccflags -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__"
+test -z "$usemymalloc" && usemymalloc='undef'
+ccflags="$ccflags -DPERL_USE_SAFE_PUTENV -D_GNU_SOURCE -U__STRICT_ANSI__"
 # - otherwise i686-cygwin
 archname='cygwin'
 
@@ -62,6 +71,13 @@
         d_inetpton='undef'
 esac
 
+case "$osvers" in
+    2.[0-4].*|1.*)
+        # newlib finitel is buggy before cygwin-2.5.0
+        d_finitel='undef'
+        ;;
+esac
+
 # compile Win32CORE "module" as static. try to avoid the space.
 if test -z "$static_ext"; then
   static_ext="Win32CORE"



Regards
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About