aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2008-07-25 05:55:47 +0800
committerpav <pav@FreeBSD.org>2008-07-25 05:55:47 +0800
commit12bc8328d6e5d59da99e2051765e71d95fa923e1 (patch)
tree5dd33e77e7330b347c50c325e7f9254646257bca
parent2af15dce573868603de26de44ef0a5c193f8a7c6 (diff)
downloadfreebsd-ports-gnome-12bc8328d6e5d59da99e2051765e71d95fa923e1.tar.gz
freebsd-ports-gnome-12bc8328d6e5d59da99e2051765e71d95fa923e1.tar.zst
freebsd-ports-gnome-12bc8328d6e5d59da99e2051765e71d95fa923e1.zip
- Add an ugly kludge to strip the trailing whitespace from CFLAGS (it comes
this way from outside already). Unless stripped, later CFLAGS+= assignments will produce a double-space in CFLAGS string. Sub-configure will reduce it back to single space and complain that CFLAGS changed underneath it. Most prominent example of a problem solved by this kludge is the -CURRENT, where -fno-strict-aliasing is added to every port's CFLAGS.
-rw-r--r--Mk/bsd.port.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index ed54092c6013..7c1750f0beb2 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1580,6 +1580,10 @@ PLIST_REINPLACE_DIRRMTRY=s!^@dirrmtry \(.*\)!@unexec rmdir %D/\1 2>/dev/null ||
PLIST_REINPLACE_RMTRY=s!^@rmtry \(.*\)!@unexec rm -f %D/\1 2>/dev/null || true!
PLIST_REINPLACE_STOPDAEMON=s!^@stopdaemon \(.*\)!@unexec %D/etc/rc.d/\1${RC_SUBR_SUFFIX} forcestop 2>/dev/null || true!
+# kludge to strip trailing whitespace from CFLAGS;
+# sub-configure will not # survive double space
+CFLAGS:= ${CFLAGS:C/ $//}
+
.if defined(WITHOUT_CPU_CFLAGS)
.if defined(_CPUCFLAGS)
.if !empty(_CPUCFLAGS)