From patchwork Thu Jun 29 21:56:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 3259 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7301:3c07:b0:d9:b492:11d6 with SMTP id ki7csp2112810dyb; Thu, 29 Jun 2023 14:56:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4fSKQaTDTwaeY/IzwxJq1nPzryULEZkvjqHhtEroYpVK3hq2EUl9R6W0odpc2isThRm/ze X-Received: by 2002:a17:90b:291:b0:262:ec04:4ff7 with SMTP id az17-20020a17090b029100b00262ec044ff7mr6944515pjb.16.1688075805591; Thu, 29 Jun 2023 14:56:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688075805; cv=none; d=google.com; s=arc-20160816; b=PDLepYrswk8UOEDvxO91vIxASMNlJxPV5zHGg5u9NPNxQPGaZmcKJuAA+2R2hI3sI/ c32OIbpd4rSRDxoIyRw8/PIzoOUX0O+IYilrZJ2dLe46OYLuzLGgIJQmFqdeY2ZFJbJC ppqieNjgLVJAeBzgZDjdzKdBf4gQOkV4WAxUDQvakiGJNB+Dn/v3TilJL+WZ/b+dQjSn dC7iuGyhhOsuKCeX7WjXlRId6oDuDTgLKnCLKVhodc5z+mRHc2LZRdNDrbjB7fq7NU2n IDmFdiIc/y80pFPUMKTbBAzVAeKXXcfQrj5LXBG7D4feag4+5SEMUqCaLk+D42zNzW6j 4/Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature; bh=qqeSINV34gEHcYvE5FIOjnj5bHIV58KA8KCQAERlMO0=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=mXBwwIvF57Qx9Nipa5DVyp4GsBIq3g1r81LgdC/k71SrUbf8HVPOdyDK7oO45Df7vL 2POwffmxQY/XMosVnOEZ7Wmf6uMDtnhh2RHCxKR6Bg/74Nv3N32oP5qeVZBEnLIbDr8p E68zbR+YXDaqCnLQ+LcEDC13B0zsaCiT96I4XxX5itwlOe74DypIXyhXgcWhahn7jYyU mVX1iygN587dYCj1u+YjIgUaOKjPamqHvYVj9Qu+j+1s4StR9OcERtfXmYGHE/oIiFVG TA37Wo6dYhtI+DRAd9kPClafQcZKDGz+Na81QBSE9RcH6C45SiAZcWSr2uehhmQH3EYK dFew== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=XJ6gZvXA; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=d4cH4tRf; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id nl6-20020a17090b384600b0025ef1357d96si12157262pjb.67.2023.06.29.14.56.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2023 14:56:45 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=XJ6gZvXA; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=d4cH4tRf; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net 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.95) (envelope-from ) id 1qEzcr-0005nq-Oo; Thu, 29 Jun 2023 21:56:29 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qEzcm-0005nd-Oo for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 21:56:24 +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:To:From:Sender:Reply-To:Cc: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=8EzTnpSADILEZHMdKt6dHfwh4IGTYoIOn241J0eqCrg=; b=XJ6gZvXAtm9cDDHTeMCW6cs4g6 JFw+Y1idVUwSQA0/iG+u+LI6efq7YIp+pa1/8L9ESMgh1j4Q7dK73re9vK56Nw9Yi79340zQlTU4C HsvmEwTH6YATnSaFbFp3crFx+2r+DZMiZ/BInackrhGTtHMk4iGDboEoV7jVm0s3AXsk=; 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:To:From:Sender:Reply-To:Cc: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=8EzTnpSADILEZHMdKt6dHfwh4IGTYoIOn241J0eqCrg=; b=d4cH4tRfJ5JMUodTcRHF+nXJmC bmEvtZIU5XyVtNZVwHYXv+ITZmD5mFi/BGCSfVeaoMwJO0HYRMDmSza22BiZlKkIz/vnzx0fR686c Fgjj4rpHL96ZJQQdTeSbuHZpTlbw2ZwBjLh+EVAQJ9roY5Y1rmtyi+ONh5cWja6vKJT4=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qEzcm-0002GS-6p for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 21:56:24 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1qEzcZ-0004Wb-He for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 23:56:11 +0200 Received: (nullmailer pid 3292844 invoked by uid 10006); Thu, 29 Jun 2023 21:56:11 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Thu, 29 Jun 2023 23:56:10 +0200 Message-Id: <20230629215611.3292788-5-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230629215611.3292788-1-arne@rfc2549.org> References: <20230629215611.3292788-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This avoids build errors on macOS. Also the test_tls_crypt command works just fine on FreeBSD with its linkers, so do not make that test Linux only. Change-Id: Id26676bdc576c7d3d6726afa43fe6c7a397c579b Signed-off-by: Arne Schwabe --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) Content analysis details: (0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1qEzcm-0002GS-6p Subject: [Openvpn-devel] [PATCH 3/4] Check if the -wrap argument is actually supported by the platform's ld 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1770075776015255584?= X-GMAIL-MSGID: =?utf-8?q?1770075776015255584?= This avoids build errors on macOS. Also the test_tls_crypt command works just fine on FreeBSD with its linkers, so do not make that test Linux only. Change-Id: Id26676bdc576c7d3d6726afa43fe6c7a397c579b Signed-off-by: Arne Schwabe --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index acebbb73c..d2445b414 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ find_package(PkgConfig REQUIRED) include(CheckSymbolExists) include(CheckIncludeFiles) include(CheckCCompilerFlag) +include(CheckLinkerFlag) include(CheckTypeSize) include(CheckStructHasMember) include(CTest) @@ -560,18 +561,20 @@ if (BUILD_TESTING) ) endif () - if (NOT MSVC) - # MSVC does not support --wrap + # MSVC and Apple's LLVM ld do not support --wrap + check_linker_flag(C -Wl,--wrap=parse_line LD_SUPPORTS_WRAP) + + if (${LD_SUPPORTS_WRAP}) list(APPEND unit_tests "test_argv" + "test_tls_crypt" ) endif () - # These tests work on only on Linux since they depend on special linker features + # These tests work on only on Linux since they depend on special Linux features if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") list(APPEND unit_tests "test_networking" - "test_tls_crypt" ) endif ()