From patchwork Thu Jul 21 21:56:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 106177 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 3D79DB6F70 for ; Fri, 22 Jul 2011 07:56:38 +1000 (EST) Received: (qmail 23738 invoked by alias); 21 Jul 2011 21:56:37 -0000 Received: (qmail 23727 invoked by uid 22791); 21 Jul 2011 21:56:36 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, TW_ZJ, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.213.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 21 Jul 2011 21:56:20 +0000 Received: by yxi19 with SMTP id 19so986250yxi.20 for ; Thu, 21 Jul 2011 14:56:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.117.1 with SMTP id p1mr412255wfc.420.1311285379633; Thu, 21 Jul 2011 14:56:19 -0700 (PDT) Received: by 10.142.89.19 with HTTP; Thu, 21 Jul 2011 14:56:19 -0700 (PDT) Date: Thu, 21 Jul 2011 23:56:19 +0200 Message-ID: Subject: [PATCH, testsuite]: Fix detection of ifunc support From: Uros Bizjak To: gcc-patches@gcc.gnu.org Cc: Nathan Sidwell 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 Hello! Revision 164725 [1] broke detection of ifunc support in the testsuite [2] due to extra "#endif" without if in the test function. Attached patch fixes this up. 2011-07-21 Uros Bizjak * lib/target-supports.exp (check_ifunc_available): Fix test function. The patch is tested on x86_64-pc-linux-gnu, but my toolchain does not support ifunc attribute. Can somebody please test it with ifunc support? OTOH, the patch is kind of obvious, so OK for mainline? [1] http://gcc.gnu.org/viewcvs?view=revision&revision=164725 [2] http://gcc.gnu.org/viewcvs/trunk/gcc/testsuite/lib/target-supports.exp?r1=164725&r2=164724&pathrev=164725 Uros. Index: lib/target-supports.exp =================================================================== --- lib/target-supports.exp (revision 176584) +++ lib/target-supports.exp (working copy) @@ -381,10 +381,8 @@ set obj ifunc[pid].o verbose "check_ifunc_available compiling testfile $src" 2 set f [open $src "w"] - puts $f "#endif" puts $f "#ifdef __cplusplus\nextern \"C\"\n#endif" - puts $f "void g() {}" - puts $f "void f() __attribute__((ifunc(\"g\")));" + puts $f "void g() {} f() __attribute__((ifunc(\"g\")));" close $f set lines [${tool}_target_compile $src $obj object ""] file delete $src