diff options
Diffstat (limited to 'include/makeinclude/platform_netbsd.GNU')
-rw-r--r-- | include/makeinclude/platform_netbsd.GNU | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/makeinclude/platform_netbsd.GNU b/include/makeinclude/platform_netbsd.GNU index d9e08b01139..9616ce54193 100644 --- a/include/makeinclude/platform_netbsd.GNU +++ b/include/makeinclude/platform_netbsd.GNU @@ -11,6 +11,39 @@ versioned_so = 1 CC = gcc CXX = g++ + +CXX_VERSION := $(shell $(CXX) -dumpversion) + +# If no option has been specified, try to enable implicit_templates based +# on the version of the compiler. +# +ifeq ($(implicit_templates),) + ifeq (2.95,$(findstring 2.95,$(CXX_VERSION))) + implicit_templates = 1 + else + ifeq (3.,$(findstring 3.,$(CXX_VERSION))) + implicit_templates = 1 + endif + ifeq (2.96,$(findstring 2.96,$(CXX_VERSION))) + implicit_templates = 1 + endif + endif +endif + +# User didn't specify and we couldn't guess if this version of the compiler +# works fine with implicit template instantiation. Turn if off. This could +# as well go into the previous check but GNU Make conditionals are lame. +# +ifeq ($(implicit_templates),) + implicit_templates = 0 +endif + +ifeq ($(implicit_templates),0) + ifeq ($(IMPLICIT_TEMPLATES_FLAG),) # Turn on flags if none is speficied. + IMPLICIT_TEMPLATES_FLAG=-fno-implicit-templates + endif +endif + CFLAGS += -w -fno-strict-prototypes CCFLAGS += $(CFLAGS) -fno-implicit-templates DCFLAGS += -g |