From patchwork Sun Nov 10 09:17:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 908 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director7.mail.ord1d.rsapps.net ([172.27.255.52]) by backend30.mail.ord1d.rsapps.net with LMTP id +A1JBq1wyF1PFgAAIUCqbw for ; Sun, 10 Nov 2019 15:18:53 -0500 Received: from proxy7.mail.iad3a.rsapps.net ([172.27.255.52]) by director7.mail.ord1d.rsapps.net with LMTP id UGINBK1wyF30dQAAovjBpQ ; Sun, 10 Nov 2019 15:18:53 -0500 Received: from smtp3.gate.iad3a ([172.27.255.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy7.mail.iad3a.rsapps.net with LMTP id 0Ck/OqxwyF2AUgAAnPvY+A ; Sun, 10 Nov 2019 15:18:52 -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: smtp3.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; dmarc=none (p=nil; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: 4fe39ce4-03f7-11ea-8065-525400af4d07-1-1 Received: from [216.105.38.7] ([216.105.38.7:45228] helo=lists.sourceforge.net) by smtp3.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id A7/7D-31762-CA078CD5; Sun, 10 Nov 2019 15:18:52 -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 1iTtej-00083C-2J; Sun, 10 Nov 2019 20:17:53 +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 1iTtei-000835-1v for openvpn-devel@lists.sourceforge.net; Sun, 10 Nov 2019 20:17:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: 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=Zc/9xQrfQGBRr3v1cPi25rEil9VgrljEnCJbOND2XmI=; b=EAxWvD08q2PNJRDHfQrtW0dz3M Vkd/VZdk1GbiBSDRxuZ9bvZjzveFXEhNBiRQp257Ozm/NSFyc10lPL5pFPvtruM1eD+nNmXIip3Dg BlvMUPRVHCy9248QpJZuuQc7ipVAum10oXYN0RvvzSTGkiS9vjNEfVQh2iAke8K2b3OA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: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=Zc/9xQrfQGBRr3v1cPi25rEil9VgrljEnCJbOND2XmI=; b=FDrxcDFgQTlySSNBqtmhFQlapi 0cFuvCePsv4+oUHtDHGx+BZvGiAz3dIuwIGxhjBL1X4TLkSNW2ireVP5jaX3XJXVMjAlCqa0xpx9D G1Q971Gy1JV1cbQLsIfgTOOErEfB/utHZCxA9sn009chzsHiwvCymtNSbVHVc7EW/zxw=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1iTteg-00B73G-LV for openvpn-devel@lists.sourceforge.net; Sun, 10 Nov 2019 20:17:52 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Sun, 10 Nov 2019 21:17:18 +0100 Message-Id: <20191110201718.31032-1-a@unstable.cc> In-Reply-To: <20191110195622.28177-1-a@unstable.cc> References: <20191110195622.28177-1-a@unstable.cc> MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [5.148.176.60 listed in list.dnswl.org] 0.1 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1iTteg-00B73G-LV Subject: [Openvpn-devel] [PATCH v2] travis: fix CFLAGS assignment error and add -Werror only when compiling on Linux for Linux 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: , Cc: Antonio Quartulli Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox CFLAGS may not resolve to anything and the build-check.sh script would just fail. Switch to EXTRA_FLAGS and use proper substitution so that the script won't error out when EXTRA_FLAGS is uninitialized. At the same time ensure that such flag is set only when compiling *for* linux (we use linux to also compile *for* windows) Signed-off-by: Antonio Quartulli Acked-By: Arne Schwabe --- Tested on travis: https://travis-ci.org/ordex/openvpn/builds/610047381 Changes from v1: - use EXTRA_CONFIG with --enable-werror instead of adding -Werror manually to the CFLAGS - make sure to add werror directive *before* executing ./configure command .travis/build-check.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis/build-check.sh b/.travis/build-check.sh index 250bb454..f794704c 100755 --- a/.travis/build-check.sh +++ b/.travis/build-check.sh @@ -8,7 +8,6 @@ fi if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export LD_LIBRARY_PATH="${PREFIX}/lib:${LD_LIBRARY_PATH:-}" - export CFLAGS="${CFLAGS} -Werror" fi if [ "${TRAVIS_OS_NAME}" = "osx" ]; then @@ -18,10 +17,15 @@ fi autoreconf -vi if [ -z ${CHOST+x} ]; then + if [ "${TRAVIS_OS_NAME}" = "linux" ]; then + export EXTRA_CONFIG="${EXTRA_CONFIG:-} --enable-werror" + fi ./configure --with-crypto-library="${SSLLIB}" ${EXTRA_CONFIG:-} || (cat config.log && exit 1) make -j$JOBS src/openvpn/openvpn --version || true - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd src/openvpn/openvpn; fi + if [ "${TRAVIS_OS_NAME}" = "linux" ]; then + ldd src/openvpn/openvpn; + fi if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L src/openvpn/openvpn; fi make check ${EXTRA_SCRIPT:-}