From 615a33c8f9e03db07cd596b57129ab47baee5bc1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 9 Mar 2010 17:40:36 +0200 Subject: Check for g++ with support for plugins --- build/bootstrap.make | 25 ++++++++++++++++--------- odb/makefile | 2 +- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/build/bootstrap.make b/build/bootstrap.make index 8522153..3078be4 100644 --- a/build/bootstrap.make +++ b/build/bootstrap.make @@ -43,18 +43,25 @@ cleandoc: $(out_base)/.cleandoc endif -# If we don't have dependency auto-generation then we need to manually -# make sure that C++ header files are compiled before C++ source files. -# To do this we make the object files ($2) depend in order-only on -# generated files ($3). +ifdef cxx_id + +# It would be better to do these checks in the script once instead +# of for every makefile. # -ifeq ($(cxx_id),generic) +ifneq ($(MAKECMDGOALS),disfigure) -define include-dep -$(if $2,$(eval $2: | $3)) -endef +ifneq ($(cxx_id),gnu) +$(error only GNU g++ can be used to build the ODB compiler) +endif -else +$(call include,$(bld_root)/cxx/gnu/configuration.make) + +ifdef cxx_gnu +ifeq ($(shell $(cxx_gnu) -print-file-name=plugin),plugin) +$(error $(cxx_gnu) does not support plugins) +endif +endif +endif # disfigure define include-dep $(call -include,$1) diff --git a/odb/makefile b/odb/makefile index c0c0888..031df62 100644 --- a/odb/makefile +++ b/odb/makefile @@ -83,7 +83,7 @@ $(call include,$(bld_root)/cxx/o-e.make) # Custom rules for the plugin. # -ifdef cxx_id +ifdef cxx_gnu $(cxx_pobj): cxx_pic_options := -fPIC -- cgit v1.1