Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jun 2020 11:15:30 +0000 (UTC)
From:      Dave Cottlehuber <dch@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r537609 - in head/databases/couchdb3: . files
Message-ID:  <202006031115.053BFUbL091741@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dch
Date: Wed Jun  3 11:15:30 2020
New Revision: 537609
URL: https://svnweb.freebsd.org/changeset/ports/537609

Log:
  databases/couchdb3: accommodate compiler quirks in i386
  
  As reported in BZ, -flto passes unsupported parameters to /usr/bin/ld
  Fixes all 11.x and 12.x i386 & handles additional unused warnings on i386.
  
  PR:		238514
  Reported by:	pkg-fallout
  Sponsored by:	SkunkWerks, GmbH

Added:
  head/databases/couchdb3/files/extra-patch-src_jiffy_c__src_double-conversion_strtod.cc   (contents, props changed)
Modified:
  head/databases/couchdb3/Makefile

Modified: head/databases/couchdb3/Makefile
==============================================================================
--- head/databases/couchdb3/Makefile	Wed Jun  3 10:05:13 2020	(r537608)
+++ head/databases/couchdb3/Makefile	Wed Jun  3 11:15:30 2020	(r537609)
@@ -53,6 +53,12 @@ LOGFILE?=	${LOGDIR}/couch.log
 APPDIR=		${LOCALBASE}/libexec/${PORTNAME}
 RELDIR=		${APPDIR}/releases/${DISTVERSION}
 
+.include <bsd.port.options.mk>
+
+.if ${OPSYS} == FreeBSD && ${ARCH} == i386
+EXTRA_PATCHES=	${PATCHDIR}/extra-patch-src_jiffy_c__src_double-conversion_strtod.cc
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} \
 	    -e 's,%%APPDIR%%,${APPDIR},g' \
@@ -64,6 +70,12 @@ post-patch:
 	    -e 's,\$COUCHDB_USER,${USERS},g' \
 	    -e 's,\$LOG_FILE,${LOGFILE},g' \
 	    ${WRKSRC}/configure
+# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238514
+.if ${OPSYS} == FreeBSD && (${OSVERSION} < 1200000 || ${ARCH} == i386)
+	@${REINPLACE_CMD} \
+	    -e 's,\$FLTO_FLAG ,,g' \
+	    ${WRKSRC}/src/jiffy/rebar.config
+.endif
 
 pre-install:
 	# relocate user-modifiable runtime configs to match hier(7)

Added: head/databases/couchdb3/files/extra-patch-src_jiffy_c__src_double-conversion_strtod.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/couchdb3/files/extra-patch-src_jiffy_c__src_double-conversion_strtod.cc	Wed Jun  3 11:15:30 2020	(r537609)
@@ -0,0 +1,45 @@
+--- src/jiffy/c_src/double-conversion/strtod.cc.orig	2020-02-27 18:01:54 UTC
++++ src/jiffy/c_src/double-conversion/strtod.cc
+@@ -38,7 +38,6 @@ namespace double_conversion {
+ // 2^53 = 9007199254740992.
+ // Any integer with at most 15 decimal digits will hence fit into a double
+ // (which has a 53bit significand) without loss of precision.
+-static const int kMaxExactDoubleIntegerDecimalDigits = 15;
+ // 2^64 = 18446744073709551616 > 10^19
+ static const int kMaxUint64DecimalDigits = 19;
+ 
+@@ -54,34 +53,6 @@ static const int kMinDecimalPower = -324;
+ // 2^64 = 18446744073709551616
+ static const uint64_t kMaxUint64 = UINT64_2PART_C(0xFFFFFFFF, FFFFFFFF);
+ 
+-
+-static const double exact_powers_of_ten[] = {
+-  1.0,  // 10^0
+-  10.0,
+-  100.0,
+-  1000.0,
+-  10000.0,
+-  100000.0,
+-  1000000.0,
+-  10000000.0,
+-  100000000.0,
+-  1000000000.0,
+-  10000000000.0,  // 10^10
+-  100000000000.0,
+-  1000000000000.0,
+-  10000000000000.0,
+-  100000000000000.0,
+-  1000000000000000.0,
+-  10000000000000000.0,
+-  100000000000000000.0,
+-  1000000000000000000.0,
+-  10000000000000000000.0,
+-  100000000000000000000.0,  // 10^20
+-  1000000000000000000000.0,
+-  // 10^22 = 0x21e19e0c9bab2400000 = 0x878678326eac9 * 2^22
+-  10000000000000000000000.0
+-};
+-static const int kExactPowersOfTenSize = ARRAY_SIZE(exact_powers_of_ten);
+ 
+ // Maximum number of significant digits in the decimal representation.
+ // In fact the value is 772 (see conversions.cc), but to give us some margin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006031115.053BFUbL091741>