From patchwork Thu Jan 7 14:00:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nick Clifton X-Patchwork-Id: 564309 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 297641402C9 for ; Fri, 8 Jan 2016 01:01:07 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=i8JrAx54; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; q=dns; s= default; b=LdwYpdV3+1OKajWhMzfdiSTtFOZQm9fjjph3BTY9MEcpUcA5LBtPs K2AF/t2ipAiGcBa0Zjj8zAuUlf3QAduZUtq+GIFkh5QkiXvhptz5hFpJd9zd5qIB Uz2vXE7HZvg8rErrGcIOubtE4pkvZtHpPPVJR1w7n/W4pQIQTU3zOw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=default; bh=ZrYs47+Nr+2fvg+lL4TeT3p6oT0=; b=i8JrAx54nP8DZBg5NwaRx4/me+X+ GfOku/BVWs5Das7kTM76GffbyS26qhRPSzUBfuDEQROqNjn3Dnklz6cAGoFM9xhK tuOQSA0Ziwk2gH3CQ5aPpi1UcyjzkvzwNU6MBsiwQbO0r9yI94YdLp/nUuduoCmo uMqmjiEzCvIasyA= Received: (qmail 3192 invoked by alias); 7 Jan 2016 14:00:52 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 2964 invoked by uid 89); 7 Jan 2016 14:00:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-3.2 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=won=e2, collect2, dhumires, d'humi=c3=a8res?= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 07 Jan 2016 14:00:48 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id ABF7B120480; Thu, 7 Jan 2016 14:00:46 +0000 (UTC) Received: from [10.36.5.208] (vpn1-5-208.ams2.redhat.com [10.36.5.208]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u07E0jcv016361 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 7 Jan 2016 09:00:46 -0500 Subject: Re: RFA: PR 68913: Provide weak version of __fread_chk for PR61886 test To: "=?UTF-8?Q?Dominique_d'Humi=c3=a8res?=" References: Cc: gcc-patches From: Nick Clifton Message-ID: <568E6F8C.10006@redhat.com> Date: Thu, 7 Jan 2016 14:00:44 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: X-IsSubscribed: yes Hi Dominique, On 07/01/16 13:42, Dominique d'Humières wrote: >> +/* { dg-lto-options { { -flto -O2 -Werror -Wl,--defsym,__fread_chk=0x1234 } } } */ > > This won’t work on darwin: > > ld: unknown option: --defsym > collect2: error: ld returned 1 exit status Oh bananas. Does the pr61886 test work on Darwin without any changes ? If it fails then is there a Darwin linker command line option to define a symbol ? This revised version of the patch works for me, but I do not have a Darwin native system on which I can test it. Would you be able to try it out for me ? Cheers Nick typedef struct _IO_FILE FILE; Index: gcc/testsuite/gcc.dg/lto/pr61886_0.c =================================================================== --- gcc/testsuite/gcc.dg/lto/pr61886_0.c (revision 232123) +++ gcc/testsuite/gcc.dg/lto/pr61886_0.c (working copy) @@ -1,5 +1,6 @@ /* { dg-lto-do link } */ /* { dg-lto-options { { -flto -O2 -Werror } } } */ +/* { dg-extra-ld-options "-Wl,--defsym,__fread_chk=0x1234" { target { ! { *-*-darwin* } } } } */ typedef __SIZE_TYPE__ size_t;