NetBSD Problem Report #54731

From www@netbsd.org  Mon Dec  2 07:50:19 2019
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 6FDC17A166
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  2 Dec 2019 07:50:19 +0000 (UTC)
Message-Id: <20191202075018.4DA2B7A1AD@mollari.NetBSD.org>
Date: Mon,  2 Dec 2019 07:50:18 +0000 (UTC)
From: adr@sdf.org
Reply-To: adr@sdf.org
To: gnats-bugs@NetBSD.org
Subject: cross/arm-none-eabi-gcc fails to compile on arm (needed for u-boot), host_detect_local_cpu() is not defined
X-Send-Pr-Version: www-1.0

>Number:         54731
>Category:       pkg
>Synopsis:       cross/arm-none-eabi-gcc fails to compile on arm (needed for u-boot), host_detect_local_cpu() is not defined
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ryoon
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 02 07:55:00 +0000 2019
>Closed-Date:    Sat Jun 06 18:52:26 +0000 2020
>Last-Modified:  Sat Jun 06 18:52:26 +0000 2020
>Originator:     adr
>Release:        current 2019-12-1
>Organization:
>Environment:
NetBSD npi 9.99.17 NetBSD 9.99.17 (GENERIC) #0: Wed Nov 20 06:23:31 UTC 2019  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/GENERIC evbarm
>Description:
cross/arm-none-eabi-gcc fails to compile on arm (needed for u-boot), host_detect_local_cpu() is not defined.
>How-To-Repeat:
Try to compile cross/arm-none-eabi-gcc on evbarm.
>Fix:
--- gcc/config/arm/arm.h.orig   2018-03-22 17:24:41.000000000 +0000
+++ gcc/config/arm/arm.h
@@ -2195,19 +2195,19 @@ extern const char *arm_target_thumb_only

 /* -mcpu=native handling only makes sense with compiler running on
    an ARM chip.  */
-#if defined(__arm__)
-extern const char *host_detect_local_cpu (int argc, const char **argv);
-#define HAVE_LOCAL_CPU_DETECT
-# define MCPU_MTUNE_NATIVE_FUNCTIONS                   \
-  { "local_cpu_detect", host_detect_local_cpu },
-# define MCPU_MTUNE_NATIVE_SPECS                               \
-   " %{march=native:%<march=native %:local_cpu_detect(arch)}"  \
-   " %{mcpu=native:%<mcpu=native %:local_cpu_detect(cpu)}"     \
-   " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}"
-#else
+//#if defined(__arm__)
+// extern const char *host_detect_local_cpu (int argc, const char **argv);
+//#define HAVE_LOCAL_CPU_DETECT
+//# define MCPU_MTUNE_NATIVE_FUNCTIONS                 \
+//  { "local_cpu_detect", host_detect_local_cpu },
+//# define MCPU_MTUNE_NATIVE_SPECS                             \
+//   " %{march=native:%<march=native %:local_cpu_detect(arch)}"        \
+//   " %{mcpu=native:%<mcpu=native %:local_cpu_detect(cpu)}"   \
+//   " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}"
+//#else
 # define MCPU_MTUNE_NATIVE_FUNCTIONS
 # define MCPU_MTUNE_NATIVE_SPECS ""
-#endif
+//#endif

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Tue, 03 Dec 2019 00:05:44 +0000
Responsible-Changed-Why:
Ryo, can you please give it a look?
(over to MAINTAINER)


State-Changed-From-To: open->feedback
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sat, 11 Apr 2020 13:02:21 +0000
State-Changed-Why:
I believe a commit by mrg fixed this issue but differently. ARe you still having problems?


From: adr <adr@SDF.ORG>
To: gnats-bugs@www.netbsd.org
Cc: 
Subject: Re: pkg/54731
Date: Sat, 6 Jun 2020 09:08:31 +0000 (UTC)

 Problem solved.

 adr.

State-Changed-From-To: feedback->closed
State-Changed-By: leot@NetBSD.org
State-Changed-When: Sat, 06 Jun 2020 18:52:26 +0000
State-Changed-Why:
Confirmed fixed.

(I have not double-checked if 2020Q1 was affected or not but probably
we are only few weeks near 2020Q2 that it is not worth to possibly pullup
it, if you think it's needed to be pulled up and worth, please just
reply to this PR.)

Thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.