From 342411ed98097798d692ec5a2ed7d81fb7d9c8e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ra=C3=BAl=20Mar=C3=ADn=20Rodr=C3=ADguez?= Date: Tue, 16 Jul 2019 08:58:20 +0000 Subject: [PATCH] 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 git-svn-id: http://svn.osgeo.org/postgis/branches/2.4@17607 b70326c6-7e19-0410-871a-916f4a2858ee --- libpgcommon/Makefile.in | 4 ++-- loader/Makefile.in | 8 ++++---- raster/loader/Makefile.in | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libpgcommon/Makefile.in b/libpgcommon/Makefile.in index da368cc85..72b0b37c6 100644 --- a/libpgcommon/Makefile.in +++ b/libpgcommon/Makefile.in @@ -57,8 +57,8 @@ check: libpgcommon.a $(MAKE) -C cunit check # Command to build each of the .o files -$(SA_OBJS): %.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< +$(SA_OBJS): %.o: %.c + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< $(SA_OBJS): ../postgis_config.h diff --git a/loader/Makefile.in b/loader/Makefile.in index 830db51c8..f20670e3f 100644 --- a/loader/Makefile.in +++ b/loader/Makefile.in @@ -87,13 +87,13 @@ $(LIBLWGEOM): $(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 \ @@ -104,7 +104,7 @@ $(SHP2PGSQL-CLI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-cli.o $(LIBLWGEOM) $(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 \ diff --git a/raster/loader/Makefile.in b/raster/loader/Makefile.in index f7353dbe6..21d9f128a 100644 --- a/raster/loader/Makefile.in +++ b/raster/loader/Makefile.in @@ -79,7 +79,7 @@ LDFLAGS = \ 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 $@ -- 2.40.0