linker: move where we define _LINKER and _ASMLANGUAGE

Move _LINKER and _ASMLANGUAGE to target.cmake because of how we pick the
linker script that might be used.  This way regardless of how or where a
linker.ld gets included we will always set _LINKER & _ASMLANGUAGE (so
any header that needs check based on those defines they can,
specifically generated_dts_board.h)

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-11-01 11:38:36 -05:00 committed by Anas Nashif
commit 00c7ce7942
14 changed files with 2 additions and 38 deletions

View file

@ -41,6 +41,8 @@ macro(configure_linker_script linker_script_gen linker_pass_define)
-x assembler-with-cpp
${NOSYSDEF_CFLAG}
-MD -MF ${linker_script_gen}.dep -MT ${base_name}/${linker_script_gen}
-D_LINKER
-D_ASMLANGUAGE
${current_includes}
${current_defines}
${linker_pass_define}

View file

@ -8,9 +8,6 @@
* @brief Common parts of the linker scripts for the ARCv2/EM targets.
*/
#define _LINKER
#define _ASMLANGUAGE
#include <linker/sections.h>
#if defined(CONFIG_UART_NSIM)

View file

@ -11,9 +11,6 @@
* Linker script for the Cortex-M platforms.
*/
#define _LINKER
#define _ASMLANGUAGE
#include <autoconf.h>
#include <linker/sections.h>
#include <generated_dts_board.h>

View file

@ -11,9 +11,6 @@
* Linker script for the Cortex-R platforms.
*/
#define _LINKER
#define _ASMLANGUAGE
#include <autoconf.h>
#include <linker/sections.h>
#include <generated_dts_board.h>

View file

@ -11,9 +11,6 @@
* Linker script for the Nios II platform
*/
#define _LINKER
#define _ASMLANGUAGE
#include <autoconf.h>
#include <linker/sections.h>

View file

@ -12,9 +12,6 @@
* Linker script for the POSIX (native) platform
*/
#define _LINKER
#define _ASMLANGUAGE
#include <autoconf.h>
#include <linker/sections.h>

View file

@ -11,9 +11,6 @@
* Generic Linker script for the riscv platform
*/
#define _LINKER
#define _ASMLANGUAGE
#include <soc.h>
#include <autoconf.h>

View file

@ -37,9 +37,6 @@
* order when programming the MMU.
*/
#define _LINKER
#define _ASMLANGUAGE
#include <linker/linker-defs.h>
#include <offsets.h>
#include <sys/util.h>

View file

@ -3,9 +3,6 @@
* SPDX-License-Identifier: Apache-2.0
*/
#define _LINKER
#define _ASMLANGUAGE
#include <linker/linker-defs.h>
#include <linker/linker-tool.h>

View file

@ -11,9 +11,6 @@
* Linker script for the Cortex-M platforms.
*/
#define _LINKER
#define _ASMLANGUAGE
#include <autoconf.h>
#include <linker/sections.h>
#include <generated_dts_board.h>

View file

@ -12,9 +12,6 @@
* SPDX-License-Identifier: Apache-2.0
*/
#define _LINKER
#define _ASMLANGUAGE
#include <generated_dts_board.h>
#include <autoconf.h>

View file

@ -11,9 +11,6 @@
* Linker script for the Xtensa platform.
*/
#define _LINKER
#define _ASMLANGUAGE
#include <generated_dts_board.h>
#include <autoconf.h>
#include <linker/sections.h>

View file

@ -12,8 +12,6 @@
*/
OUTPUT_ARCH(xtensa)
#define _LINKER
#define _ASMLANGUAGE
#include <generated_dts_board.h>
#include "memory.h"

View file

@ -10,9 +10,6 @@
* Linker script for the Xtensa platform.
*/
#define _LINKER
#define _ASMLANGUAGE
#include <autoconf.h>
#include <linker/sections.h>