[postgis-tickets] r17990 - Unify how libm is added to the LDFLAGS
Raul
raul at rmr.ninja
Fri Oct 25 07:17:09 PDT 2019
Author: algunenano
Date: 2019-10-25 07:17:07 -0700 (Fri, 25 Oct 2019)
New Revision: 17990
Modified:
trunk/NEWS
trunk/configure.ac
trunk/doc/html/image_src/Makefile.in
trunk/liblwgeom/Makefile.in
trunk/liblwgeom/cunit/Makefile.in
trunk/loader/cunit/Makefile.in
trunk/raster/loader/Makefile.in
trunk/raster/test/cunit/Makefile.in
Log:
Unify how libm is added to the LDFLAGS
Different objects or libraries where including it individually,
and some of them didn't which can caused issues depending on
the linker options
Closes https://github.com/postgis/postgis/pull/491/
Closes #4539
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2019-10-23 22:46:02 UTC (rev 17989)
+++ trunk/NEWS 2019-10-25 14:17:07 UTC (rev 17990)
@@ -5,7 +5,7 @@
-
* New features *
- -
+ - #4539, Unify libm includes (Raúl Marín)
* Bug fixes *
- #4544, Fix leak when parsing a WKT geometry_list (Raúl Marín)
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2019-10-23 22:46:02 UTC (rev 17989)
+++ trunk/configure.ac 2019-10-25 14:17:07 UTC (rev 17990)
@@ -80,6 +80,11 @@
AC_SUBST([NUMERICFLAGS])
dnl
+dnl Add libm to LDFLAGS so we don't need to add it everywhere manually
+dnl
+LDFLAGS="$LDFLAGS -lm"
+
+dnl
dnl Exporting used library symbols in the module is a source of issues,
dnl see https://trac.osgeo.org/postgis/ticket/3281
dnl
@@ -1619,6 +1624,7 @@
AC_MSG_RESULT([ C++ compiler (Wagyu): ${WAGYU_CXX} ${CXXFLAGS}])
fi
AC_MSG_RESULT([ CPPFLAGS: $CPPFLAGS])
+AC_MSG_RESULT([ LDFLAGS: $LDFLAGS])
AC_MSG_RESULT([ SQL preprocessor: ${SQLPP}])
AC_MSG_RESULT()
AC_MSG_RESULT([ -------------- Additional Info ------------- ])
Modified: trunk/doc/html/image_src/Makefile.in
===================================================================
--- trunk/doc/html/image_src/Makefile.in 2019-10-23 22:46:02 UTC (rev 17989)
+++ trunk/doc/html/image_src/Makefile.in 2019-10-25 14:17:07 UTC (rev 17990)
@@ -189,7 +189,7 @@
# Build the main executable
generator: ../../../liblwgeom/.libs/liblwgeom.a $(OBJS)
$(LIBTOOL) --mode=link \
- $(CC) -o $@ $(OBJS) ../../../liblwgeom/liblwgeom.la -lm $(CUNIT_LDFLAGS)
+ $(CC) -o $@ $(OBJS) ../../../liblwgeom/liblwgeom.la $(CUNIT_LDFLAGS)
# Build liblwgeom
../../../liblwgeom/.libs/liblwgeom.a:
Modified: trunk/liblwgeom/Makefile.in
===================================================================
--- trunk/liblwgeom/Makefile.in 2019-10-23 22:46:02 UTC (rev 17989)
+++ trunk/liblwgeom/Makefile.in 2019-10-25 14:17:07 UTC (rev 17990)
@@ -25,7 +25,7 @@
CC = @CC@
CPPFLAGS = @CPPFLAGS@
CFLAGS = @WARNFLAGS@ @CFLAGS@ @PICFLAGS@
-LDFLAGS = @LDFLAGS@ @GEOS_LDFLAGS@ @PROJ_LDFLAGS@ @JSON_LDFLAGS@ -lm
+LDFLAGS = @LDFLAGS@ @GEOS_LDFLAGS@ @PROJ_LDFLAGS@ @JSON_LDFLAGS@
NUMERICFLAGS = @NUMERICFLAGS@
top_builddir = @top_builddir@
prefix = @prefix@
Modified: trunk/liblwgeom/cunit/Makefile.in
===================================================================
--- trunk/liblwgeom/cunit/Makefile.in 2019-10-23 22:46:02 UTC (rev 17989)
+++ trunk/liblwgeom/cunit/Makefile.in 2019-10-25 14:17:07 UTC (rev 17990)
@@ -17,7 +17,7 @@
CUNIT_LDFLAGS=@CUNIT_LDFLAGS@
CUNIT_CPPFLAGS=@CUNIT_CPPFLAGS@ -I.. @CPPFLAGS@
CFLAGS=$(CUNIT_CPPFLAGS) @WARNFLAGS@ @CFLAGS@
-LDFLAGS = @GEOS_LDFLAGS@ $(CUNIT_LDFLAGS) -lm
+LDFLAGS = @GEOS_LDFLAGS@ $(CUNIT_LDFLAGS)
ifeq ($(CUNIT_WITH_VALGRIND), YES)
LIBTOOL_VALGRIND := valgrind $(CUNIT_VALGRIND_FLAGS)
Modified: trunk/loader/cunit/Makefile.in
===================================================================
--- trunk/loader/cunit/Makefile.in 2019-10-23 22:46:02 UTC (rev 17989)
+++ trunk/loader/cunit/Makefile.in 2019-10-25 14:17:07 UTC (rev 17990)
@@ -46,7 +46,7 @@
CFLAGS += $(GETTEXT_CFLAGS) $(ICONV_CFLAGS) $(PROJ_CFLAGS)
# Build full linking line
-LDFLAGS = -lm $(GEOS_LDFLAGS) $(GETTEXT_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(ICONV_LDFLAGS) $(CUNIT_LDFLAGS) $(PROJ_LDFLAGS)
+LDFLAGS = $(GEOS_LDFLAGS) $(GETTEXT_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(ICONV_LDFLAGS) $(CUNIT_LDFLAGS) $(PROJ_LDFLAGS)
# Object files
OBJS= \
Modified: trunk/raster/loader/Makefile.in
===================================================================
--- trunk/raster/loader/Makefile.in 2019-10-23 22:46:02 UTC (rev 17989)
+++ trunk/raster/loader/Makefile.in 2019-10-25 14:17:07 UTC (rev 17990)
@@ -73,8 +73,7 @@
$(LIBGDAL_DEPLIBS_LDFLAGS) \
$(GEOS_LDFLAGS) \
$(GETTEXT_LDFLAGS) \
- $(ICONV_LDFLAGS) \
- -lm
+ $(ICONV_LDFLAGS)
all: $(RASTER2PGSQL)
Modified: trunk/raster/test/cunit/Makefile.in
===================================================================
--- trunk/raster/test/cunit/Makefile.in 2019-10-23 22:46:02 UTC (rev 17989)
+++ trunk/raster/test/cunit/Makefile.in 2019-10-25 14:17:07 UTC (rev 17990)
@@ -42,8 +42,7 @@
$(LIBLWGEOM_LDFLAGS) \
$(LIBGDAL_LDFLAGS) \
$(GEOS_LDFLAGS) \
- $(PROJ_LDFLAGS) \
- -lm \
+ $(PROJ_LDFLAGS)
CUNIT_LDFLAGS=@CUNIT_LDFLAGS@
CUNIT_CPPFLAGS=@CUNIT_CPPFLAGS@ -I..
More information about the postgis-tickets
mailing list