From patchwork Thu Nov 14 08:40:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selva Nair X-Patchwork-Id: 920 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.27.255.53]) by backend30.mail.ord1d.rsapps.net with LMTP id eKx+OfetzV1RfwAAIUCqbw for ; Thu, 14 Nov 2019 14:41:44 -0500 Received: from proxy19.mail.iad3a.rsapps.net ([172.27.255.53]) by director8.mail.ord1d.rsapps.net with LMTP id YBjTNvetzV0dJgAAfY0hYg ; Thu, 14 Nov 2019 14:41:43 -0500 Received: from smtp22.gate.iad3a ([172.27.255.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy19.mail.iad3a.rsapps.net with LMTP id CIJJMfetzV3oHgAAXy6Yeg ; Thu, 14 Nov 2019 14:41:43 -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: smtp22.gate.iad3a.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: c852331c-0716-11ea-8ee9-5254005ae9fe-1-1 Received: from [216.105.38.7] ([216.105.38.7:46210] helo=lists.sourceforge.net) by smtp22.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 57/90-13470-6FDADCD5; Thu, 14 Nov 2019 14:41:42 -0500 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1iVKyo-0005Lu-S5; Thu, 14 Nov 2019 19:40:34 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iVKyn-0005Lh-R5 for openvpn-devel@lists.sourceforge.net; Thu, 14 Nov 2019 19:40:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1W7bcKKeUd1xLIG4ClGWsEGC3FA7NAWO16ZwFbZjPQc=; b=j6gnUiOxoIv3eJmmt19SjKV6YN dLjlz+eLPydCwUP3ty0CTw3B69GcTPoVyx1AipXruUxvaowgTYKbX3aYkHsPAgjs9+VdD1uY3J4BZ CL6+2jeEkKBi2MmTfut/yTro1LKPQdR5b1/ZfqzMMta1JM11U9BxsHyaFlTFlaLZ29f8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=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: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1W7bcKKeUd1xLIG4ClGWsEGC3FA7NAWO16ZwFbZjPQc=; b=Yi+BYT4vu55c+I6S2QkDjCj1Ig Q0ag9e5i2faPpsQIu0MxLb/xMDbF6MH69wpqk15ES3gRX3vvq7RCWTuI81H1sCMChIoCkksikFTXE lCT4TdwDDAIZEDjs3qVX1xOgq+4sWGHD+7I4McZoJcLz3wcWpVmmD1hU0cXJRrOBCwfs=; Received: from mail-qk1-f195.google.com ([209.85.222.195]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1iVKyj-00Gxfy-VC for openvpn-devel@lists.sourceforge.net; Thu, 14 Nov 2019 19:40:33 +0000 Received: by mail-qk1-f195.google.com with SMTP id 205so6096307qkk.1 for ; Thu, 14 Nov 2019 11:40:29 -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; bh=1W7bcKKeUd1xLIG4ClGWsEGC3FA7NAWO16ZwFbZjPQc=; b=LsJqKgheA5ykTf1rigkKRrYLHO/UACGZ3mXU+mIF9FvtWLOld8wKMhqIinUJJQEEpu dVwnFTIeDXiBNkJdujHadKOSu7q7NP7vCWtHWUhXoenqUvGHxDBbRUr17Pz/CrbMgkMs 3dIks3fkN/V2C1zvI38ELK9EGM0v8FAaFF7FRTLoPUC17XIwjKae4p1qmXALF71IN3yf dH9XXZBNjmC7qkrEOW8Fe8UZPIiIaGLVhsmvcPMDPs7grqqJb0W3h7w2xmlqhy2+HlgH yWF8R1EHAtcLKYsM0EeZpv20O8W8opiOtg0A0bpUlVnx7rlb6Ey70Z78al9IXXPsUkyZ 6vyQ== 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; bh=1W7bcKKeUd1xLIG4ClGWsEGC3FA7NAWO16ZwFbZjPQc=; b=rT2ZLNjcOsY3eSjrJVRgvhyJEdWPP9dqLqG6Ulrmj4vsDBM6ZEpjIMdyue9mFWg576 eGaKR5VAYxSGeHG5eCNKok/hfikWTImghzHe9h1zQNQ10Dj63yW60a1gJuGnQkJ5vpoh ka1TYq36hDcbeCMOguomgv4mfNypSDSAPPzHIFLAAIqkJudq4yVmeZHVGJkI00OZC/KZ GxwwgfEt3LZAUlQOrxS2ig1m2p9hnVbRJqPuXcR5PEDM8VIy45GJyqtQV4d980tpTF1j jrOMZ/bIVcxfXlR6tqAj9xfaFkX7xw4Tx3xHr5EqIDj2FuRkiVDj9ff0oQ+ptmhRvWrI 6s2Q== X-Gm-Message-State: APjAAAVM2rAsbCWmZVHqoJpOhd0sivPftBbLJePI1MLcHxiK4Vh0Zi3n qLmBvkHgwzkdGFaFc3ReyjC/tS6a X-Google-Smtp-Source: APXvYqwIbZUT9FSuVDDQU2r7/h2BoVnkJCwOwb7Wa1BWpf03QVRHTYQiTGY12XOzoL7h4XmAIYVeMQ== X-Received: by 2002:a05:620a:1677:: with SMTP id d23mr8852255qko.341.1573760423637; Thu, 14 Nov 2019 11:40:23 -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 x25sm2928607qki.63.2019.11.14.11.40.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Nov 2019 11:40:23 -0800 (PST) From: selva.nair@gmail.com To: openvpn-devel@lists.sourceforge.net Date: Thu, 14 Nov 2019 14:40:07 -0500 Message-Id: <1573760407-20662-1-git-send-email-selva.nair@gmail.com> X-Mailer: git-send-email 2.1.4 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (selva.nair[at]gmail.com) -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.222.195 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.222.195 listed in list.dnswl.org] 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: configure.ac] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 X-Headers-End: 1iVKyj-00Gxfy-VC Subject: [Openvpn-devel] [PATCH] 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 additional flags such as -Werror are used to convert the warning to an error. Add support for extra flags in ACL_CHECK_ADD_COMPILE_FLAGS. Note: a similar approach is used in AX_CHECK_COMPILE_FLAG in autoconf archives. Signed-off-by: Selva Nair Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-By: Arne Schwabe --- For successful travis build result see https://travis-ci.org/selvanair/openvpn/builds/612019849 But this + https://patchwork.openvpn.net/patch/908/ alone does not fix the travis build as clang is not happy with struct initializers: Like this crypto.c:1860:31: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] struct key server_key = { 0 }; I think clang wants {{0}} there. Darn compilers and darn -Werror :) configure.ac | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 807804e5..e59bd91b 100644 --- a/configure.ac +++ b/configure.ac @@ -1275,18 +1275,21 @@ if test "${enable_pkcs11}" = "yes"; then ) fi +# Usage: ACL_CHECK_ADD_COMPILE_FLAGS(flag, [extra-flags]) +# Some compilers require extra flags to trigger an error on +# unsupported options. E.g., clang requires -Werror. 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="$2 $1 $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"])] ) -ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-stringop-truncation]) -ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-unused-function]) -ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-unused-parameter]) -ACL_CHECK_ADD_COMPILE_FLAGS([-Wall]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-stringop-truncation], [-Werror]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-unused-function], [-Werror]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-unused-parameter], [-Werror]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wall], [-Werror]) if test "${enable_pedantic}" = "yes"; then enable_strict="yes"