diff mbox

[Xen-devel] xen: arm: prevent building with CONFIG_EARLY_PRINTK if not a debug build

Message ID 1393981349-6811-1-git-send-email-ian.campbell@citrix.com
State Accepted
Commit 5940d3d095661f541a843e5d4c5f9363c18cd63c
Headers show

Commit Message

Ian Campbell March 5, 2014, 1:02 a.m. UTC
early printk on ARM is tied to debug being enabled, so error out instead of silently and unexpectedly building without early printk when asked.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
---
 xen/arch/arm/Rules.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Ian Campbell March 5, 2014, 1:08 a.m. UTC | #1
On Wed, 2014-03-05 at 01:02 +0000, Ian Campbell wrote:
> early printk on ARM is tied to debug being enabled, so error out instead of silently and unexpectedly building without early printk when asked.
> 
> Signed-off-by: Ian Campbell <ijc@hellion.org.uk>

Should really be:

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Julien Grall March 5, 2014, 3:39 a.m. UTC | #2
On 05/03/14 09:02, Ian Campbell wrote:
> early printk on ARM is tied to debug being enabled, so error out instead of silently and unexpectedly building without early printk when asked.
>
> Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Julien Grall <julien.grall@linaro.org>
> ---
>   xen/arch/arm/Rules.mk | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
> index aaa203e..aa2e79f 100644
> --- a/xen/arch/arm/Rules.mk
> +++ b/xen/arch/arm/Rules.mk
> @@ -99,4 +99,12 @@ CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_INC=\"debug-$(EARLY_PRINTK_INC).inc\"
>   CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_BAUD=$(EARLY_PRINTK_BAUD)
>   CFLAGS-$(EARLY_PRINTK) += -DEARLY_UART_BASE_ADDRESS=$(EARLY_UART_BASE_ADDRESS)
>   CFLAGS-$(EARLY_PRINTK) += -DEARLY_UART_REG_SHIFT=$(EARLY_UART_REG_SHIFT)
> +
> +else # !debug
> +
> +ifneq ($(CONFIG_EARLY_PRINTK),)
> +# Early printk is dependant on a debug build.
> +$(error CONFIG_EARLY_PRINTK enabled for non-debug build)
> +endif
> +
>   endif
>
Ian Campbell March 13, 2014, 12:25 p.m. UTC | #3
On Wed, 2014-03-05 at 11:39 +0800, Julien Grall wrote:
> 
> On 05/03/14 09:02, Ian Campbell wrote:
> > early printk on ARM is tied to debug being enabled, so error out instead of silently and unexpectedly building without early printk when asked.
> >
> > Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
> Acked-by: Julien Grall <julien.grall@linaro.org>

Thanks. Applied.
diff mbox

Patch

diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
index aaa203e..aa2e79f 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -99,4 +99,12 @@  CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_INC=\"debug-$(EARLY_PRINTK_INC).inc\"
 CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_BAUD=$(EARLY_PRINTK_BAUD)
 CFLAGS-$(EARLY_PRINTK) += -DEARLY_UART_BASE_ADDRESS=$(EARLY_UART_BASE_ADDRESS)
 CFLAGS-$(EARLY_PRINTK) += -DEARLY_UART_REG_SHIFT=$(EARLY_UART_REG_SHIFT)
+
+else # !debug
+
+ifneq ($(CONFIG_EARLY_PRINTK),)
+# Early printk is dependant on a debug build.
+$(error CONFIG_EARLY_PRINTK enabled for non-debug build)
+endif
+
 endif