summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2017-08-02 16:15:06 +1000
committerSteve Hay <steve.m.hay@googlemail.com>2018-03-12 13:06:36 +0000
commit1e4ebce09b6f4055f05bb265cdb3777377e82e1c (patch)
tree7cd0abc9095988eb849a6a27dad1741b9cb1f817 /perl.c
parent7c8883553693f50ae9cab1390a49fbc01f206be7 (diff)
downloadperl-1e4ebce09b6f4055f05bb265cdb3777377e82e1c.tar.gz
(perl #131786) avoid a duplicate symbol error on _LIB_VERSION
For -flto -mieee-fp builds, the _LIB_VERSION definition in perl.c and in libieee conflict, causing a build failure. The test we perform in Configure checks only that such a variable exists (and is declared), it doesn't check that we can *define* such a variable, which the code in pp.c tried to do. So rather than trying to define the variable, just initialize it during our normal interpreter initialization. (cherry picked from commit fa2e45943e2b6ce22cf70dba5b47afe73c8c7c80)
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/perl.c b/perl.c
index 829a7abf80..384b2944c5 100644
--- a/perl.c
+++ b/perl.c
@@ -286,6 +286,14 @@ perl_construct(pTHXx)
PL_localpatches = local_patches; /* For possible -v */
#endif
+#if defined(LIBM_LIB_VERSION)
+ /*
+ * Some BSDs and Cygwin default to POSIX math instead of IEEE.
+ * This switches them over to IEEE.
+ */
+ _LIB_VERSION = _IEEE_;
+#endif
+
#ifdef HAVE_INTERP_INTERN
sys_intern_init();
#endif