From patchwork Thu Jul 23 12:03:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Clifton X-Patchwork-Id: 499362 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 EF6AA140D18 for ; Thu, 23 Jul 2015 22:03:31 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=x8ykwZcj; 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:to:cc :from:subject:message-id:date:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=v0gY5DkqKy63p1Ui /otFxI3PE/Lys+59emWF/Xb3Ip7HhNBnOw6RtJ1KC3k6AekjORoze4gcmJ2AnrBF +gvjbaqM4PORplcuLQTeX/gh5ulnCBAegCwedAoU4GLd1Rj/z3tgZfEDr/MjMS3k /048h/cX/zTZ7m2JWeRoz3zItew= 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:to:cc :from:subject:message-id:date:mime-version:content-type :content-transfer-encoding; s=default; bh=Pzjea1PHGYySMIJYnKGN7p FdWPA=; b=x8ykwZcjuxwqt3eJx2K01mT/pWYoZOt5PbHh2ibBd0t+FIlkavTNQk Y3RZiJ1gep6flzC9zFM/5DahveMXKUlnJBQYG8uEnuD2HOxajmy949lrPYl0k5w4 pOgTpT+kDPa5phGLMb9euqe0gtvpHnttnVJjcLTcF0+F3ZRNmwMLA= 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-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 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 13:03:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 X-IsSubscribed: yes 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)