From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B8AD7A09E0; Fri, 13 Nov 2020 16:42:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 204BEC87A; Fri, 13 Nov 2020 16:42:19 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id EBC4DC868 for ; Fri, 13 Nov 2020 16:42:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605282135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0X3D0XlGUkfUuMDQKJM8bULXUodCHtNq8X4GXXMkSxg=; b=AF71707ZnU64p1zRKHxt4TEIqvoWOR1fmIT3YXQ96QqP08WntDaf45Ni1N0u4+xF8AGhgj 1V3f0i6DwJFTx15mY6MsJ5iqfOZT33FlCL40xW2ZTnU/lzFd1WnUoogXGq0Fcvmp3jUJKT IWlUMZcDAnQg0EFMx3eBi5ZSOEvcNMw= Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-328-4RZhIq7-MSCbLEufc-oTJA-1; Fri, 13 Nov 2020 10:42:13 -0500 X-MC-Unique: 4RZhIq7-MSCbLEufc-oTJA-1 Received: by mail-vk1-f199.google.com with SMTP id s6so2752287vkg.12 for ; Fri, 13 Nov 2020 07:42:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0X3D0XlGUkfUuMDQKJM8bULXUodCHtNq8X4GXXMkSxg=; b=Fbxovjp/3BKLu5bn74Vc9jYNtvppJguKtGwaJPjzTl7TvsizP4TN2yeocanxdj6dV6 8AbBqSmeU+j0cYPQ1Sw1TX0ftRL9ct5Ph7Gital2t3cr+Ce5T4ZmOEQz2cT1klir2sHw nrvwv7m8KTtjzzA50JSOXWD/iAdoe1z8ILQPRhZlMlUqz/Mwfp+XdKwO+Z62LaqDTp3u t8GvHEPoNuZiHNG/Gdx+aA0Ooci08p8M6Ez2hBJHjerjt+68BCkmN6xKILvCCTa1Dczo yCl7nepnAZiwbKOPvttzY7BR0R2NRNe+Fnh51hIadQwrissItor+XUe0CCaA/8g3x0PX M7Wg== X-Gm-Message-State: AOAM532mlHKdzGX+q3oFH2jLp/YJr5Oi2MGswqoEugOrGxNNxCfTw3Eu pOLVeyL9ijH1ghTw/9UxIWd00hLCeGGhYyNQO8iUF6kISLijL0UTrL+GWhN2AJHvn3CZu2Y6zkX JoStoVpYup6HQyU7pUEw= X-Received: by 2002:a1f:23d6:: with SMTP id j205mr1557776vkj.20.1605282128146; Fri, 13 Nov 2020 07:42:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJw9aca88htx3d7z5iLtP5gmKff1RkAN9QslyCg/Jjrx2lh1uJj9YTpeQmcSxV0rKGnchfpuHMIiAYjnoA0xYSs= X-Received: by 2002:a1f:23d6:: with SMTP id j205mr1557491vkj.20.1605282123013; Fri, 13 Nov 2020 07:42:03 -0800 (PST) MIME-Version: 1.0 References: <20201110151219.4893-1-david.marchand@redhat.com> <20201113122430.25354-1-david.marchand@redhat.com> <20201113122430.25354-5-david.marchand@redhat.com> <20201113135314.GB53@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: From: David Marchand Date: Fri, 13 Nov 2020 16:41:52 +0100 Message-ID: To: Bruce Richardson Cc: dev , Thomas Monjalon , Declan Doherty , Pablo de Lara , Akhil Goyal , Fiona Trahe , Fan Zhang Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 04/11] examples/l2fwd-crypto: fix build with pkg-config X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Nov 13, 2020 at 3:15 PM David Marchand wrote: > > On Fri, Nov 13, 2020 at 2:53 PM Bruce Richardson > wrote: > > > +NEED_CRYPTO_SCHEDULER = $(shell echo RTE_CRYPTO_SCHEDULER | $(CPP) $(CFLAGS) -P - | tail -1) > > > +ifeq ($(NEED_CRYPTO_SCHEDULER), 1) > > > > Sorry for the last-minute comment, but I wonder for this check if we can do > > better by adding into each makefile something like: > > > > CONFIG_DEFINES=$(shell $(CC) $(CFLAGS) -dM -E - < /dev/null) > > > > Then we can easily do multiple checks for vars as needed using findstring, > > e.g. > > > > ifeq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES),) > > $(info No crypto scheduler found) > > else > > ... > > endif > > > > Whatever approach we use here, I'd like applicable across all makefiles for > > consistency, and shelling out per-value seems wasteful. Pulling all macro > > values also allows checks for architecture and instruction set levels too, > > if so desired. --- a/examples/l2fwd-crypto/Makefile +++ b/examples/l2fwd-crypto/Makefile @@ -23,9 +23,15 @@ PKGCONF ?= pkg-config PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +CONFIG_DEFINES = $(shell $(CC) $(CFLAGS) -dM -E - < /dev/null) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +ifneq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES)),) +LDFLAGS_SHARED += -lrte_crypto_scheduler +endif LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED) I'll send a v3 later. -- David Marchand