From patchwork Fri Nov 7 23:17:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 40452 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3EFFA20D85 for ; Fri, 7 Nov 2014 23:17:35 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id x13sf2420700wgg.9 for ; Fri, 07 Nov 2014 15:17:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=GrMA44fDgPiYmTdr3sEZOoHyQfHuYyx3lmO6cqNFT1U=; b=lCFvBpT95AIaEmNcMM/kZ6JHjF71YgufUAFErk+D0xMYqzBF7ar6D6c8iS+ykvS06E 1fnIhKszV7/mDc5fE25xSh4yayW6jV9yHObp4aFV61d+xA/e/H+ejKjBb2M6Vorxt4BQ wX9BTnjjSrdGVMaD6phREForRmu9OZkzZ/l0SsbKCfqJn12kLUp0PMVbiTzzHjbf+w9X 3kClkHgQfFDpMn85WhLpSiTnHfp10lNiHfISFW6RTjWLXflbUZeAEnOQ8gYrHu/U9Sz1 pF3lSgTiN5OmfluZHQzTYS/6ERaUOVEMCBe0eS04LRE/DGRp+cR19n2FW10D6oqVHTFA MiKA== X-Gm-Message-State: ALoCoQldtZ7jR6elmw5Bxi6I+DcQLl6bhNnalVrYCwermYbZThWqe61+ConzGUK2xtxIsV4Yhvd3 X-Received: by 10.180.90.234 with SMTP id bz10mr1170590wib.0.1415402254503; Fri, 07 Nov 2014 15:17:34 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.227 with SMTP id v3ls278285lav.91.gmail; Fri, 07 Nov 2014 15:17:34 -0800 (PST) X-Received: by 10.152.5.6 with SMTP id o6mr14279915lao.4.1415402254249; Fri, 07 Nov 2014 15:17:34 -0800 (PST) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id jd2si16708479lbc.91.2014.11.07.15.17.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Nov 2014 15:17:33 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id hz20so5275463lab.9 for ; Fri, 07 Nov 2014 15:17:33 -0800 (PST) X-Received: by 10.112.87.162 with SMTP id az2mr13733927lbb.15.1415402253584; Fri, 07 Nov 2014 15:17:33 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp286277lbc; Fri, 7 Nov 2014 15:17:32 -0800 (PST) X-Received: by 10.224.47.4 with SMTP id l4mr9141229qaf.36.1415402252297; Fri, 07 Nov 2014 15:17:32 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id v4si19263595qcz.24.2014.11.07.15.17.31 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 07 Nov 2014 15:17:32 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XmsmY-00011A-8C; Fri, 07 Nov 2014 23:17:30 +0000 Received: from mail-oi0-f42.google.com ([209.85.218.42]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XmsmR-000110-5L for lng-odp@lists.linaro.org; Fri, 07 Nov 2014 23:17:23 +0000 Received: by mail-oi0-f42.google.com with SMTP id a3so3166633oib.1 for ; Fri, 07 Nov 2014 15:17:17 -0800 (PST) X-Received: by 10.60.161.115 with SMTP id xr19mr12201605oeb.8.1415402237834; Fri, 07 Nov 2014 15:17:17 -0800 (PST) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id j8sm4233404oeq.11.2014.11.07.15.17.17 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Nov 2014 15:17:17 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Fri, 7 Nov 2014 17:17:11 -0600 Message-Id: <1415402231-7353-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-Topics: patch Subject: [lng-odp] [PATCHv2] Add autoconf for --enable-allow-unimplemented (default is no) X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bill.fischofer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Bill Fischofer --- configure.ac | 11 +++++++++++ platform/linux-generic/include/odp_debug_internal.h | 11 +++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 1c061e9..cca76bb 100644 --- a/configure.ac +++ b/configure.ac @@ -110,6 +110,17 @@ AC_ARG_ENABLE([debug], ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG" ########################################################################## +# Enable/disable ODP_ALLOW_UNIMPLEMENTED +########################################################################## +ODP_ALLOW_UNIMPLEMENTED=0 +AC_ARG_ENABLE([allow-unimplemented], + [ --enable-allow-unimplemented Enable/disable allow unimplemented], + [if test "x$enableval" = "xyes"; then + ODP_ALLOW_UNIMPLEMENTED=1 + fi]) +ODP_CFLAGS="$ODP_CFLAGS -DODP_ALLOW_UNIMPLEMENTED=$ODP_ALLOW_UNIMPLEMENTED" + +########################################################################## # Check for pthreads availability ########################################################################## diff --git a/platform/linux-generic/include/odp_debug_internal.h b/platform/linux-generic/include/odp_debug_internal.h index a87552f..b82ead4 100644 --- a/platform/linux-generic/include/odp_debug_internal.h +++ b/platform/linux-generic/include/odp_debug_internal.h @@ -25,8 +25,15 @@ extern "C" { /** * This macro is used to indicate when a given function is not implemented */ -#define ODP_UNIMPLEMENTED(fmt, ...) \ - ODP_LOG(ODP_LOG_UNIMPLEMENTED, fmt, ##__VA_ARGS__) +#if ODP_ALLOW_UNIMPLEMENTED +#define ODP_UNIMPLEMENTED(fmt, ...) \ + ODP_LOG(ODP_LOG_UNIMPLEMENTED, fmt, ##__VA_ARGS__); +#else +#define ODP_UNIMPLEMENTED(fmt, ...) do { \ + ODP_LOG(ODP_LOG_UNIMPLEMENTED, fmt, ##__VA_ARGS__); \ + odp_unimplemented(); \ + } while (0) +#endif #ifdef __cplusplus }