Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752056AbbGEI1E (ORCPT ); Sun, 5 Jul 2015 04:27:04 -0400 Received: from blu004-omc1s22.hotmail.com ([65.55.116.33]:55670 "EHLO BLU004-OMC1S22.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751687AbbGEI0t (ORCPT ); Sun, 5 Jul 2015 04:26:49 -0400 X-TMN: [ootlaARxWCF1qtvAzQgJpB0rAws2gvEL] X-Originating-Email: [xili_gchen_5257@hotmail.com] Message-ID: Date: Sun, 5 Jul 2015 06:07:54 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: starvik@axis.com, jesper.nilsson@axis.com CC: "linux-cris-kernel@axis.com" , "linux-kernel@vger.kernel.org" Subject: [PATCH] cris: arch-v10: kernel: kgdb: let is_dyn_brkp as extern variable Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Jul 2015 22:06:44.0214 (UTC) FILETIME=[B68A9960:01D0B6A5] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1740 Lines: 41 For upstream cris toolchain (gcc is 6.0, gas and ld are 2.25.51), they can not recognize the static variable between embedded global asm code and local C code. So let it as extern variable to let the related code pass building, it is harmless for real world using (although it is not quite well for coding styles). The related error (with allmodconfig under cris for next-20150702): arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint': (.text+0x2aca): undefined reference to `is_dyn_brkp' arch/cris/arch-v10/kernel/built-in.o: In function `is_static': kgdb.c:(.text+0x2ada): undefined reference to `is_dyn_brkp' Signed-off-by: Chen Gang --- arch/cris/arch-v10/kernel/kgdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/cris/arch-v10/kernel/kgdb.c b/arch/cris/arch-v10/kernel/kgdb.c index 22d846b..3553406 100644 --- a/arch/cris/arch-v10/kernel/kgdb.c +++ b/arch/cris/arch-v10/kernel/kgdb.c @@ -351,7 +351,7 @@ char internal_stack[INTERNAL_STACK_SIZE]; breakpoint to be handled. A static breakpoint uses the content of register BRP as it is whereas a dynamic breakpoint requires subtraction with 2 in order to execute the instruction. The first breakpoint is static. */ -static unsigned char is_dyn_brkp = 0; +unsigned char is_dyn_brkp; /********************************* String library ****************************/ /* Single-step over library functions creates trap loops. */ -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/