1# vi:ft=make 2 3include $(L4DIR)/mk/Makeconf 4 5__NUMBERS := x x x x x x x x x x x x x x x x x x x x 6 7n = $(wordlist 1, $1, $(__NUMBERS)) 8max = $(subst xx,x,$(join $1,$2)) 9min = $(subst xx,x,$(filter xx,$(join $1,$2))) 10gt = $(filter-out $(words $2),$(words $(call max,$1,$2))) 11eq = $(filter $(words $1),$(words $2)) 12gte = $(call gt,$1,$2)$(call eq,$1,$2) 13mul = $(foreach a,$1,$2) 14 15 16__GCCMAJOR = $(wordlist 1, $(GCCMAJORVERSION), $(__NUMBERS)) 17__GCCMINOR = $(wordlist 1, $(GCCMINORVERSION), $(__NUMBERS)) 18__GCCSUBVER= $(wordlist 1, $(GCCSUBVERSION), $(__NUMBERS)) 19 20STDCXX_AVAILABLE_VERSIONS = 4.9 5 6 7 8 9 10 11 21 22ifeq ("$(GCCMAJORVERSION)", "4") 23 ifeq ("$(GCCMINORVERSION)", "9") 24 STDCXX_CONTRIB_VERSION := 4.9 25 endif 26endif 27ifeq ("$(GCCVERSION)", "5") 28 STDCXX_CONTRIB_VERSION := 5 29endif 30ifeq ("$(GCCVERSION)", "6") 31 STDCXX_CONTRIB_VERSION := 6 32endif 33ifeq ("$(GCCVERSION)", "7") 34 STDCXX_CONTRIB_VERSION := 7 35 STDCXX_CONTRIB_VERSION_7_PLUS := y 36endif 37ifeq ("$(GCCVERSION)", "8") 38 STDCXX_CONTRIB_VERSION := 8 39 STDCXX_CONTRIB_VERSION_7_PLUS := y 40endif 41ifeq ("$(GCCVERSION)", "9") 42 STDCXX_CONTRIB_VERSION := 9 43 STDCXX_CONTRIB_VERSION_7_PLUS := y 44endif 45ifeq ("$(GCCVERSION)", "10") 46 STDCXX_CONTRIB_VERSION := 10 47 STDCXX_CONTRIB_VERSION_7_PLUS := y 48 STDCXX_CONTRIB_VERSION_10_PLUS := y 49endif 50ifeq ("$(GCCVERSION)", "11") 51 STDCXX_CONTRIB_VERSION := 11 52 STDCXX_CONTRIB_VERSION_7_PLUS := y 53 STDCXX_CONTRIB_VERSION_10_PLUS := y 54endif 55 56STDCXX_CONTRIB_DIR = $(STDCXX_PKG_DIR)/contrib/libstdc++-v3-$(STDCXX_CONTRIB_VERSION) 57DEFINES += -Dlinux 58 59CPU_H_x86 := i386 60CPU_H_ppc32 := powerpc 61CPU_H_arm := arm 62CPU_H_amd64 := i386 63CPU_H_mips := mips 64CPU_H_sparc := sparc 65 66CPU_H_generic := config/cpu/generic 67CPU_H_arch = config/cpu/$(CPU_H_$(BUILD_ARCH)) 68 69CPU_file = $(word 1, $(wildcard $(STDCXX_CONTRIB_DIR)/$(CPU_H_arch)/$(strip $(1)) $(STDCXX_CONTRIB_DIR)/$(CPU_H_generic)/$(strip $(1)))) 70 71#$(info GCC: $(STDCXX_CONTRIB_DIR)) 72 73