]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libstdc++-v3/contrib.inc
update
[l4.git] / l4 / pkg / libstdc++-v3 / contrib.inc
1 # vi:ft=make
2
3 __NUMBERS := x x x x x x x x x x x x x x x x x x x x
4
5 n = $(wordlist 1, $1, $(__NUMBERS))
6 max = $(subst xx,x,$(join $1,$2))
7 min = $(subst xx,x,$(filter xx,$(join $1,$2)))
8 gt = $(filter-out $(words $2),$(words $(call max,$1,$2)))
9 eq = $(filter $(words $1),$(words $2))
10 gte = $(call gt,$1,$2)$(call eq,$1,$2)
11 mul = $(foreach a,$1,$2)
12
13
14 __GCCMAJOR = $(wordlist 1, $(GCCMAJORVERSION), $(__NUMBERS))
15 __GCCMINOR = $(wordlist 1, $(GCCMINORVERSION), $(__NUMBERS))
16 __GCCSUBVER= $(wordlist 1, $(GCCSUBVERSION), $(__NUMBERS))
17
18 SDTCXX_0x = n
19
20 STDCXX_AVAILABLE_VERSIONS = 4.1.0 4.3.3 4.5 4.6
21
22 ifeq ("$(GCCMAJORVERSION)", "4")
23   ifeq ("$(GCCMINORVERSION)", "3")
24     STDCXX_CONTRIB_VERSION := 4.3.3
25   endif
26   ifeq ("$(GCCMINORVERSION)", "4")
27     STDCXX_CONTRIB_VERSION := 4.3.3
28   endif
29   ifeq ("$(GCCMINORVERSION)", "5")
30     STDCXX_CONTRIB_VERSION := 4.5
31     STDCXX_0x = y
32   endif
33   ifeq ("$(GCCMINORVERSION)", "6")
34     STDCXX_CONTRIB_VERSION := 4.6
35     STDCXX_CONTRIB_VERSION_4.6_PLUS := y
36     STDCXX_0x = y
37   endif
38   ifneq ("$(call gte, $(__GCCMINOR), $(call n, 1))", "")
39     STDCXX_CONTRIB_VERSION ?= 4.1.0
40   endif
41 endif
42
43 STDCXX_CONTRIB_DIR = $(STDCXX_PKG_DIR)/contrib/libstdc++-v3-$(STDCXX_CONTRIB_VERSION)
44 DEFINES += -Dlinux
45
46 CPU_H_x86   := i386
47 CPU_H_ppc32 := powerpc
48 CPU_H_arm   := arm
49 CPU_H_amd64 := i386
50 CPU_H_sparc := sparc
51
52 CPU_H_generic := config/cpu/generic
53 CPU_H_arch     = config/cpu/$(CPU_H_$(BUILD_ARCH))
54
55 CPU_file = $(word 1, $(wildcard $(STDCXX_CONTRIB_DIR)/$(CPU_H_arch)/$(strip $(1)) $(STDCXX_CONTRIB_DIR)/$(CPU_H_generic)/$(strip $(1))))
56
57 #$(info GCC: $(STDCXX_CONTRIB_DIR))
58