diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 15:25:44 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 15:25:44 +0200 |
commit | 8286ac511144e4f17d34eac9affb97e50646344a (patch) | |
tree | f1af7320d7b6be6be059216d0ad08ac7b4f73fd0 /build-0.3/cxx | |
parent | a15cf65c44d5c224169c32ef5495b68c758134b7 (diff) |
Imported Upstream version 4.0.0upstream/4.0.0
Diffstat (limited to 'build-0.3/cxx')
35 files changed, 173 insertions, 85 deletions
diff --git a/build-0.3/cxx/configuration-rules.make b/build-0.3/cxx/configuration-rules.make index 354791e..70fce9d 100644 --- a/build-0.3/cxx/configuration-rules.make +++ b/build-0.3/cxx/configuration-rules.make @@ -1,6 +1,5 @@ # file : build/cxx/configuration-rules.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(dcf_root)/cxx/configuration-dynamic.make: | $(dcf_root)/cxx/. @@ -12,7 +11,7 @@ $(dcf_root)/cxx/configuration-dynamic.make: | $(dcf_root)/cxx/. ifndef %foreign% -disfigure:: +$(dcf_root)/.disfigure:: $(call message,rm $(dcf_root)/cxx/configuration-dynamic.make,\ rm -f $(dcf_root)/cxx/configuration-dynamic.make) diff --git a/build-0.3/cxx/configuration-static.make b/build-0.3/cxx/configuration-static.make index b1339bf..d6c0731 100644 --- a/build-0.3/cxx/configuration-static.make +++ b/build-0.3/cxx/configuration-static.make @@ -1,6 +1,5 @@ # file : build/cxx/configuration-static.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file cxx_h_suffix := hxx diff --git a/build-0.3/cxx/configuration.make b/build-0.3/cxx/configuration.make index 5ad97ae..4529f62 100644 --- a/build-0.3/cxx/configuration.make +++ b/build-0.3/cxx/configuration.make @@ -1,6 +1,5 @@ # file : build/cxx/configuration.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include-once,$(bld_root)/cxx/configuration-rules.make,$(dcf_root)) @@ -32,11 +31,11 @@ $(out_root)/%: cxx_optimize := $(cxx_optimize) $(out_root)/%: cxx_debug := $(cxx_debug) $(out_root)/%: cxx_rpath := $(cxx_rpath) -$(out_root)/%: cxx_pp_extra_options := $(cxx_pp_extra_options) -$(out_root)/%: cxx_extra_options := $(cxx_extra_options) -$(out_root)/%: cxx_ld_extra_options := $(cxx_ld_extra_options) -$(out_root)/%: cxx_extra_libs := $(cxx_extra_libs) -$(out_root)/%: cxx_extra_lib_paths := $(cxx_extra_lib_paths) +$(out_root)/%: cxx_pp_extra_options := $(cxx_pp_extra_options) $(cxx_pp_cmd_options) +$(out_root)/%: cxx_extra_options := $(cxx_extra_options) $(cxx_cmd_options) +$(out_root)/%: cxx_ld_extra_options := $(cxx_ld_extra_options) $(cxx_ld_cmd_options) +$(out_root)/%: cxx_extra_libs := $(cxx_extra_libs) $(cxx_cmd_libs) +$(out_root)/%: cxx_extra_lib_paths := $(cxx_extra_lib_paths) $(cxx_cmd_lib_paths) else diff --git a/build-0.3/cxx/configure b/build-0.3/cxx/configure index 033424b..f4607ad 100755 --- a/build-0.3/cxx/configure +++ b/build-0.3/cxx/configure @@ -1,8 +1,7 @@ #! /usr/bin/env bash # file : build/cxx/configure -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file # $1 out file diff --git a/build-0.3/cxx/cxx-d.make b/build-0.3/cxx/cxx-d.make index 34b80c9..673b2d1 100644 --- a/build-0.3/cxx/cxx-d.make +++ b/build-0.3/cxx/cxx-d.make @@ -1,6 +1,5 @@ # file : build/cxx/cxx-d.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include,$(bld_root)/cxx/configuration.make) diff --git a/build-0.3/cxx/cxx-o.make b/build-0.3/cxx/cxx-o.make index e01067f..a08b371 100644 --- a/build-0.3/cxx/cxx-o.make +++ b/build-0.3/cxx/cxx-o.make @@ -1,6 +1,5 @@ # file : build/cxx/cxx-o.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include,$(bld_root)/cxx/configuration.make) diff --git a/build-0.3/cxx/generic/configuration-rules.make b/build-0.3/cxx/generic/configuration-rules.make index bb4fe67..2025cfc 100644 --- a/build-0.3/cxx/generic/configuration-rules.make +++ b/build-0.3/cxx/generic/configuration-rules.make @@ -1,6 +1,5 @@ # file : build/cxx/generic/configuration-rules.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(dcf_root)/cxx/generic/configuration-dynamic.make: | $(dcf_root)/cxx/generic/. @@ -8,7 +7,7 @@ $(dcf_root)/cxx/generic/configuration-dynamic.make: | $(dcf_root)/cxx/generic/. ifndef %foreign% -disfigure:: +$(dcf_root)/.disfigure:: $(call message,rm $(dcf_root)/cxx/generic/configuration-dynamic.make,\ rm -f $(dcf_root)/cxx/generic/configuration-dynamic.make) diff --git a/build-0.3/cxx/generic/configuration-sl-rules.make b/build-0.3/cxx/generic/configuration-sl-rules.make index cbcf160..3630d26 100644 --- a/build-0.3/cxx/generic/configuration-sl-rules.make +++ b/build-0.3/cxx/generic/configuration-sl-rules.make @@ -1,6 +1,5 @@ # file : build/cxx/generic/configuration-sl-rules.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(dcf_root)/cxx/generic/configuration-sl-dynamic.make: | $(dcf_root)/cxx/generic/. @@ -8,7 +7,7 @@ $(dcf_root)/cxx/generic/configuration-sl-dynamic.make: | $(dcf_root)/cxx/generic ifndef %foreign% -disfigure:: +$(dcf_root)/.disfigure:: $(call message,rm $(dcf_root)/cxx/generic/configuration-sl-dynamic.make,\ rm -f $(dcf_root)/cxx/generic/configuration-sl-dynamic.make) diff --git a/build-0.3/cxx/generic/configuration-sl.make b/build-0.3/cxx/generic/configuration-sl.make index 2a5e682..f1b75be 100644 --- a/build-0.3/cxx/generic/configuration-sl.make +++ b/build-0.3/cxx/generic/configuration-sl.make @@ -1,6 +1,5 @@ # file : build/cxx/generic/configuration-sl.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include-once,$(bld_root)/cxx/generic/configuration-sl-rules.make,$(dcf_root)) diff --git a/build-0.3/cxx/generic/configuration.make b/build-0.3/cxx/generic/configuration.make index b57eaaf..1816913 100644 --- a/build-0.3/cxx/generic/configuration.make +++ b/build-0.3/cxx/generic/configuration.make @@ -1,6 +1,5 @@ # file : build/cxx/generic/configuration.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include-once,$(bld_root)/cxx/generic/configuration-rules.make,$(dcf_root)) diff --git a/build-0.3/cxx/generic/configure b/build-0.3/cxx/generic/configure index 48b1b59..b590398 100755 --- a/build-0.3/cxx/generic/configure +++ b/build-0.3/cxx/generic/configure @@ -1,8 +1,7 @@ #! /usr/bin/env bash # file : build/cxx/generic/configure -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file # $1 out file diff --git a/build-0.3/cxx/generic/configure-sl b/build-0.3/cxx/generic/configure-sl index 1c4b8b5..31df8ce 100755 --- a/build-0.3/cxx/generic/configure-sl +++ b/build-0.3/cxx/generic/configure-sl @@ -1,8 +1,7 @@ #! /usr/bin/env bash # file : build/cxx/generic/configure-sl -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file # $1 out file diff --git a/build-0.3/cxx/generic/cxx-d.make b/build-0.3/cxx/generic/cxx-d.make index 53f44b1..4a88451 100644 --- a/build-0.3/cxx/generic/cxx-d.make +++ b/build-0.3/cxx/generic/cxx-d.make @@ -1,6 +1,5 @@ # file : build/cxx/generic/cxx-o.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include,$(bld_root)/cxx/generic/configuration.make) diff --git a/build-0.3/cxx/generic/cxx-o.make b/build-0.3/cxx/generic/cxx-o.make index e88f5c6..3123dca 100644 --- a/build-0.3/cxx/generic/cxx-o.make +++ b/build-0.3/cxx/generic/cxx-o.make @@ -1,6 +1,5 @@ # file : build/cxx/generic/cxx-o.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include-once,$(bld_root)/c/cpp-options.make,$(out_base)) diff --git a/build-0.3/cxx/generic/o-e.make b/build-0.3/cxx/generic/o-e.make index 8170da3..2f9f02e 100644 --- a/build-0.3/cxx/generic/o-e.make +++ b/build-0.3/cxx/generic/o-e.make @@ -1,6 +1,5 @@ # file : build/cxx/generic/o-e.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include,$(bld_root)/cxx/generic/configuration.make) diff --git a/build-0.3/cxx/generic/o-l.make b/build-0.3/cxx/generic/o-l.make index 5b29855..1e7dcff 100644 --- a/build-0.3/cxx/generic/o-l.make +++ b/build-0.3/cxx/generic/o-l.make @@ -1,6 +1,5 @@ # file : build/cxx/generic/o-l.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include,$(bld_root)/cxx/generic/configuration.make) diff --git a/build-0.3/cxx/gnu/configuration-rules.make b/build-0.3/cxx/gnu/configuration-rules.make index 7598be9..6d79582 100644 --- a/build-0.3/cxx/gnu/configuration-rules.make +++ b/build-0.3/cxx/gnu/configuration-rules.make @@ -1,14 +1,14 @@ # file : build/cxx/gnu/configuration-rules.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(dcf_root)/cxx/gnu/configuration-dynamic.make: | $(dcf_root)/cxx/gnu/. - $(call message,,$(bld_root)/cxx/gnu/configure $@ $(cxx_optimize)) + $(call message,,$(bld_root)/cxx/gnu/configure $@ $(cxx_optimize) \ +"$(cxx_extra_options)" "$(cxx_ld_extra_options)") ifndef %foreign% -disfigure:: +$(dcf_root)/.disfigure:: $(call message,rm $(dcf_root)/cxx/gnu/configuration-dynamic.make,\ rm -f $(dcf_root)/cxx/gnu/configuration-dynamic.make) diff --git a/build-0.3/cxx/gnu/configuration-static.make b/build-0.3/cxx/gnu/configuration-static.make index 9a2521a..d0aee7d 100644 --- a/build-0.3/cxx/gnu/configuration-static.make +++ b/build-0.3/cxx/gnu/configuration-static.make @@ -1,4 +1,3 @@ # file : build/cxx/gnu/configuration-static.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file diff --git a/build-0.3/cxx/gnu/configuration.make b/build-0.3/cxx/gnu/configuration.make index 57e00e9..2e55f8b 100644 --- a/build-0.3/cxx/gnu/configuration.make +++ b/build-0.3/cxx/gnu/configuration.make @@ -1,6 +1,5 @@ # file : build/cxx/gnu/configuration.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include-once,$(bld_root)/cxx/gnu/configuration-rules.make,$(dcf_root)) diff --git a/build-0.3/cxx/gnu/configure b/build-0.3/cxx/gnu/configure index b9c6ef6..c551713 100755 --- a/build-0.3/cxx/gnu/configure +++ b/build-0.3/cxx/gnu/configure @@ -1,12 +1,13 @@ #! /usr/bin/env bash # file : build/cxx/gnu/configure -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file # $1 out file # $2 optimize (y/n) +# $3 cxx_extra_options +# $4 cxx_ld_extra_options # # bld_root - build root # project_name - project name @@ -27,8 +28,44 @@ $echo "'/usr/local/bin/g++' or 'distcc g++'." $echo cxx_gnu=`read_path --command g++` -cxx_gnu_libraries=`$cxx_gnu -print-search-dirs | sed -e 's/libraries: =//p' -e d` +# Determine the C++ standard. +# +cxx_gnu_standard=`echo "$3" | sed -e 's/.*-std=\([^ ]*\).*/\1/' -e t -e d` + +if [ -z "$cxx_gnu_standard" ]; then + cxx_gnu_standard="gnu++98" +elif [ "$cxx_gnu_standard" = "c++0x" ]; then + cxx_gnu_standard="c++11" +elif [ "$cxx_gnu_standard" = "gnu++0x" ]; then + cxx_gnu_standard="gnu++11" +fi + +# Pass cxx_extra_options and cxx_ld_extra_options since those +# can affect the search paths (e.g., -m32) and target. +# +cxx_gnu_libraries=`$cxx_gnu $3 $4 -print-search-dirs | sed -e 's/libraries: =//p' -e d` + +cxx_gnu_target=`$cxx_gnu $3 $4 -dumpmachine` +cxx_gnu_target=`$bld_root/system/config.sub "$cxx_gnu_target"` + +if [ $? != 0 ]; then + $echo "unable to canonicalize target system '$cxx_gnu_target'" + exit 1 +fi + +cxx_gnu_target_cpu=`echo $cxx_gnu_target | cut -f 1 -d -` +cxx_gnu_target_mf=`echo $cxx_gnu_target | cut -f 2 -d -` +cxx_gnu_target_kernel=`echo $cxx_gnu_target | cut -f 3 -d -` +cxx_gnu_target_os=`echo $cxx_gnu_target | cut -f 4 -d -` + +if [ -z "$cxx_gnu_target_os" ]; then + + # Old format: cpu-mf-os + # + cxx_gnu_target_os=$cxx_gnu_target_kernel + cxx_gnu_target_kernel= +fi optimization= @@ -50,6 +87,12 @@ if [ "$2" == "y" ]; then fi -echo "cxx_gnu := $cxx_gnu" > $1 -echo "cxx_gnu_libraries := $cxx_gnu_libraries" >> $1 -echo "cxx_gnu_optimization_options := $optimization" >> $1 +echo "cxx_gnu := $cxx_gnu" > $1 +echo "cxx_gnu_standard := $cxx_gnu_standard" >> $1 +echo "cxx_gnu_libraries := $cxx_gnu_libraries" >> $1 +echo "cxx_gnu_optimization_options := $optimization" >> $1 +echo "cxx_gnu_target := $cxx_gnu_target" >> $1 +echo "cxx_gnu_target_cpu := $cxx_gnu_target_cpu" >> $1 +echo "cxx_gnu_target_mf := $cxx_gnu_target_mf" >> $1 +echo "cxx_gnu_target_kernel := $cxx_gnu_target_kernel" >> $1 +echo "cxx_gnu_target_os := $cxx_gnu_target_os" >> $1 diff --git a/build-0.3/cxx/gnu/cxx-d.make b/build-0.3/cxx/gnu/cxx-d.make index 642a846..6611e67 100644 --- a/build-0.3/cxx/gnu/cxx-d.make +++ b/build-0.3/cxx/gnu/cxx-d.make @@ -1,6 +1,5 @@ # file : build/cxx/gnu/cxx-o.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include-once,$(bld_root)/c/cpp-options.make,$(out_base)) diff --git a/build-0.3/cxx/gnu/cxx-o.make b/build-0.3/cxx/gnu/cxx-o.make index 0320177..0b751ad 100644 --- a/build-0.3/cxx/gnu/cxx-o.make +++ b/build-0.3/cxx/gnu/cxx-o.make @@ -1,6 +1,5 @@ # file : build/cxx/gnu/cxx-o.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include-once,$(bld_root)/c/cpp-options.make,$(out_base)) diff --git a/build-0.3/cxx/gnu/o-e.make b/build-0.3/cxx/gnu/o-e.make index 8c233bd..c19e177 100644 --- a/build-0.3/cxx/gnu/o-e.make +++ b/build-0.3/cxx/gnu/o-e.make @@ -1,6 +1,5 @@ # file : build/cxx/gnu/o-e.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include,$(bld_root)/cxx/gnu/configuration.make) diff --git a/build-0.3/cxx/gnu/o-l.make b/build-0.3/cxx/gnu/o-l.make index e378a4d..ea3e1d1 100644 --- a/build-0.3/cxx/gnu/o-l.make +++ b/build-0.3/cxx/gnu/o-l.make @@ -1,6 +1,5 @@ # file : build/cxx/gnu/o-l.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include,$(bld_root)/cxx/gnu/configuration.make) @@ -42,10 +41,14 @@ $(out_base)/%.l.o.clean: else +mingw := $(if $(filter $(cxx_gnu_target_os),mingw32 mingw64),y,n) + $(out_base)/%.l: ld := $(cxx_gnu) $(out_base)/%.l: ld_options := $(cxx_gnu_optimization_options) $(cxx_gnu_debugging_options) +ifeq ($(mingw),n) $(out_base)/%.l: c_pic_options := -fPIC $(out_base)/%.l: cxx_pic_options := -fPIC +endif $(out_base)/%.l: comma_ := , $(out_base)/%.l: expand-l = $(if $(subst n,,$(cxx_rpath)),\ @@ -57,6 +60,9 @@ $(out_base)/%.l: else $(out_base)/%.l: | $$(dir $$@). endif +ifeq ($(mingw),n) +# Standard version. +# $(call message,ld $@,$(ld) -shared \ $(cxx_extra_options) $(ld_options) $(cxx_ld_extra_options) \ -o $(@D)/lib$(basename $(@F)).so -Wl$(comma_)-soname=lib$(basename $(@F)).so \ @@ -64,9 +70,24 @@ $(foreach f,$^,$(if $(patsubst %.l,,$f),$f,$(call expand-l,$f))) $(cxx_extra_lib $(call message,,echo "$(@D)/lib$(basename $(@F)).so" >$@) $(call message,,echo "rpath:$(@D)" >>$@) $(call message,,echo "$(patsubst %.l,`cat %.l`,$(filter %.a %.so %.l,$^))" | xargs -n 1 echo >>$@) +else +# MinGW version. +# + $(call message,ld $@,$(ld) -shared \ +$(cxx_extra_options) $(ld_options) $(cxx_ld_extra_options) \ +-o $(@D)/$(basename $(@F)).dll -Wl$(comma_)--out-implib$(comma_)$(@D)/lib$(basename $(@F)).a \ +$(foreach f,$^,$(if $(patsubst %.l,,$f),$f,$(call expand-l,$f))) $(cxx_extra_libs)) + $(call message,,echo "$(@D)/lib$(basename $(@F)).a" >$@) + $(call message,,echo "rpath:$(@D)" >>$@) + $(call message,,echo "$(patsubst %.l,`cat %.l`,$(filter %.a %.l,$^))" | xargs -n 1 echo >>$@) +endif $(out_base)/%.l.o.clean: +ifeq ($(mingw),n) $(call message,rm $$1,rm -f $$1 $(@D)/$(patsubst %.l.o.clean,lib%.so,$(@F)),$(basename $(basename $@))) +else + $(call message,rm $$1,rm -f $$1 $(@D)/$(patsubst %.l.o.clean,%.dll,$(@F)) $(@D)/$(patsubst %.l.o.clean,lib%.a,$(@F)),$(basename $(basename $@))) +endif endif endif diff --git a/build-0.3/cxx/intel/configuration-rules.make b/build-0.3/cxx/intel/configuration-rules.make index 577f2f7..873e08e 100644 --- a/build-0.3/cxx/intel/configuration-rules.make +++ b/build-0.3/cxx/intel/configuration-rules.make @@ -1,14 +1,14 @@ # file : build/cxx/intel/configuration-rules.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(dcf_root)/cxx/intel/configuration-dynamic.make: | $(dcf_root)/cxx/intel/. - $(call message,,$(bld_root)/cxx/intel/configure $@ $(cxx_optimize)) + $(call message,,$(bld_root)/cxx/intel/configure $@ $(cxx_optimize) \ +"$(cxx_extra_options)" "$(cxx_ld_extra_options)") ifndef %foreign% -disfigure:: +$(dcf_root)/.disfigure:: $(call message,rm $(dcf_root)/cxx/intel/configuration-dynamic.make,\ rm -f $(dcf_root)/cxx/intel/configuration-dynamic.make) diff --git a/build-0.3/cxx/intel/configuration-static.make b/build-0.3/cxx/intel/configuration-static.make index e619365..1db64f0 100644 --- a/build-0.3/cxx/intel/configuration-static.make +++ b/build-0.3/cxx/intel/configuration-static.make @@ -1,4 +1,3 @@ # file : build/cxx/intel/configuration-static.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file diff --git a/build-0.3/cxx/intel/configuration.make b/build-0.3/cxx/intel/configuration.make index eade065..c6e6867 100644 --- a/build-0.3/cxx/intel/configuration.make +++ b/build-0.3/cxx/intel/configuration.make @@ -1,6 +1,5 @@ # file : build/cxx/intel/configuration.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include-once,$(bld_root)/cxx/intel/configuration-rules.make,$(dcf_root)) diff --git a/build-0.3/cxx/intel/configure b/build-0.3/cxx/intel/configure index ef250cf..7f79dd8 100755 --- a/build-0.3/cxx/intel/configure +++ b/build-0.3/cxx/intel/configure @@ -1,12 +1,13 @@ #! /usr/bin/env bash # file : build/cxx/intel/configure -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file # $1 out file # $2 optimize (y/n) +# $3 cxx_extra_options +# $4 cxx_ld_extra_options # # bld_root - build root # project_name - project name @@ -27,7 +28,24 @@ $echo "'/opt/intel_cc_80/bin/icpc'." $echo cxx_intel=`read_path --command icpc` -cxx_intel_libraries=`$cxx_intel -print-search-dirs | sed -e 's/libraries: =//p' -e d` + +# Determine the C++ standard. Intel C++ on GNU/Linux appears to use the +# same option and values as GCC. +# +cxx_intel_standard=`echo "$3" | sed -e 's/.*-std=\([^ ]*\).*/\1/' -e t -e d` + +if [ -z "$cxx_intel_standard" ]; then + cxx_intel_standard="gnu++98" +elif [ "$cxx_intel_standard" = "c++0x" ]; then + cxx_intel_standard="c++11" +elif [ "$cxx_intel_standard" = "gnu++0x" ]; then + cxx_intel_standard="gnu++11" +fi + +# Pass cxx_extra_options and cxx_ld_extra_options since those +# can affect the search paths (e.g., -m32). +# +cxx_intel_libraries=`$cxx_intel $3 $4 -print-search-dirs | sed -e 's/libraries: =//p' -e d` # Intel optimizes by default. # diff --git a/build-0.3/cxx/intel/cxx-d.make b/build-0.3/cxx/intel/cxx-d.make index cd7b567..7c4bba2 100644 --- a/build-0.3/cxx/intel/cxx-d.make +++ b/build-0.3/cxx/intel/cxx-d.make @@ -1,6 +1,5 @@ # file : build/cxx/intel/cxx-o.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include-once,$(bld_root)/c/cpp-options.make,$(out_base)) diff --git a/build-0.3/cxx/intel/cxx-o.make b/build-0.3/cxx/intel/cxx-o.make index c64e2c8..db34a85 100644 --- a/build-0.3/cxx/intel/cxx-o.make +++ b/build-0.3/cxx/intel/cxx-o.make @@ -1,6 +1,5 @@ # file : build/cxx/intel/cxx-o.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include-once,$(bld_root)/c/cpp-options.make,$(out_base)) diff --git a/build-0.3/cxx/intel/o-e.make b/build-0.3/cxx/intel/o-e.make index c92173a..5c11854 100644 --- a/build-0.3/cxx/intel/o-e.make +++ b/build-0.3/cxx/intel/o-e.make @@ -1,6 +1,5 @@ # file : build/cxx/intel/o-e.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include,$(bld_root)/cxx/intel/configuration.make) diff --git a/build-0.3/cxx/intel/o-l.make b/build-0.3/cxx/intel/o-l.make index 76f8cff..0123687 100644 --- a/build-0.3/cxx/intel/o-l.make +++ b/build-0.3/cxx/intel/o-l.make @@ -1,6 +1,5 @@ # file : build/cxx/intel/o-l.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include,$(bld_root)/cxx/intel/configuration.make) diff --git a/build-0.3/cxx/o-e.make b/build-0.3/cxx/o-e.make index 55486b3..47a7048 100644 --- a/build-0.3/cxx/o-e.make +++ b/build-0.3/cxx/o-e.make @@ -1,6 +1,5 @@ # file : build/cxx/o-e.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include,$(bld_root)/cxx/configuration.make) diff --git a/build-0.3/cxx/o-l.make b/build-0.3/cxx/o-l.make index 5eb04d4..999833b 100644 --- a/build-0.3/cxx/o-l.make +++ b/build-0.3/cxx/o-l.make @@ -1,6 +1,5 @@ # file : build/cxx/o-l.make -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file $(call include,$(bld_root)/ld/configuration-lib.make) diff --git a/build-0.3/cxx/standard.make b/build-0.3/cxx/standard.make new file mode 100644 index 0000000..64343d2 --- /dev/null +++ b/build-0.3/cxx/standard.make @@ -0,0 +1,35 @@ +# file : build/cxx/standard.make +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +# Set the cxx_standard variable to either c++98 or c++11. +# +$(call include,$(bld_root)/cxx/configuration.make) # cxx_id + +cxx_standard := + +ifdef cxx_id + $(call include,$(bld_root)/cxx/$(cxx_id)/configuration.make) # cxx_*_standard + ifeq ($(cxx_id),gnu) + ifdef cxx_gnu + ifneq ($(filter $(cxx_gnu_standard),c++11 gnu++11),) + cxx_standard := c++11 + else + cxx_standard := c++98 + endif + endif + else ifeq ($(cxx_id),intel) + ifdef cxx_intel + ifneq ($(filter $(cxx_intel_standard),c++11 gnu++11),) + cxx_standard := c++11 + else + cxx_standard := c++98 + endif + endif + else ifeq ($(cxx_id),generic) + cxx_standard := c++98 + else + $(error unknown C++ compiler $(cxx_id)) + endif + $(out_root)/%: cxx_standard := $(cxx_standard) +endif |