From patchwork Fri Oct 13 09:12:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 825340 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="Dt/aCZ07"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3yD27m3GxNz9sP1 for ; Fri, 13 Oct 2017 20:13:23 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 0F37EC21FDB; Fri, 13 Oct 2017 09:13:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id BF7ADC21EEE; Fri, 13 Oct 2017 09:13:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3C130C21F01; Fri, 13 Oct 2017 09:13:10 +0000 (UTC) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by lists.denx.de (Postfix) with ESMTPS id 16615C21C59 for ; Fri, 13 Oct 2017 09:13:07 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id v9D9CiH2002457; Fri, 13 Oct 2017 18:12:45 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com v9D9CiH2002457 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1507885966; bh=YN0+n0PHHlCD1HOB/o9lA4A5be3QS3Zq7GkyQ5AiCK0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dt/aCZ07Vr16ZotgnJzGK/nz2txRwOlozNfCrCGrmrYNSyFbZLahpe8wPRtxOBlac 89kMeVkwwPgJjHZE46SlSeCtmwX5luhw/1byC8wDEzwPUafSS+wb4cZI7I0OYocORI HcpvcA1RJcqVHwJuW9q7hObBIxEkV8hCW6Si/lgoQoJDwG7rmU75OCumKfU3gqSx/I jH5Ywr/AyfjatdSOYnfueS8kuAbKxlPgoVKtV9Q/43T1WjCGSeshYgDfwLW986189p Z/w1V5eqlMfYKlchEU+n6/Cf4Yala+KvOJT/tQJe89chjoi4g7ha1JCllSkvw0kxlD Zi1mmweeua5Ug== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 13 Oct 2017 18:12:39 +0900 Message-Id: <1507885961-12665-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507885961-12665-1-git-send-email-yamada.masahiro@socionext.com> References: <1507885961-12665-1-git-send-email-yamada.masahiro@socionext.com> Cc: Tom Rini , Michal Marek Subject: [U-Boot] [PATCH 1/3] kbuild: Get rid of KBUILD_STR X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Michal Marek The compiler can accept -DKBUILD_MODNAME="foo", it's just a matter of quoting. That way, we reduce the gcc command line a bit. Signed-off-by: Michal Marek Signed-off-by: Masahiro Yamada [ Linux commit: b42841b7bb6286da56b4fa79835c27166b7e228b ] --- scripts/Makefile.lib | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 0d5c529..8934b2f 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -99,10 +99,10 @@ obj-dirs := $(addprefix $(obj)/,$(obj-dirs)) # Note: Files that end up in two or more modules are compiled without the # KBUILD_MODNAME definition. The reason is that any made-up name would # differ in different configs. -name-fix = $(subst $(comma),_,$(subst -,_,$1)) -basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))" +name-fix = $(squote)$(quote)$(subst $(comma),_,$(subst -,_,$1))$(quote)$(squote) +basename_flags = -DKBUILD_BASENAME=$(call name-fix,$(basetarget)) modname_flags = $(if $(filter 1,$(words $(modname))),\ - -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") + -DKBUILD_MODNAME=$(call name-fix,$(modname))) orig_c_flags = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(KBUILD_SUBDIR_CCFLAGS) \ $(ccflags-y) $(CFLAGS_$(basetarget).o) @@ -154,7 +154,7 @@ endif # Modified for U-Boot: LINUXINCLUDE -> UBOOTINCLUDE c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE) \ $(__c_flags) $(modkern_cflags) \ - -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags) + $(basename_flags) $(modname_flags) a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE) \ $(__a_flags) $(modkern_aflags)