From patchwork Fri Nov 7 23:19:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 40453 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CAEF220D85 for ; Fri, 7 Nov 2014 23:19:42 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id e51sf3912598eek.2 for ; Fri, 07 Nov 2014 15:19:41 -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=cjF3pW/TskxCJUAVJf8qm8/V2O3VjaMYonq5iN/+dl4=; b=iQF1u5/9Vbt8dWqHg0S5Y+QrzBXYhc8MupXIxOoVAdJAZwg7gf2R/cxcAEVeEN3i/f 4lnTfVN+FTbTnkzFlfyANPcJCLLpGjMhiM6QdG+oc0njgyr2PjZvsHG0070m+lTf0RvW KQHxNHtB0MCe8QZPsarjC0zEW2SOLZ4LcZQFIhcgQP1VoWbRIPcbK3uiE4XvVDunmpT2 aUiZQyHa6DniCbfX6tIya3W/AONoHkcByedrXepMfto2LtsIfxNp0be0vmzodIZwacG5 AnTqa801yrukEjsK30+YKKTgVUD01Zjr5+gJnITYzvUOuEWKlQNUFkFqBWP+nRy3M6Uo GYXw== X-Gm-Message-State: ALoCoQkeSEzKHOcwDlEE72K1zXiqeXry5wfL3w0bcNsSvLZa8ejZHm39dHxvlHzPhdhS+Ef4WPyM X-Received: by 10.112.254.226 with SMTP id al2mr2433923lbd.1.1415402381413; Fri, 07 Nov 2014 15:19:41 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.133 with SMTP id m5ls257145laf.102.gmail; Fri, 07 Nov 2014 15:19:40 -0800 (PST) X-Received: by 10.112.12.35 with SMTP id v3mr5595691lbb.80.1415402380588; Fri, 07 Nov 2014 15:19:40 -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 g7si16763093lab.66.2014.11.07.15.19.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Nov 2014 15:19:40 -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 hz20so5277058lab.9 for ; Fri, 07 Nov 2014 15:19:40 -0800 (PST) X-Received: by 10.112.135.229 with SMTP id pv5mr13950519lbb.52.1415402380405; Fri, 07 Nov 2014 15:19:40 -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 ew9csp286482lbc; Fri, 7 Nov 2014 15:19:39 -0800 (PST) X-Received: by 10.224.12.145 with SMTP id x17mr22302785qax.13.1415402379220; Fri, 07 Nov 2014 15:19:39 -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 d31si19348369qgf.1.2014.11.07.15.19.38 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 07 Nov 2014 15:19:39 -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 1Xmsob-00018J-Gn; Fri, 07 Nov 2014 23:19:37 +0000 Received: from mail-ob0-f182.google.com ([209.85.214.182]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XmsoV-00018E-Cd for lng-odp@lists.linaro.org; Fri, 07 Nov 2014 23:19:31 +0000 Received: by mail-ob0-f182.google.com with SMTP id nt9so3648114obb.41 for ; Fri, 07 Nov 2014 15:19:26 -0800 (PST) X-Received: by 10.202.93.134 with SMTP id r128mr11615668oib.0.1415402366056; Fri, 07 Nov 2014 15:19:26 -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 ln10sm4384573obc.24.2014.11.07.15.19.25 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Nov 2014 15:19:25 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Fri, 7 Nov 2014 17:19:19 -0600 Message-Id: <1415402359-7796-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-Topics: patch Subject: [lng-odp] [PATCHv3] 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..8ae0b01 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 }