From patchwork Mon Apr 22 16:49:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 162604 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2801253jan; Mon, 22 Apr 2019 09:51:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqze7Jx2jJ9A8T4biT5nOHAVzW3ts3n4Ony2jEX3+9CFlTXwppB1wYXj4pY7iQ9JRv3uIWo5 X-Received: by 2002:a25:e80f:: with SMTP id k15mr16172879ybd.489.1555951873689; Mon, 22 Apr 2019 09:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555951873; cv=none; d=google.com; s=arc-20160816; b=PdxBNrGSBgTT8ceONbccp7IdQVOhHVYK/M0pt8d4tLfjuqq6VX5CedKaLgL/5zq4Ta TMyLAofwkIX2w63KU93vtuhEVDTegYKXPgI8MQLMmDrj0c3ehOsLAjpNceQ3qjz3Jx0g AmB+B6q4/JH87HcDlBMRcVaAOLajjxRg3mblLwydQSldkJ5hhZ2LvXfcihF+2/Anola6 HgwWMjXbBRxRzvLaMHFKS55v8vnlibYQQflUxl0voEwQfzN4lGkqLVT272I0SEQn1hVQ /w5CMvFFZFbbsSKLhpNR+V5FgghEhaLOS6d7hGDgoKpKe+Og5ebH2oERKDPjbFR0/Jo0 oEzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=jr+ELKhZchDAuTudjtlKfRBV9Qhi/sqAoyd1T9oeKkQ=; b=gccwWJu+GCqDRDmpyYBB8x+lhcpWPuyymxiMVDExsvYuhZvkXg467HKvpNmxRhgO67 4NnPv32aS4ZMSPYIm/+C5ED88ixc0bw6dddCzof9+3+ZH8RZ4Gq8C2xsP24aYxVsylzj OC2YoKGjhk2x2w3z1iwZqpnAdXU6UOblevk5coxfP8vbyiBsIvhJjmN/UkQJdZfQhETz KLyCYxjEGHcNgFpHqERAoewF4fw+cICtsjamr8BeRptr5xlC8hOTUqvMUGJEqh8AVvdQ q67cr5CQ/LEjgZ1T1nQRybD9AUwu2I3kQREmz0Gs9vnqBSf+n1EZPHeZ8DlL92QfkxZb 92QA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 80si9207988ybn.24.2019.04.22.09.51.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Apr 2019 09:51:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hIc97-0005Xd-Ul; Mon, 22 Apr 2019 16:50:21 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hIc95-0005TL-Uo for xen-devel@lists.xenproject.org; Mon, 22 Apr 2019 16:50:19 +0000 X-Inumbo-ID: b56b5ac9-651e-11e9-92d7-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id b56b5ac9-651e-11e9-92d7-bc764e045a96; Mon, 22 Apr 2019 16:50:17 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BDCCFEBD; Mon, 22 Apr 2019 09:50:17 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AE2C73F719; Mon, 22 Apr 2019 09:50:16 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 22 Apr 2019 17:49:37 +0100 Message-Id: <20190422164937.21350-21-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190422164937.21350-1-julien.grall@arm.com> References: <20190422164937.21350-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH 20/20] xen/arm: Allow cleaning the directory even when CONFIG_EARLY_PRINTK is set X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Oleksandr_Tyshchenko@epam.com, Julien Grall , sstabellini@kernel.org, Andrii_Anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" CONFIG_EARLY_PRINTK can only be set when CONFIG_DEBUG is enabled. It can be quite convenient to only modify the target. However, the target clean will not include the .config. This means CONFIG_DEBUG is not enabled and therefore make will throw an error preventing clean to continue. The check is not moved at linking time. Signed-off-by: Julien Grall --- This code is pretty nasty, but I haven't found a better way for avoiding to check if CONFIG_DEBUG is enabled when the target clean is called. Ideally we will want to move CONFIG_EARLY_PRINTK in Kconfig. I haven't had time yet to look at it properly so far. --- xen/arch/arm/Makefile | 5 +++++ xen/arch/arm/Rules.mk | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index cb902cb6fe..fef508c836 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -101,6 +101,11 @@ prelink.o: $(ALL_OBJS) endif $(TARGET)-syms: prelink.o xen.lds +ifneq ($(CONFIG_EARLY_PRINTK), ) +ifneq ($(CONFIG_DEBUG), y) + $(error CONFIG_EARLY_PRINTK enabled for non-debug build) +endif +endif $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \ $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=sysv $(@D)/.$(@F).0 \ diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk index f264592aef..12150986c5 100644 --- a/xen/arch/arm/Rules.mk +++ b/xen/arch/arm/Rules.mk @@ -80,11 +80,4 @@ 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 # !CONFIG_DEBUG - -ifneq ($(CONFIG_EARLY_PRINTK),) -# Early printk is dependant on a debug build. -$(error CONFIG_EARLY_PRINTK enabled for non-debug build) -endif - endif