summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2016-02-10 12:49:08 +0100
committerchrome-bot <chrome-bot@chromium.org>2016-02-10 12:44:15 -0800
commite7b5e7b0506c5c2528ff008b02217b8b60434de9 (patch)
treecca6126f140fa57c9893c33928a3d2ab4a163f40
parent192806b8da1b8714f6bfcdc548a7e8e7866b8384 (diff)
downloadchrome-ec-e7b5e7b0506c5c2528ff008b02217b8b60434de9.tar.gz
core/*/ec.lds.S: quote paths containing OUTDIR
If OUTDIR brings in a "@", the build breaks because that delimits the path, leading to invalid file names. This can happen (and happened) when building on a Jenkins CI instance which uses jobname@number as path for parallel checkouts on a single build node. BRANCH=none BUG=none TEST=build with make out=foo@bar ... failed and works now. Change-Id: Id0594f0d7312419110091443755ec11b5f8ee2d8 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/327110 Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Martin Roth <martinroth@chromium.org>
-rw-r--r--core/cortex-m/ec.lds.S7
-rw-r--r--core/cortex-m0/ec.lds.S7
-rw-r--r--core/nds32/ec.lds.S11
3 files changed, 17 insertions, 8 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 9f08b98cc3..982f930d2f 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -5,6 +5,9 @@
#include "config.h"
#include "rsa.h"
+#define STRINGIFY0(name) #name
+#define STRINGIFY(name) STRINGIFY0(name)
+
#ifdef RW_B_LDS
#define FW_MEM_OFF_(section) CONFIG_##section##_B_MEM_OFF
#else
@@ -74,7 +77,7 @@ SECTIONS
#if defined(SECTION_IS_RW) && defined(CONFIG_RW_HEAD_ROOM)
. = . + CONFIG_RW_HEAD_ROOM;
#endif
- OUTDIR/core/CORE/init.o (.text.vecttable)
+ STRINGIFY(OUTDIR/core/CORE/init.o) (.text.vecttable)
. = ALIGN(4);
__version_struct_offset = .;
KEEP(*(.rodata.ver))
@@ -87,7 +90,7 @@ SECTIONS
#else
. = ALIGN(4);
#endif
- OUTDIR/core/CORE/init.o (.text)
+ STRINGIFY(OUTDIR/core/CORE/init.o) (.text)
*(.text*)
#ifdef CONFIG_EXTERNAL_STORAGE
__flash_lpfw_start = .;
diff --git a/core/cortex-m0/ec.lds.S b/core/cortex-m0/ec.lds.S
index 484029b7a3..6596b5e05d 100644
--- a/core/cortex-m0/ec.lds.S
+++ b/core/cortex-m0/ec.lds.S
@@ -5,6 +5,9 @@
#include "config.h"
#include "rsa.h"
+#define STRINGIFY0(name) #name
+#define STRINGIFY(name) STRINGIFY0(name)
+
#define FW_OFF_(section) CONFIG_##section##_MEM_OFF
#define FW_OFF(section) (CONFIG_PROGRAM_MEMORY_BASE + FW_OFF_(section))
@@ -36,7 +39,7 @@ SECTIONS
} > SHARED_LIB
#endif
.text : {
- OUTDIR/core/CORE/init.o (.text.vecttable)
+ STRINGIFY(OUTDIR/core/CORE/init.o) (.text.vecttable)
. = ALIGN(4);
__version_struct_offset = .;
KEEP(*(.rodata.ver))
@@ -49,7 +52,7 @@ SECTIONS
#else
. = ALIGN(4);
#endif
- OUTDIR/core/CORE/init.o (.text)
+ STRINGIFY(OUTDIR/core/CORE/init.o) (.text)
*(.text*)
} > FLASH
. = ALIGN(4);
diff --git a/core/nds32/ec.lds.S b/core/nds32/ec.lds.S
index 02c1aa9a11..eaf5510ceb 100644
--- a/core/nds32/ec.lds.S
+++ b/core/nds32/ec.lds.S
@@ -4,6 +4,9 @@
*/
#include "config.h"
+#define STRINGIFY0(name) #name
+#define STRINGIFY(name) STRINGIFY0(name)
+
#define FW_OFF_(section) CONFIG_##section##_MEM_OFF
#define FW_OFF(section) (CONFIG_PROGRAM_MEMORY_BASE + FW_OFF_(section))
@@ -25,7 +28,7 @@ MEMORY
SECTIONS
{
.text : {
- KEEP(OUTDIR/core/CORE/init.o (.text.vecttable))
+ KEEP(STRINGIFY(OUTDIR/core/CORE/init.o) (.text.vecttable))
. = ALIGN(4);
__version_struct_offset = .;
KEEP(*(.rodata.ver))
@@ -34,8 +37,8 @@ SECTIONS
#else
. = ALIGN(4);
#endif
- KEEP(OUTDIR/core/CORE/init.o (.text.vectirq))
- KEEP(OUTDIR/core/CORE/init.o (.text))
+ KEEP(STRINGIFY(OUTDIR/core/CORE/init.o) (.text.vectirq))
+ KEEP(STRINGIFY(OUTDIR/core/CORE/init.o) (.text))
*(.text*)
. = ALIGN(CONFIG_IT83XX_ILM_BLOCK_SIZE);
@@ -52,7 +55,7 @@ SECTIONS
. = ALIGN(4);
__irqhandler = .;
- KEEP(OUTDIR/core/CORE/init.o (.rodata.vecthandlers))
+ KEEP(STRINGIFY(OUTDIR/core/CORE/init.o) (.rodata.vecthandlers))
. = ALIGN(4);
__cmds = .;