diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2016-04-05 09:36:17 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2016-04-05 09:36:28 +0200 |
commit | 24135ba4d3a4fb388de18e8652beee0d680c8555 (patch) | |
tree | 6c7f20e58fbbbd34233b5cfa21bb7071889c56e5 | |
parent | 1bc1048101b0c648a93b02c515737fa0ce900489 (diff) |
add better gcc language support, allow to build objc/fortran
-rw-r--r-- | target/config/Config.in | 1 | ||||
-rw-r--r-- | target/config/Config.in.cpu | 8 | ||||
-rw-r--r-- | target/config/Config.in.libc | 4 | ||||
-rw-r--r-- | target/config/Config.in.toolchain | 18 | ||||
-rw-r--r-- | toolchain/gcc/Makefile | 15 |
5 files changed, 29 insertions, 17 deletions
diff --git a/target/config/Config.in b/target/config/Config.in index c584b9e55..661077207 100644 --- a/target/config/Config.in +++ b/target/config/Config.in @@ -13,7 +13,6 @@ config ADK_TARGET_GENERIC config ADK_TARGET_UCLINUX bool - select ADK_TARGET_WITHOUT_CXX config ADK_TARGET_SIM bool diff --git a/target/config/Config.in.cpu b/target/config/Config.in.cpu index a73b4b11e..689c9cdc7 100644 --- a/target/config/Config.in.cpu +++ b/target/config/Config.in.cpu @@ -351,7 +351,6 @@ config ADK_TARGET_CPU_FRV bool "fr-v" select ADK_TARGET_WITHOUT_MMU select ADK_TARGET_WITHOUT_THREADS - select ADK_TARGET_WITHOUT_CXX depends on ADK_TARGET_ARCH_FRV # h8/300 @@ -359,7 +358,6 @@ config ADK_TARGET_CPU_H8300 bool "h8/300" select ADK_TARGET_WITHOUT_MMU select ADK_TARGET_WITHOUT_THREADS - select ADK_TARGET_WITHOUT_CXX depends on ADK_TARGET_ARCH_H8300 # hppa @@ -627,7 +625,6 @@ config ADK_TARGET_CPU_METAG config ADK_TARGET_CPU_MICROBLAZE bool "microblaze" select ADK_TARGET_WITHOUT_THREADS if ADK_TARGET_LIB_UCLIBC_NG - select ADK_TARGET_WITHOUT_CXX if ADK_TARGET_LIB_UCLIBC_NG select ADK_TARGET_WITH_MMU if !ADK_LINUX_UCLINUX select ADK_TARGET_WITH_NPTL if ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_MUSL depends on ADK_TARGET_ARCH_MICROBLAZE @@ -710,7 +707,6 @@ config ADK_TARGET_CPU_NDS32 config ADK_TARGET_CPU_NIOS2 bool "nios2" select ADK_TARGET_WITH_LT if ADK_TARGET_LIB_UCLIBC_NG - select ADK_TARGET_WITHOUT_CXX if ADK_TARGET_LIB_UCLIBC_NG select ADK_TARGET_WITH_NPTL if ADK_TARGET_LIB_GLIBC select ADK_TARGET_WITH_MMU select ADK_TARGET_USE_STATIC_LIBS if ADK_TARGET_LIB_UCLIBC_NG @@ -720,7 +716,6 @@ config ADK_TARGET_CPU_NIOS2 config ADK_TARGET_CPU_OR1K bool "or1k" select ADK_TARGET_WITH_LT if ADK_TARGET_LIB_UCLIBC_NG - select ADK_TARGET_WITHOUT_CXX if ADK_TARGET_LIB_UCLIBC_NG select ADK_TARGET_WITH_NPTL if ADK_TARGET_LIB_MUSL select ADK_TARGET_WITH_NPTL if ADK_TARGET_LIB_GLIBC select ADK_TARGET_WITH_MMU @@ -775,14 +770,12 @@ config ADK_TARGET_CPU_SH_SH2 bool "sh2" select ADK_TARGET_WITHOUT_MMU select ADK_TARGET_WITH_LT - select ADK_TARGET_WITHOUT_CXX depends on ADK_TARGET_ARCH_SH config ADK_TARGET_CPU_SH_SH2A bool "sh2a" select ADK_TARGET_WITHOUT_MMU select ADK_TARGET_WITH_LT - select ADK_TARGET_WITHOUT_CXX depends on ADK_TARGET_ARCH_SH config ADK_TARGET_CPU_SH_SH3 @@ -848,7 +841,6 @@ config ADK_TARGET_CPU_V850 bool "v850" select ADK_TARGET_WITHOUT_MMU select ADK_TARGET_WITHOUT_THREADS - select ADK_TARGET_WITHOUT_CXX depends on ADK_TARGET_ARCH_V850 # x86 diff --git a/target/config/Config.in.libc b/target/config/Config.in.libc index 1c7ee6e34..966924e12 100644 --- a/target/config/Config.in.libc +++ b/target/config/Config.in.libc @@ -78,7 +78,6 @@ config ADK_TARGET_LIB_GLIBC config ADK_TARGET_LIB_NEWLIB bool "newlib C library" - select ADK_TARGET_WITHOUT_CXX select ADK_TARGET_WITHOUT_THREADS depends on (\ ADK_TARGET_ARCH_AARCH64 || \ @@ -206,9 +205,6 @@ config ADK_TARGET_WITH_NPTL config ADK_TARGET_WITHOUT_THREADS bool -config ADK_TARGET_WITHOUT_CXX - bool - config ADK_TARGET_LIBC string default "uclibc-ng" if ADK_TARGET_LIB_UCLIBC_NG diff --git a/target/config/Config.in.toolchain b/target/config/Config.in.toolchain index 098648a56..c3b7a5b8e 100644 --- a/target/config/Config.in.toolchain +++ b/target/config/Config.in.toolchain @@ -52,7 +52,25 @@ config ADK_TARGET_CFLAGS_OPT_O0 endchoice +menu "Compiler language support" +config ADK_TOOLCHAIN_WITH_CXX + bool "enable C++" + default y if ADK_TARGET_OS_LINUX + default n + +config ADK_TOOLCHAIN_WITH_OBJC + bool "enable OBJC" + default n + +config ADK_TOOLCHAIN_WITH_FORTRAN + bool "enable Fortran" + default n + +endmenu + menu "Advanced Toolchain options" + + config ADK_TOOLCHAIN_WITH_SSP bool diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 1fe6294ae..2b620bf07 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -189,11 +189,18 @@ ifeq (${ADK_MAKE_PARALLEL},y) GCC_MAKEOPTS+= -j${ADK_MAKE_JOBS} endif -ifeq ($(ADK_TARGET_WITHOUT_CXX),y) -LANGUAGES:=c -else -LANGUAGES:=c,c++ +USE_LANG:=c +ifeq ($(ADK_TOOLCHAIN_WITH_CXX),y) +USE_LANG+=c++ +endif +ifeq ($(ADK_TOOLCHAIN_WITH_OBJC),y) +USE_LANG+=objc endif +ifeq ($(ADK_TOOLCHAIN_WITH_FORTRAN),y) +USE_LANG+=fortran +endif + +LANGUAGES=$(shell echo ${USE_LANG} |tr ' ' ',') include ${ADK_TOPDIR}/mk/buildhlp.mk |