diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-03-26 22:05:21 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-03-26 22:05:21 +0000 |
commit | 1053bcd3c1bf402654645f34252db51a781b5af2 (patch) | |
tree | 4e9c153e2b2051f920eef1790c7f0dfc00adccfa /Makefile | |
parent | 34508fc3cdd73ddb7a9532e434af4a561404507f (diff) | |
download | netsurf-1053bcd3c1bf402654645f34252db51a781b5af2.tar.gz netsurf-1053bcd3c1bf402654645f34252db51a781b5af2.tar.bz2 |
Makefile: Add STMTEXPR detection for wapcaplet
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -600,6 +600,13 @@ CXXFLAGS += -DNETSURF_BUILTIN_LOG_FILTER=\"$(NETSURF_BUILTIN_LOG_FILTER)\" CFLAGS += -DNETSURF_BUILTIN_VERBOSE_FILTER=\"$(NETSURF_BUILTIN_VERBOSE_FILTER)\" CXXFLAGS += -DNETSURF_BUILTIN_VERBOSE_FILTER=\"$(NETSURF_BUILTIN_VERBOSE_FILTER)\" +# Determine if the C compiler supports statement expressions +# This is needed to permit certain optimisations in our library headers +ifneq ($(shell $(CC) -dM -E - < /dev/null | grep __GNUC__),) +CFLAGS += -DSTMTEXPR=1 +CXXFLAGS += -DSTMTEXPR=1 +endif + # ---------------------------------------------------------------------------- # General make rules # ---------------------------------------------------------------------------- |