From nobody Mon Feb 9 16:02:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=yadro.com ARC-Seal: i=1; a=rsa-sha256; t=1566404060; cv=none; d=zoho.com; s=zohoarc; b=VUak99jXkAlJ0z0VdixfpJEGV43s6CyHwPZjF4n6XnDE274cqWrQZ4PtVG4R9RQ49Tk5Ao+ak1JkwQdXrKJqIj44bLhWQG3Oq+gPpq2lFFH/iZ6RWmSlnYqQOk5uF95A8s/l3REVCXcZHRz2WkaafSRTkX2LOMzFQmSDqA7+//I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566404060; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=4rpJQvXdB4MJJ4zO6d8oLb/dlmAirB33Yxp1GeGb2x4=; b=jERd6qitnnaoGHMHVycWF9cnOmMlwJX2hBOiZAr6Qoi97BhwMAuYLVNhJHR7HqPDC7QJRKaGNjQrB+fwD6RWwRDQM3Stw5WtbnAd8lcqufdt0EGSVapqlDZPWVQx5Hc9529XasHZq9ijl2tBboHidmxAPAYa8t0vqGEHju7/+cY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1566404060862517.9245884429484; Wed, 21 Aug 2019 09:14:20 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8E8B03023087; Wed, 21 Aug 2019 16:14:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6896B381A5; Wed, 21 Aug 2019 16:14:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 345D924F30; Wed, 21 Aug 2019 16:14:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7LGEDnl016885 for ; Wed, 21 Aug 2019 12:14:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id DDEBD17D94; Wed, 21 Aug 2019 16:14:13 +0000 (UTC) Received: from mx1.redhat.com (ext-mx29.extmail.prod.ext.phx2.redhat.com [10.5.110.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D82C55DD6F for ; Wed, 21 Aug 2019 16:14:13 +0000 (UTC) Received: from mta-01.yadro.com (mta-02.yadro.com [89.207.88.252]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 143AF1918645 for ; Wed, 21 Aug 2019 16:14:01 +0000 (UTC) Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id CE23442EE3 for ; Wed, 21 Aug 2019 16:13:54 +0000 (UTC) Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ylrzky6zSfIs for ; Wed, 21 Aug 2019 19:13:53 +0300 (MSK) Received: from T-EXCH-02.corp.yadro.com (t-exch-02.corp.yadro.com [172.17.10.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id 651C742EDA for ; Wed, 21 Aug 2019 19:13:52 +0300 (MSK) Received: from localhost (172.17.128.60) by T-EXCH-02.corp.yadro.com (172.17.10.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Wed, 21 Aug 2019 19:13:52 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received:received; s=mta-01; t= 1566404033; x=1568218434; bh=UD0BsXm7WgW3o/KSLiUQiPSYNXANO0u0/iE E8VUYhkE=; b=HVtavTo0dwkJtAg+oN2yru3sWA4fgz0s1zf6Ox75ig8nwb1Mu0u hnJ0CKlrKvDNNcxDI7jD5m8CZJfENi9vsehmEPSfV+F0QwT0NeEispH+7HztiYNZ K4J37jjwjdIGTPHgv0r8gc7XDeQdSKgzCWlp5jhtUGW5ipwKPzpJusGk= X-Virus-Scanned: amavisd-new at yadro.com From: Roman Bolshakov To: Date: Wed, 21 Aug 2019 19:13:19 +0300 Message-ID: <20190821161323.1583-8-r.bolshakov@yadro.com> In-Reply-To: <20190821161323.1583-1-r.bolshakov@yadro.com> References: <20190821161323.1583-1-r.bolshakov@yadro.com> MIME-Version: 1.0 X-Originating-IP: [172.17.128.60] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-02.corp.yadro.com (172.17.10.102) X-Greylist: Sender passed SPF test, ACL 264 matched, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Wed, 21 Aug 2019 16:14:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Wed, 21 Aug 2019 16:14:01 +0000 (UTC) for IP:'89.207.88.252' DOMAIN:'mta-02.yadro.com' HELO:'mta-01.yadro.com' FROM:'r.bolshakov@yadro.com' RCPT:'' X-RedHat-Spam-Score: -0.1 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_NONE, SPF_PASS) 89.207.88.252 mta-02.yadro.com 89.207.88.252 mta-02.yadro.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.70 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Roman Bolshakov Subject: [libvirt] [PATCH 07/11] build: Use flat namespace for libvirt on macOS X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 21 Aug 2019 16:14:20 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" >From ld(1): By default all references resolved to a dynamic library record the library to which they were resolved. At runtime, dyld uses that information to directly resolve symbols. The alternative is to use the -flat_namespace option. With flat namespace, the library is not recorded. At runtime, dyld will search each dynamic library in load order when resolving symbols. This is slower, but more like how other operating systems resolve symbols. That fixes the set of tests that preload a mock library to replace library symbols: qemublocktest qemumonitorjsontest viriscsitest virmacmaptest virnetserverclienttest Signed-off-by: Roman Bolshakov Reviewed-by: Daniel P. Berrang=C3=A9 --- configure.ac | 1 + src/Makefile.am | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index f41c6d5d86..852b464e97 100644 --- a/configure.ac +++ b/configure.ac @@ -212,6 +212,7 @@ fi =20 AM_CONDITIONAL([WITH_LINUX], [test "$with_linux" =3D "yes"]) AM_CONDITIONAL([WITH_FREEBSD], [test "$with_freebsd" =3D "yes"]) +AM_CONDITIONAL([WITH_MACOS], [test "$with_macos" =3D "yes"]) =20 # We don't support the daemon yet if test "$with_win" =3D "yes" ; then diff --git a/src/Makefile.am b/src/Makefile.am index 817a7ecf34..adaf61350a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -579,8 +579,13 @@ libvirt_la_LDFLAGS =3D \ -version-info $(LIBVIRT_VERSION_INFO) \ $(LIBVIRT_NODELETE) \ $(NO_UNDEFINED_LDFLAGS) \ - $(AM_LDFLAGS) \ - $(NULL) + $(AM_LDFLAGS) +if WITH_MACOS +# macOS has two-level namespaces by default. +# Override it to allow symbol replacement with DYLD_INSERT_LIBRARIES +libvirt_la_LDFLAGS +=3D -Wl,-flat_namespace +endif WITH_MACOS +libvirt_la_LDFLAGS +=3D $(NULL) libvirt_la_BUILT_LIBADD +=3D ../gnulib/lib/libgnu.la libvirt_la_LIBADD +=3D \ $(DRIVER_MODULES_LIBS) \ --=20 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list