Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D63D1C433F5 for ; Fri, 27 May 2022 16:56:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C972C84320; Fri, 27 May 2022 18:56:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lANe+OLB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D859484368; Fri, 27 May 2022 18:56:20 +0200 (CEST) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4EACD8436A for ; Fri, 27 May 2022 18:56:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alpernebiyasak@gmail.com Received: by mail-ej1-x634.google.com with SMTP id gh17so9905876ejc.6 for ; Fri, 27 May 2022 09:56:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:to:cc :references:content-language:in-reply-to:content-transfer-encoding; bh=ijlSAF7Yn0NIt+J+3RQbVV62fGoAMroHmyHer+rKB0g=; b=lANe+OLBNHcgrFEMA2YCSPRuLZRuye81Pwkqhjf8MM+nwh/WIjDHXvtgXAiuhVCNhA UuWlH+YrCGrCLizM81TGzf5i/CGCWNxoCN4SIfgAsWpz8OhReeEavLVHKf+CtcbLwuS6 SZ6UwQiUB8YPnD4ain3OVPkm9gElyZIN59TSkKwTc4pdsyWyeSWcCZgziwAd2wcTYYX4 k9NEPhDCN9zN1KmvlDFN2oCe7Tz1gHhv47fdkVwQE9KZg7xKD0iLnvp+whAeJTkz8E1F eTMT9Zxh929DrGuQwJ4oO7F/Xrb+ZWuWhuyt/FmLj+1MUtT7s/mY1Kkx3xLuO4BqNyiZ /D5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:cc:references:content-language:in-reply-to :content-transfer-encoding; bh=ijlSAF7Yn0NIt+J+3RQbVV62fGoAMroHmyHer+rKB0g=; b=GrdhsXjuBsmuIBv2yPYvx/QoACPRi8UBeU8XK9sCQwx1sGJp3zVCuuho0Q+Cxh2P8f CP2K2065doGqWk9B0Jwdxv0SCO00zberymWqdUaeOYbBu8HDBX0P+uE3FvcjTAzwKRCg thB6Fn52Lkb5PW3QZY9W45YRDtWePZ6mtEtYihERjmPs5vCBxhl+EthHJm0u2Y1O/Tht n8y3+bcG/rC6pd3krIPTcfErkrR2RksoukaWnJy0GAv1f+ZMNcxW3h3X//VqPM9YDQtw Lq3ckSrMtJtxsoFxXR4Hua8NZM5h95nvRop0adCC/Jq6mKbFvUp/GRA3pcX9iCeZVhb5 I5dQ== X-Gm-Message-State: AOAM531MGrduns/JnMW1OdkHsTaFzJ+TkCEMkh3aJsufWUDKR1F5NhvX ri7bll54HJp+reUKx4QLxow= X-Google-Smtp-Source: ABdhPJxwn8Kg68w1NrWeBZpKmAU8zIHHPsRjeZayb3AqIwFXN/MdSVN12RQ7LMWbaG2esGY4emgMYg== X-Received: by 2002:a17:906:2658:b0:6fe:deae:cf0d with SMTP id i24-20020a170906265800b006fedeaecf0dmr24038371ejc.119.1653670577862; Fri, 27 May 2022 09:56:17 -0700 (PDT) Received: from [192.168.0.74] ([178.233.178.185]) by smtp.gmail.com with ESMTPSA id b3-20020a509f03000000b0042617ba63a8sm2335121edf.50.2022.05.27.09.56.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 May 2022 09:56:17 -0700 (PDT) Message-ID: <65a753f0-235a-4939-ab10-ea417a763ee2@gmail.com> Date: Fri, 27 May 2022 19:54:48 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 From: Alper Nebi Yasak Subject: Re: [PATCH V5 8/9] binman_sym: guard with CONFIG_SPL_BINMAN_SYMBOLS To: "Peng Fan (OSS)" Cc: u-boot@lists.denx.de, Peng Fan , Tim Harvey , sbabic@denx.de, festevam@gmail.com, trini@konsulko.com, Simon Glass References: <20220524080040.28653-1-peng.fan@oss.nxp.com> <20220524080040.28653-9-peng.fan@oss.nxp.com> Content-Language: en-US In-Reply-To: <20220524080040.28653-9-peng.fan@oss.nxp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On 24/05/2022 11:00, Peng Fan (OSS) wrote: > From: Peng Fan > > There is case that CONFIG_BINMAN is defined, but > CONFIG_SPL_BINMAN_SYMBOLS is not defined. In that case, there will be > build failure. So use CONFIG_SPL_BINMAN_SYMBOLS to guard the macros, and > define CONFIG_SPL_BINMAN_SYMBOLS in binman syms test. > > Tested-by: Tim Harvey #imx8m[m,n,p]-venice > Signed-off-by: Peng Fan > --- > include/binman_sym.h | 2 +- > tools/binman/test/u_boot_binman_syms.c | 1 + > tools/binman/test/u_boot_binman_syms_size.c | 1 + > 3 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/include/binman_sym.h b/include/binman_sym.h > index 72e6765fe52..548d8f5654c 100644 > --- a/include/binman_sym.h > +++ b/include/binman_sym.h > @@ -13,7 +13,7 @@ > > #define BINMAN_SYM_MISSING (-1UL) > > -#ifdef CONFIG_BINMAN > +#ifdef CONFIG_SPL_BINMAN_SYMBOLS This must handle all of CONFIG_{TPL,VPL,SPL}_BINMAN_SYMBOLS. You can use CONFIG_IS_ENABLED(BINMAN_SYMBOLS) if you: - Create a binman/test/generated/autoconf.h with binman CONFIGs - Add `-I $(SRC)` to CFLAGS in binman/test/Makefile - Add `#include ` to test .c files - Maybe add `#define CONFIG_SPL_BUILD` to test .c files > > /** > * binman_symname() - Internal function to get a binman symbol name > diff --git a/tools/binman/test/u_boot_binman_syms.c b/tools/binman/test/u_boot_binman_syms.c > index 37fc339ce84..f4a4d1f6846 100644 > --- a/tools/binman/test/u_boot_binman_syms.c > +++ b/tools/binman/test/u_boot_binman_syms.c > @@ -6,6 +6,7 @@ > */ > > #define CONFIG_BINMAN > +#define CONFIG_SPL_BINMAN_SYMBOLS > #include > > binman_sym_declare(unsigned long, u_boot_spl_any, offset); > diff --git a/tools/binman/test/u_boot_binman_syms_size.c b/tools/binman/test/u_boot_binman_syms_size.c > index 7224bc1863c..3a01d8ca4be 100644 > --- a/tools/binman/test/u_boot_binman_syms_size.c > +++ b/tools/binman/test/u_boot_binman_syms_size.c > @@ -6,6 +6,7 @@ > */ > > #define CONFIG_BINMAN > +#define CONFIG_SPL_BINMAN_SYMBOLS > #include > > binman_sym_declare(char, u_boot_spl, pos);