From patchwork Tue Sep 14 14:45:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Howarth X-Patchwork-Id: 64705 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]) by ozlabs.org (Postfix) with SMTP id 64E2AB6F14 for ; Wed, 15 Sep 2010 00:45:48 +1000 (EST) Received: (qmail 3864 invoked by alias); 14 Sep 2010 14:45:47 -0000 Received: (qmail 3856 invoked by uid 22791); 14 Sep 2010 14:45:46 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Tue, 14 Sep 2010 14:45:40 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id 55FFAB004B; Tue, 14 Sep 2010 10:45:37 -0400 (EDT) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id o8EEjaRF010082; Tue, 14 Sep 2010 10:45:36 -0400 Date: Tue, 14 Sep 2010 10:45:36 -0400 From: Jack Howarth To: gcc-patches@gcc.gnu.org Cc: nathan@codesourcery.com, mikestump@comcast.net, richard.guenther@gmail.com Subject: [PATCH][Revised] eliminate UNRESOLVED errors on attr-ifunc-[1, 5].c/attr-ifunc-[1, 4].C Message-ID: <20100914144536.GA10080@bromo.med.uc.edu> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) 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 Currently on targets like darwin which lack alias support in their object format, the gcc.dg/attr-ifunc-[1,5].c and g++.dg/ext/attr-ifunc-[1,4].C test cases produce UNRESOLVED testsuite results... Executing on host: /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/ -c -m32 -o if unc94739.o ifunc94739.c (timeout = 300) ifunc94739.c:5:18: error: only weak aliases are supported in this configuration^M compiler exited with status 1 output is: ifunc94739.c:5:18: error: only weak aliases are supported in this configuration^M UNRESOLVED: gcc.dg/attr-ifunc-1.c UNSUPPORTED: gcc.dg/attr-ifunc-1.c UNRESOLVED: gcc.dg/attr-ifunc-2.c UNSUPPORTED: gcc.dg/attr-ifunc-2.c UNRESOLVED: gcc.dg/attr-ifunc-3.c UNSUPPORTED: gcc.dg/attr-ifunc-3.c UNRESOLVED: gcc.dg/attr-ifunc-4.c UNSUPPORTED: gcc.dg/attr-ifunc-4.c UNRESOLVED: gcc.dg/attr-ifunc-5.c UNSUPPORTED: gcc.dg/attr-ifunc-5.c This due to the fact that, unlike check_alias_available(), check_ifunc_available() doesn't handle the case of targets that support only weak aliases. Tested on x86_64-apple-darwin10. Okay for gcc trunk? Jack 2010-09-14 Jack Howarth * lib/target-supports.exp (check_alias_available): Handle weak aliases only. Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp (revision 164258) +++ gcc/testsuite/lib/target-supports.exp (working copy) @@ -408,7 +408,12 @@ verbose "check_ifunc_available target does not support ifunc" 2 set ifunc_available_saved 0 } else { - set ifunc_available_saved -1 + if [regexp "only weak aliases are supported" $lines] { + verbose "check_ifunc_available target supports only weak aliases" 2 + set ifunc_available_saved 1 + } else { + set ifunc_available_saved -1 + } } }