diff --git a/arch/x86/core/nanofatal.c b/arch/x86/core/nanofatal.c index f276d21cd93..81b181a85b1 100644 --- a/arch/x86/core/nanofatal.c +++ b/arch/x86/core/nanofatal.c @@ -36,12 +36,6 @@ This module provides the _NanoFatalErrorHandler() routine. */ /* includes */ - -/* Stack canaries not supported on Diab */ -#ifdef __DCC__ -#undef CONFIG_STACK_CANARIES -#endif - #include #include diff --git a/include/nanokernel.h b/include/nanokernel.h index 83c19f8e350..b390ec0ac6f 100644 --- a/include/nanokernel.h +++ b/include/nanokernel.h @@ -34,9 +34,7 @@ #define __NANOKERNEL_H__ #include -#ifdef __DCC__ -#undef CONFIG_STACK_CANARIES -#endif +#include /* compiler specific configuration options */ #include #include diff --git a/include/toolchain.h b/include/toolchain.h index cbfdd0c259a..d264adac05b 100644 --- a/include/toolchain.h +++ b/include/toolchain.h @@ -41,12 +41,10 @@ utilize toolchain specific attributes and/or pragmas. #ifndef _TOOLCHAIN_H #define _TOOLCHAIN_H -#if defined(__GNUC__) +#if defined(__GNUC__) || (defined(_LINKER) && defined(__GCC_LINKER_CMD__)) #include -#elif defined(__DCC__) -#include #else -#include +#include #endif #endif /* _TOOLCHAIN_H */ diff --git a/include/toolchain/gcc.h b/include/toolchain/gcc.h index 1d8eaee7396..47ee6ea02a0 100644 --- a/include/toolchain/gcc.h +++ b/include/toolchain/gcc.h @@ -46,18 +46,6 @@ #define FUNC_CONSTRUCT(lvl) __attribute__((constructor(lvl))) -/* - * The Intel C Compiler defines both __INTEL_COMPILER and __GNUC__; the - * GNU C Compiler defines only __GNUC__. Consequently, to differentiate - * between those two compilers, checks for __INTEL_COMPILER must be done - * before __GNUC__. - */ - -#if defined (__INTEL_COMPILER) -#define CODE_UNREACHABLE -#define FUNC_NORETURN -#define _NODATA_SECTION(segment) __attribute__((section(#segment))) -#else #define CODE_UNREACHABLE __builtin_unreachable () #define FUNC_NORETURN __attribute__((__noreturn__)) @@ -70,7 +58,6 @@ #define _NODATA_SECTION(segment) \ __attribute__((section(#segment ",\"wa\",@nobits#"))) #endif -#endif /* * Unaligned reads and writes diff --git a/include/toolchain/unsupported.h b/include/toolchain/unsupported.h deleted file mode 100644 index 82afc07f764..00000000000 --- a/include/toolchain/unsupported.h +++ /dev/null @@ -1,68 +0,0 @@ -/* toolchain/unsupported.h - unsupported toolchain abstraction */ - -/* - * Copyright (c) 2010-2014 Wind River Systems, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2) Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3) Neither the name of Wind River Systems nor the names of its contributors - * may be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* -DESCRIPTION -Macros to abstract compiler capabilities for unsupported toolchains - -\NOMANUAL -*/ - -#define FUNC_ALIAS(func, aliasToFunc, retType) \ - #error FUNC_ALIAS(): unsupported toolchain - -#define FUNC_CONSTRUCT(lvl) #error FUNC_CONSTRUCT() : unsupported toolchain - -/* - * Do nothing if not using a supported compiler. The end result will - * simply not be as memory efficient as it could be. - */ -#define CODE_UNREACHABLE - -#define FUNC_NORETURN #warning FUNC_NORETURN : unsupported toolchain - -#define _NODATA_SECTION(segment) __attribute__((section(#segment))) -#define _GENERIC_SECTION(segment) __attribute__((section(#segment))) - -#define PACK_STRUCT #error PACK_STRUCT : unsupported toolchain - -#define ALIGN_STRUCT(x) #error ALIGN_STRUCT() : unsupported toolchain - -/* - * Do nothing if not using a supported compiler. - */ -#define ARG_UNUSED(x) - -#define likely(x) (x) -#define unlikely(x) (x) - -#define REQUIRES(sym) #error REQUIRES() : unsupported toolchain diff --git a/kernel/nanokernel/compiler_stack_protect.c b/kernel/nanokernel/compiler_stack_protect.c index 62dfcdbaab0..0935c5e2dd1 100644 --- a/kernel/nanokernel/compiler_stack_protect.c +++ b/kernel/nanokernel/compiler_stack_protect.c @@ -41,11 +41,7 @@ function __stack_chk_fail and global variable __stack_chk_guard. */ /* includes */ - -/* Stack canaries not supported on Diab */ -#ifdef __DCC__ -#undef CONFIG_STACK_CANARIES -#endif +#include /* compiler specific configurations */ #if defined(CONFIG_STACK_CANARIES)