From patchwork Sat Jul 25 20:50:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 1336330 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BDdWy0K3Xz9sRN for ; Sun, 26 Jul 2020 06:51:08 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5312A3857C6B; Sat, 25 Jul 2020 20:51:05 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp1.wavenetuk.net (smtp.wavenetuk.net [195.26.36.10]) by sourceware.org (Postfix) with ESMTP id 8B05B3857C58 for ; Sat, 25 Jul 2020 20:51:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8B05B3857C58 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=iain@sandoe.co.uk Received: from [192.168.1.212] (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by smtp1.wavenetuk.net (Postfix) with ESMTPA id C14071200F86 for ; Sat, 25 Jul 2020 21:51:00 +0100 (BST) From: Iain Sandoe Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [pushed] C++, testsuite: Adjust pure-virtual1.C options for Darwin. Message-Id: <5E4F5178-C907-41BA-A397-D800E1BE15B3@sandoe.co.uk> Date: Sat, 25 Jul 2020 21:50:35 +0100 To: gcc-patches@gcc.gnu.org X-Mailer: Apple Mail (2.3273) X-Spam-Status: No, score=-17.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_COUK, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KHOP_HELO_FCRDNS, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi, Darwin's static linker expects, by default, that all linkage will be satisfied (even for weak items). This allows the two-level namespace to work even for weak cases. However, there's an option to make it behave in a similar manner to ELF. This is needed for the pure-virtual1.C testcase to pass on Darwin. tested on x86_64-darwin and linux, pushed to master thanks Iain gcc/testsuite/ChangeLog: * g++.dg/abi/pure-virtual1.C: Add dynamic_lookup option for Darwin. --- gcc/testsuite/g++.dg/abi/pure-virtual1.C | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/g++.dg/abi/pure-virtual1.C b/gcc/testsuite/g++.dg/abi/pure-virtual1.C index 86cc9f63db1..538e2cb097a 100644 --- a/gcc/testsuite/g++.dg/abi/pure-virtual1.C +++ b/gcc/testsuite/g++.dg/abi/pure-virtual1.C @@ -2,6 +2,7 @@ // { dg-do link } // { dg-require-weak } // { dg-additional-options "-fno-rtti -nodefaultlibs -lc" } +// { dg-additional-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } // { dg-xfail-if "AIX weak" { powerpc-ibm-aix* } } struct A