From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100473 invoked by alias); 23 Jul 2015 12:03:25 -0000 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 Received: (qmail 100464 invoked by uid 89); 23 Jul 2015 12:03:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 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, 23 Jul 2015 12:03:23 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id CB02B31F029; Thu, 23 Jul 2015 12:03:21 +0000 (UTC) Received: from [10.36.5.223] (vpn1-5-223.ams2.redhat.com [10.36.5.223]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6NC3J9Z024289 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 23 Jul 2015 08:03:20 -0400 To: "hpenner@de.ibm.com uweigand"@de.ibm.com, Andreas.Krebbel@de.ibm.com, Ulrich Weigand Cc: gcc-patches From: Nick Clifton Subject: s390-linux fails to build Message-ID: <55B0D807.90808@redhat.com> Date: Thu, 23 Jul 2015 12:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg01929.txt.bz2 Hi Helmut, Hi Ulrich, Hi Andreas, A toolchain configured as --target=s390-linux currently fails to build gcc because of an undefined function: undefined reference to `s390_host_detect_local_cpu(int, char const**)' Makefile:1858: recipe for target 'xgcc' failed The patch below fixes the problem for me by adding a stub function in s390-common.c, but I am not sure if it is the correct solution. Please can you advise ? Cheers Nick Index: gcc/common/config/s390/s390-common.c =================================================================== --- gcc/common/config/s390/s390-common.c (revision 226094) +++ gcc/common/config/s390/s390-common.c (working copy) @@ -119,6 +119,14 @@ } } +const char * s390_host_detect_local_cpu (int, const char **) __attribute__((weak)); +const char * +s390_host_detect_local_cpu (int argc ATTRIBUTE_UNUSED, + const char **argv ATTRIBUTE_UNUSED) +{ + return NULL; +} + #undef TARGET_DEFAULT_TARGET_FLAGS #define TARGET_DEFAULT_TARGET_FLAGS (TARGET_DEFAULT)