From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-yk0-x230.google.com ([2607:f8b0:4002:c07::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zbojx-0000Cn-1L for barebox@lists.infradead.org; Tue, 15 Sep 2015 11:49:37 +0000 Received: by ykdg206 with SMTP id g206so181910551ykd.1 for ; Tue, 15 Sep 2015 04:49:15 -0700 (PDT) MIME-Version: 1.0 Date: Tue, 15 Sep 2015 19:49:15 +0800 Message-ID: From: Kevin Du Huanpeng List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: compile bug about banner and version macros. To: "barebox@lists.infradead.org" this patch fix a tiny compile bug. 1. how to reproduce the bug. $ export ARCH=mips $ export CROSS_COMPILE=mips-linux-gnu- $ make allnoconfig - - - error msg - - - du@L64:~/source/barebox$ make CHK include/generated/version.h CHK include/generated/utsrelease.h AS arch/mips/boot/start.o arch/mips/boot/start.S:25:31: fatal error: generated/compile.h: No such file or directory #include ^ compilation terminated. make[1]: *** [arch/mips/boot/start.o] Error 1 make: *** [arch/mips/boot] Error 2 - - - error msg - - - 2. huntting the bug. after use grep, I find the file is depends on version.o in $ vi common/Makefile +81 81 $(obj)/version.o: include/generated/compile.h when the CONFIG_BANNER is not enabled, the version.o is not exsist, so, the file was never genated. 13 obj-$(CONFIG_BANNER) += version.o 3. fix it. add condition compile, or anyone have better sulotion? ---- diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S index 7e2ae5e..2b0ffa8 100644 --- a/arch/mips/boot/start.S +++ b/arch/mips/boot/start.S @@ -22,7 +22,9 @@ #include #include #include +#ifdef CONFIG_BANNER #include +#endif #include /* @@ -56,7 +58,10 @@ EXPORT(_start) nop .org 0x10 - .ascii "barebox " UTS_RELEASE " " UTS_VERSION + .ascii "barebox " UTS_RELEASE +#ifdef CONFIG_BANNER + .ascii " " UTS_VERSION +#endif .byte 0 .align 4 ---- 4. better sulotion? I grep-ed compile.h, more than one source code use this file without check the CONFIG_BANNER macro. so... maybe my patch need improved. or allways genate compile.h? this just waste some time when compiling. _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox