[postgis-tickets] r17609 - Add CPPFLAGS where missing

Raul raul at rmr.ninja
Tue Jul 16 01:59:00 PDT 2019


Author: algunenano
Date: 2019-07-16 01:58:59 -0700 (Tue, 16 Jul 2019)
New Revision: 17609

Modified:
   trunk/libpgcommon/Makefile.in
   trunk/loader/Makefile.in
   trunk/raster/loader/Makefile.in
Log:
Add CPPFLAGS where missing

Spotted by Debian's build log hardening checker, blhc.

https://salsa.debian.org/debian-gis-team/postgis/-/jobs/222378

Patch by Christoph Berg <myon -at- debian.org>

Closes https://github.com/postgis/postgis/pull/446



Modified: trunk/libpgcommon/Makefile.in
===================================================================
--- trunk/libpgcommon/Makefile.in	2019-07-16 08:58:40 UTC (rev 17608)
+++ trunk/libpgcommon/Makefile.in	2019-07-16 08:58:59 UTC (rev 17609)
@@ -58,7 +58,7 @@
 
 # Command to build each of the .o files
 $(SA_OBJS): %.o: %.c
-	$(CC) $(CFLAGS) -c -o $@ $<
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
 
 $(SA_OBJS): ../postgis_config.h
 

Modified: trunk/loader/Makefile.in
===================================================================
--- trunk/loader/Makefile.in	2019-07-16 08:58:40 UTC (rev 17608)
+++ trunk/loader/Makefile.in	2019-07-16 08:58:59 UTC (rev 17609)
@@ -88,13 +88,13 @@
 	$(MAKE) -C ../liblwgeom
 
 shp2pgsql-core.o: shp2pgsql-core.c shp2pgsql-core.h shpcommon.h
-	$(CC) $(CFLAGS) -c $<
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
 
 pgsql2shp-core.o: pgsql2shp-core.c pgsql2shp-core.h shpcommon.h
-	$(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $<
+	$(CC) $(CPPFLAGS) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $<
 
 pgsql2shp-cli.o: pgsql2shp-cli.c pgsql2shp-core.h shpcommon.h
-	$(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $<
+	$(CC) $(CPPFLAGS) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $<
 
 $(PGSQL2SHP-CLI): $(SHPLIB_OBJS) pgsql2shp-core.o pgsql2shp-cli.o $(LIBLWGEOM)
 	$(LIBTOOL) --mode=link \
@@ -105,7 +105,7 @@
 	  $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(GETTEXT_LDFLAGS) $(ICONV_LDFLAGS)
 
 shp2pgsql-gui.o: shp2pgsql-gui.c shp2pgsql-core.h shpcommon.h
-	$(CC) $(CFLAGS) $(GTK_CFLAGS) $(PGSQL_FE_CPPFLAGS) -o $@ -c shp2pgsql-gui.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) $(GTK_CFLAGS) $(PGSQL_FE_CPPFLAGS) -o $@ -c shp2pgsql-gui.c
 
 $(SHP2PGSQL-GUI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-gui.o pgsql2shp-core.o $(LIBLWGEOM) $(GTK_WIN32_RES)
 	$(LIBTOOL) --mode=link \

Modified: trunk/raster/loader/Makefile.in
===================================================================
--- trunk/raster/loader/Makefile.in	2019-07-16 08:58:40 UTC (rev 17608)
+++ trunk/raster/loader/Makefile.in	2019-07-16 08:58:59 UTC (rev 17609)
@@ -79,7 +79,7 @@
 all: $(RASTER2PGSQL)
 
 raster2pgsql.o: raster2pgsql.c
-	$(CC) $(CFLAGS) -c $<
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
 
 $(RASTER2PGSQL): $(RT_CORE)/librtcore.a raster2pgsql.o
 	$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@



More information about the postgis-tickets mailing list