From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from webbox1416.server-home.net ([77.236.96.61]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1XTUnt-0000Xa-Of for ptxdist@pengutronix.de; Mon, 15 Sep 2014 13:50:46 +0200 Received: from imapserver.systec-electronic.com (unknown [212.185.67.148]) by webbox1416.server-home.net (Postfix) with ESMTPA id F110627A715 for ; Mon, 15 Sep 2014 13:13:25 +0200 (CEST) From: Alexander Stein Date: Mon, 15 Sep 2014 13:51:29 +0200 Message-Id: <1410781889-7284-1-git-send-email-alexander.stein@systec-electronic.com> Subject: [ptxdist] [PATCH v2] dtc: Do not inhibit linemarker generation if supported Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Alexander Stein Without linemarkers the error messages are somehwat useless. To demonstrate I picked a random .dts file file from the arm tree in linux sources: DTC ptx-testprj_arm/platform/images/vf610-twr.dtb Error: /tmp/testprj/platform/state/vf610-twr.dts.tmp:366.1-5 syntax error FATAL ERROR: Unable to parse input tree If linemarkers are inserted the error message clearly states in which file which line caused the error: DTC ptx-testprj_arm/platform/images/vf610-twr.dtb Error: /tmp/testprj/platform/build-target/linux/arch/arm/boot/dts/vf610-twr.dts:13.1-5 syntax error FATAL ERROR: Unable to parse input tree The support for #line markers was added in the same release as -i was added. So add -P only if -i is not supported. Signed-off-by: Alexander Stein --- scripts/lib/ptxd_make_dts_dtc.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/lib/ptxd_make_dts_dtc.sh b/scripts/lib/ptxd_make_dts_dtc.sh index d5e8c59..2b4a2cc 100644 --- a/scripts/lib/ptxd_make_dts_dtc.sh +++ b/scripts/lib/ptxd_make_dts_dtc.sh @@ -29,8 +29,12 @@ ptxd_make_dts_dtb() { if dtc -h 2>&1 | grep -q '^[[:space:]]\+-i\(,.*\)\?$'; then dtc_include="-i $(dirname "${dts}") -i ${dts_kernel_dir}/arch/${dts_kernel_arch}/boot/dts" tmp_dts="${ptx_state_dir}/$(basename "${dts}").tmp" + no_linemarker="" else + # the support for "#line ..." was added in the same relase when -i + # was added. So we add -P only if -i is not supported. tmp_dts="${dts}.tmp" + no_linemarker="-P" fi && deps="${ptx_state_dir}/dtc.$(basename "${dts}").deps" @@ -41,7 +45,7 @@ ptxd_make_dts_dtb() { -Wp,-MD,${tmp_deps} \ -Wp,-MT,${tmp_dts} \ -nostdinc \ - -P \ + ${no_linemarker} \ -I$(dirname "${dts}") \ -I${dts_kernel_dir}/arch/${dts_kernel_arch}/boot/dts \ -I${dts_kernel_dir}/arch/${dts_kernel_arch}/boot/dts/include \ -- 1.8.5.5 -- ptxdist mailing list ptxdist@pengutronix.de