From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15408 invoked by alias); 15 Jan 2013 19:46:01 -0000 Received: (qmail 15397 invoked by uid 22791); 15 Jan 2013 19:46:00 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Jan 2013 19:45:54 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1TvCSG-0000GC-8L from Janis_Johnson@mentor.com ; Tue, 15 Jan 2013 11:45:52 -0800 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 15 Jan 2013 11:45:52 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Tue, 15 Jan 2013 11:45:51 -0800 Message-ID: <50F5B26D.8030705@mentor.com> Date: Tue, 15 Jan 2013 19:46:00 -0000 From: Janis Johnson Reply-To: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: Subject: [testsuite] add option to LTO flags for c-torture/execute/builtins tests Content-Type: multipart/mixed; boundary="------------050304090605030103000300" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg00801.txt.bz2 --------------050304090605030103000300 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Content-length: 602 Most of the tests in gcc.c-torture/execute/builtins that use LTO torture options "-O2 -flto -fuse-linker-plugin -fno-fat-lto-objects" fail to link on EABI and ELF targets with multiple definitions for either memset or strlen. I filed PR testsuite/55994 and was told that the fix is to run the tests for those targets with "-Wl,--allow-multiple-definition". This patch adds that option to the flags used for the builtins tests for EABI and ELF targets. That option is probably also needed for RTEMS targets; I've copied Joel so he can look into that. Tested on arm-none-eabi; OK for mainline? Janis --------------050304090605030103000300 Content-Type: text/plain; name="gcc-20130115-1" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gcc-20130115-1" Content-length: 839 2013-01-15 Janis Johnson PR testsuite/55994 * gcc.c-torture/execute/builtins/builtins.exp: Add -Wl,--allow-multiple-definition for eabi and elf targets. Index: testsuite/gcc.c-torture/execute/builtins/builtins.exp =================================================================== --- testsuite/gcc.c-torture/execute/builtins/builtins.exp (revision 195211) +++ testsuite/gcc.c-torture/execute/builtins/builtins.exp (working copy) @@ -41,6 +41,10 @@ if [istarget "powerpc-*-darwin*"] { lappend additional_flags "-Wl,-multiply_defined,suppress" } +if { [istarget *-*-eabi*] + || [istarget *-*-elf] } { + lappend additional_flags "-Wl,--allow-multiple-definition" +} foreach src [lsort [find $srcdir/$subdir *.c]] { if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} { --------------050304090605030103000300--