NetBSD Problem Report #55418

From kardel@Kardel.name  Thu Jun 25 18:30:00 2020
Return-Path: <kardel@Kardel.name>
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 42F081A9217
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 25 Jun 2020 18:30:00 +0000 (UTC)
Message-Id: <20200625182955.5F58644B33@Andromeda.Kardel.name>
Date: Thu, 25 Jun 2020 20:29:55 +0200 (CEST)
From: kardel@netbsd.org
Reply-To: kardel@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: NetBSD 9.0_STABLE i386 lacks __atomic_{load,store}_8
X-Send-Pr-Version: 3.95

>Number:         55418
>Category:       toolchain
>Synopsis:       NetBSD 9.0_STABLE i386 lacks __atomic_{load,store}_8
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 25 18:35:00 +0000 2020
>Closed-Date:    Fri Jun 26 08:02:42 +0000 2020
>Last-Modified:  Fri Jun 26 08:02:42 +0000 2020
>Originator:     Frank Kardel
>Release:        NetBSD 9.0_STABLE
>Organization:

>Environment:
System: NetBSD router 9.0_STABLE NetBSD 9.0_STABLE (ROUTER) #0: Thu Mar 26 15:05:05 UTC 2020 kardel@emptyShell:/usr/obj/sys/arch/i386/compile/ROUTER i386
Architecture: i386
Machine: i386
>Description:
	When building pkgsrc/wip/bareos-clientonly linking fails to
	resolve __atomic_store_8, __atomic_load_8.

	Primitives used in work/bareos-Release-19.2.7/core/src/lib/timer_thread.cc
	static std::atomic<std::time_t> calendar_time_on_last_timer_run(time(nullptr));
	static std::atomic<TimerThreadState> timer_thread_state(...);
	static std::atomic<bool> quit_timer_thread(false);

	The compiler gcc (nb3 20190319) 7.4.0 happily compiles the code but generates
	calls to __atomic_{load,store}_8 which I do not find in the libraries.

	Any hints?

	BTW, on amd64 this works flawlessly and an 8-Bit atomic quantity should be
	available in i386 ISA.

>How-To-Repeat:
	Build pkgsrc/wip/bareos-clientonly on an i386 environment.
>Fix:
	?

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: toolchain/55418: NetBSD 9.0_STABLE i386 lacks
 __atomic_{load,store}_8
Date: Thu, 25 Jun 2020 21:25:27 +0200

 On Thu, Jun 25, 2020 at 06:35:00PM +0000, kardel@netbsd.org wrote:
 > 	BTW, on amd64 this works flawlessly and an 8-Bit atomic quantity should be
 > 	available in i386 ISA.

 It is not available in all models. If you tell the compiler you are tareting
 a newer CPU, it will just work.

 Martin

From: Frank Kardel <kardel@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: toolchain/55418: NetBSD 9.0_STABLE i386 lacks
 __atomic_{load,store}_8
Date: Fri, 26 Jun 2020 09:58:20 +0200

 Thanks - I now force -march=i586 for i386 archs.


 On 06/25/20 21:30, Martin Husemann wrote:
 > The following reply was made to PR toolchain/55418; it has been noted by GNATS.
 >
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@netbsd.org
 > Cc:
 > Subject: Re: toolchain/55418: NetBSD 9.0_STABLE i386 lacks
 >   __atomic_{load,store}_8
 > Date: Thu, 25 Jun 2020 21:25:27 +0200
 >
 >   On Thu, Jun 25, 2020 at 06:35:00PM +0000, kardel@netbsd.org wrote:
 >   > 	BTW, on amd64 this works flawlessly and an 8-Bit atomic quantity should be
 >   > 	available in i386 ISA.
 >   
 >   It is not available in all models. If you tell the compiler you are tareting
 >   a newer CPU, it will just work.
 >   
 >   Martin
 >   

State-Changed-From-To: open->closed
State-Changed-By: kardel@NetBSD.org
State-Changed-When: Fri, 26 Jun 2020 08:02:42 +0000
State-Changed-Why:
issue resolved


>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.