From patchwork Tue Nov 19 06:03:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selva Nair X-Patchwork-Id: 928 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id AFlGH+Ag1F36IQAAIUCqbw for ; Tue, 19 Nov 2019 12:05:36 -0500 Received: from proxy2.mail.ord1d.rsapps.net ([172.30.191.6]) by director11.mail.ord1d.rsapps.net with LMTP id uGpLHuAg1F0vCwAAvGGmqA ; Tue, 19 Nov 2019 12:05:36 -0500 Received: from smtp21.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy2.mail.ord1d.rsapps.net with LMTP id 2LjOHeAg1F1AGAAAfawv4w ; Tue, 19 Nov 2019 12:05:36 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp21.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: cd32834c-0aee-11ea-adad-525400a98691-1-1 Received: from [216.105.38.7] ([216.105.38.7:45536] helo=lists.sourceforge.net) by smtp21.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id D3/63-30404-FD024DD5; Tue, 19 Nov 2019 12:05:35 -0500 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1iX6vn-00052T-FB; Tue, 19 Nov 2019 17:04:47 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iX6vl-00052I-Tk for openvpn-devel@lists.sourceforge.net; Tue, 19 Nov 2019 17:04:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=E6KLR1+5kn9QEx6hulvL29CP9mgiWuC5Xx0TkVZfdYI=; b=OM2nv4+zTDkwNIMsBAQI3+yyUG G3LwfPWuDAc7GOHkvl53/sj+nkE6jLkj/lpkLsUjuWJqStWiRc0iwmEfLkrnBbCtd4NSRzkQ0lVWM ew+IjBZdOuTQxzTRUjT++f8giWtRZ4CDrvdoepz8ofg3eqHYG6ImOhXJFvDyxORtoe5A=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To :MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=E6KLR1+5kn9QEx6hulvL29CP9mgiWuC5Xx0TkVZfdYI=; b=WJxqWrmuZYbA6NHQxpF4iVIvZE O71kmScTxghit3/2EutQZclNjf+AC803USBW/l0rxO8FRm8BVLeXTvdlJtLDcTfRb0jE2zAQDmixP RK4slvaIWjqULLQWdNQZtQpipKumxgvWJDnR5OZ8g/IIIAdde0yoxBCT7WN+wKOsGw/w=; Received: from mail-qt1-f196.google.com ([209.85.160.196]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1iX6vi-00Ckud-1m for openvpn-devel@lists.sourceforge.net; Tue, 19 Nov 2019 17:04:45 +0000 Received: by mail-qt1-f196.google.com with SMTP id j5so23967421qtn.10 for ; Tue, 19 Nov 2019 09:04:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=E6KLR1+5kn9QEx6hulvL29CP9mgiWuC5Xx0TkVZfdYI=; b=YDhDaKlhGJl55ydp1KKHrU4GwpcOYK2zMyFRhFzkav6GoZ7RytQy73d/8mZnyhYD97 7Zjdi5/jOFu6fsEgthGEr9Hr4dFuMwn0OebvizltrMM8XdJWT43dBzxQFj/j6ICpxW2R ENCQ8hTbmaplHeIZYaeMrGrfQNkWCl6pRrl7FjOVi10LVU+Zs+mmdiZhTHwtURvxysJj vNjl5H+8mAFxeYZ3b03PACVetba0jKLGfc3RDNLFNT2tBybAC0bzvt6ZokHPRa7IrmgQ O1RlUJg0ROyBPqTccX4M2+IiUncjAklaEpmyAndPKSuAN8hEuMVJnsjgKsqMh+eKlFOQ h5Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=E6KLR1+5kn9QEx6hulvL29CP9mgiWuC5Xx0TkVZfdYI=; b=H7CpXmuCLVD3qT1cghjwxwovIBDbrDF1dgk8cWnPx3san8rhap7QUe+N6QkhqtBOmk aetUbnyJ2Mm36FnobIGm0ehuuk6YlZjVzMgtdM035pPzl2WXx2Y8F2ZnW/wDg204DXhT k/sPw6cTfwA877XepBWoi/I0wEreQzyPu/xkgxkT1qs9s0KoPNPALtmWrlBVMZY2pmQY +XKhH0Ky7qqTwguW0Zo85VmrV3OYRFg3KqMCWLWMWqwoCLGzfZrEIpFV2EpzKtCZv0Lb mufChwjardweB9ixkAliI1YDKK7uhnu/YBdahtRJaRAzkLQBzMSzWFgC6y9D25jBNXnD g1iw== X-Gm-Message-State: APjAAAU/vW86DFUug7tfue56c5dH5/9dwujSEazCpJdNlXW9Aso1g6bw llrTpR/MJ++vi8l2LHQ9USqMsps0 X-Google-Smtp-Source: APXvYqz9QnOZv4DUMop/xpjyaJEL1vDAmckMWTP1cbJtu/MvsPQQG2zLr+RBqe4A4MhCRZ6tSh5cLw== X-Received: by 2002:aed:3ee7:: with SMTP id o36mr34185555qtf.278.1574183075602; Tue, 19 Nov 2019 09:04:35 -0800 (PST) Received: from saturn.home.sansel.ca (CPE40167ea0e1c2-CM788df74daaa0.cpe.net.cable.rogers.com. [99.228.216.21]) by smtp.gmail.com with ESMTPSA id k27sm9947540qkj.30.2019.11.19.09.04.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Nov 2019 09:04:34 -0800 (PST) From: selva.nair@gmail.com To: openvpn-devel@lists.sourceforge.net Date: Tue, 19 Nov 2019 12:03:43 -0500 Message-Id: <1574183023-6136-1-git-send-email-selva.nair@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1573760407-20662-1-git-send-email-selva.nair@gmail.com> References: <1573760407-20662-1-git-send-email-selva.nair@gmail.com> X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.160.196 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (selva.nair[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.160.196 listed in wl.mailspike.net] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Headers-End: 1iX6vi-00Ckud-1m Subject: [Openvpn-devel] [PATCH v2] Fix ACL_CHECK_ADD_COMPILE_FLAGS to work with clang X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Selva Nair Some compilers (e.g., clang) only issue a warning for unsupported options unless an additional flag such as -Werror is used to convert the warning to an error. The behaviour is unchanged when using gcc as it either errors or ignores unknown options whether or not -Werror is present. Signed-off-by: Selva Nair Acked-By: David Sommerseth --- v2: Do not extend the macro to take an extra argument. Instead, add -Werror while doing the test. The commit message and comment changed to match this. configure.ac | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 807804e5..f4a947d2 100644 --- a/configure.ac +++ b/configure.ac @@ -1275,11 +1275,14 @@ if test "${enable_pkcs11}" = "yes"; then ) fi +# When testing a compiler option, we add -Werror to force +# an error when the option is unsupported. This is not +# required for gcc, but come compilers such as clang needs it. AC_DEFUN([ACL_CHECK_ADD_COMPILE_FLAGS], [ old_cflags="$CFLAGS" - CFLAGS="$1 $CFLAGS" - AC_MSG_CHECKING([whether the compiler acceppts $1]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [AC_MSG_RESULT([yes])], + CFLAGS="$1 -Werror $CFLAGS" + AC_MSG_CHECKING([whether the compiler accepts $1]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [AC_MSG_RESULT([yes])]; CFLAGS="$1 $old_cflags", [AC_MSG_RESULT([no]); CFLAGS="$old_cflags"])] )