NetBSD Problem Report #53679

From www@NetBSD.org  Mon Oct 22 14:08:20 2018
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 701F37A1F6
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 22 Oct 2018 14:08:20 +0000 (UTC)
Message-Id: <20181022140819.3E9287A22E@mollari.NetBSD.org>
Date: Mon, 22 Oct 2018 14:08:19 +0000 (UTC)
From: coypu@sdf.org
Reply-To: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Subject: clang++ AND netbsd AND libstdc++ AND c++11 is dysfunctional due to __float128
X-Send-Pr-Version: www-1.0

>Number:         53679
>Category:       toolchain
>Synopsis:       clang++ AND netbsd AND libstdc++ AND c++11 is dysfunctional due to __float128
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 22 14:10:00 +0000 2018
>Last-Modified:  Wed Oct 24 22:35:01 +0000 2018
>Originator:     coypu
>Release:        NetBSD 8.99.21
>Organization:
>Environment:
NetBSD planets 8.99.21 NetBSD 8.99.21 (GENERIC) #0: Fri Jul 13 14:49:46 IDT 2018  fly@planets:/tmp/build3/sys/arch/amd64/compile/GENERIC amd64
>Description:
> cat test3.cxx
#include <algorithm>
int main() { return 0; }

> clang++ --version # this is from pkgsrc
clang version 6.0.1 (tags/RELEASE_601/final)
Target: x86_64-unknown-netbsd8.99
Thread model: posix
InstalledDir: /usr/pkg/bin

> clang++ test3.cxx 
In file included from test3.cxx:1:
In file included from /usr/include/g++/algorithm:60:
In file included from /usr/include/g++/utility:70:
In file included from /usr/include/g++/bits/stl_pair.h:59:
In file included from /usr/include/g++/bits/move.h:57:
/usr/include/g++/type_traits:344:39: error: __float128 is not supported on this target
    struct __is_floating_point_helper<__float128>
                                      ^
1 error generated.


maybe in OSTargets.h in clang we need to have like in other targets
    if (this->HasFloat128)
       Builder.defineMacro("__FLOAT128__");



or maybe libstdc++ needs to check in a more standard way if one exists?
>How-To-Repeat:

>Fix:

>Audit-Trail:
From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/53679: clang++ AND netbsd AND libstdc++ AND c++11 is
 dysfunctional due to __float128
Date: Tue, 23 Oct 2018 23:19:34 +0000

 Building firefox:

 --- stderr
 /usr/include/g++/type_traits:344:39: error: __float128 is not supported on this target

 So, this is bad and we should backport any fix for this to the pkgsrc
 versions.

From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53679 CVS commit: pkgsrc/lang/clang
Date: Wed, 24 Oct 2018 21:12:59 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Wed Oct 24 21:12:59 UTC 2018

 Modified Files:
 	pkgsrc/lang/clang: Makefile distinfo
 	pkgsrc/lang/clang/patches: patch-lib_Basic_Targets_OSTargets.h

 Log Message:
 clang: enable __float128 on netbsd/x86

 While it is debatable whether we want to have this definition upstream,
 this is very necessary in the package for the purpose of building
 www/firefox once it is updated to 63.0.

 This is because netbsd's base libstdc++ has some __float128 in headers
 and otherwise we get fatal errors in clang builds, or in firefox's case,
 when generating bindings for Rust via clang.

 PR toolchain/53679
 Bump PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -u -r1.44 -r1.45 pkgsrc/lang/clang/Makefile
 cvs rdiff -u -r1.53 -r1.54 pkgsrc/lang/clang/distinfo
 cvs rdiff -u -r1.1 -r1.2 \
     pkgsrc/lang/clang/patches/patch-lib_Basic_Targets_OSTargets.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@NetBSD.org
Cc: toolchain-manager@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org, coypu@sdf.org
Subject: Re: PR/53679 CVS commit: pkgsrc/lang/clang
Date: Thu, 25 Oct 2018 00:31:19 +0200

 On Wed, Oct 24, 2018 at 09:15:01PM +0000, Maya Rashish wrote:
 > The following reply was made to PR toolchain/53679; it has been noted by GNATS.
 > 
 > From: "Maya Rashish" <maya@netbsd.org>
 > To: gnats-bugs@gnats.NetBSD.org
 > Cc: 
 > Subject: PR/53679 CVS commit: pkgsrc/lang/clang
 > Date: Wed, 24 Oct 2018 21:12:59 +0000
 > 
 >  Module Name:	pkgsrc
 >  Committed By:	maya
 >  Date:		Wed Oct 24 21:12:59 UTC 2018
 >  
 >  Modified Files:
 >  	pkgsrc/lang/clang: Makefile distinfo
 >  	pkgsrc/lang/clang/patches: patch-lib_Basic_Targets_OSTargets.h
 >  
 >  Log Message:
 >  clang: enable __float128 on netbsd/x86

 Urgh. Please no. Seriously, no.

 Joerg

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.