From patchwork Sun Oct 4 14:20:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1376433 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=B9Y4eQp7; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C45WD2Ss9z9sRR for ; Mon, 5 Oct 2020 01:21:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 92EFF20115; Sun, 4 Oct 2020 14:21:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P08t0czIh2fs; Sun, 4 Oct 2020 14:20:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id CB8B820130; Sun, 4 Oct 2020 14:20:59 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 5EBEB1BF275 for ; Sun, 4 Oct 2020 14:20:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5487820130 for ; Sun, 4 Oct 2020 14:20:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LMbQ9yOstmST for ; Sun, 4 Oct 2020 14:20:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by silver.osuosl.org (Postfix) with ESMTPS id EAB0A20115 for ; Sun, 4 Oct 2020 14:20:55 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id g4so6742495wrs.5 for ; Sun, 04 Oct 2020 07:20:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=O1VSrPBleqn+dWvyGuKh3WzZExS/gcCLtd79KF//GNQ=; b=B9Y4eQp7XDqu2/ZVG0nCyIKWTlWt9SFXtO33UYk0MX2PW3PHxDQ7pVssVc2GcNnCj+ W5nNrndbp2ryaK03GtBHmsslzmg+xFAOzdeU9H/LUAMZ6RkwveDR5/una+QUpbMM0Poc McZpZDsXlF2ejz0e6Eojmvt/Mp0O+xSczCU6Bj5M3GR7n34ehGYhXHQ0VyIWYvvP6Vzo AUpl1aUU9AX9owvJlQNJvp4frHZGJohHRaPduQgEi9ar7HCrcLI8yNtK7tiJCdTTCpbN GE1M1AQBnAxYiXkIKOewAuHMHf8tOnfGobcAd0vSeopnlMo4Xw1cuPQ9Mosmjvv0DR50 LQIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=O1VSrPBleqn+dWvyGuKh3WzZExS/gcCLtd79KF//GNQ=; b=tAsDgOYp/gEZgNSUmrJxMmNIKzvyXmR5SUjUsxYw/+TKfHtuS72uqMzMnDv7hzDpl0 6tpe8QPCUZxnd9a61s0V7SO9fHEqw7KYl2qrvMlSwdjOo3/1BqBJrlQz8HHAvKQYUDB5 kjd7aqYx74egyPLW+1pHMTJbFDfyox00OCgIZMrWU8/FJQHMZG6uJTQUbs3//d2lOzLS oImImtKt3VnS9Jxa2DNW5SMDOlFVqgpNY5CkqJ0LoA6L0SNYuLISe7PbhSAHvScxUz1r VGwQgtM8K3mIAETcx3pddg9peBdLEjGEt7FwBLt4gI92hEPK8IDdzhGJkey5lSwHWO14 VX0Q== X-Gm-Message-State: AOAM531J2EVZyTNafbTq+xhnq4pqYrdu2H8OjOrJxcDTlR1apqjQHs82 Jc/KS0uGMXzU5SinufazSdMMuHx529c= X-Google-Smtp-Source: ABdhPJzszDkogbPL8ryxhfgeIfpVLLkXeOYGcdTbH5DcwZGEWg6GG2piNG1N/kXHkylOmMmDul8Mzg== X-Received: by 2002:a5d:6691:: with SMTP id l17mr6977982wru.10.1601821254032; Sun, 04 Oct 2020 07:20:54 -0700 (PDT) Received: from localhost.localdomain (2a01cb058f8a18003dbee9eed79eb521.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:3dbe:e9ee:d79e:b521]) by smtp.gmail.com with ESMTPSA id p13sm137746wmb.5.2020.10.04.07.20.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Oct 2020 07:20:53 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Sun, 4 Oct 2020 16:20:50 +0200 Message-Id: <20201004142050.2487724-1-romain.naour@gmail.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] toolchain: enable libquadmath for powerpc64(le) X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matt Weber , Romain Naour , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When gfortran is enabled on powerpc64(le) we need to build the libquiadmath library provided by GCC since this architecture now support 128-bit floating point (__float128) values. The 128-bit floating point support has been merged into gcc since release 8.1 [1][2]. Otherwise the build break due to missing header when building a glibc >= 2.32: In file included from ../../../libgfortran/runtime/string.c:25: ../../../libgfortran/libgfortran.h:61:12: fatal error: quadmath_weak.h: No such file or directory 61 | # include "quadmath_weak.h" | ^~~~~~~~~~~~~~~~~ This issue is probably related to recent changes in glibc 2.32 since there was no such issue while building Bootlin powerpc64(le) toolchains [3]. With glibc 2.32, gcc-final now define HAVE_FLOAT128 this is used to include "quadmath_weak.h". Update comment in pkg-toolchain-external.mk. Fixes: https://gitlab.com/kubu93/toolchains-builder/-/jobs/771109960 (powerpc64) https://gitlab.com/kubu93/toolchains-builder/-/jobs/771109993 (powerpc64le) [1] https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/PowerPC-Built-in-Functions.html [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85440 [3] https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-power8/tarballs/powerpc64-power8--glibc--bleeding-edge-2020.08-1.tar.bz2 Signed-off-by: Romain Naour Cc: Matt Weber Cc: Thomas Petazzoni --- toolchain/Config.in | 2 ++ toolchain/toolchain-external/pkg-toolchain-external.mk | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/toolchain/Config.in b/toolchain/Config.in index 6e2befed20..a29f9f62ac 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -722,9 +722,11 @@ config BR2_TOOLCHAIN_HAS_ATOMIC # - At least, libquadmath is available on: # - i*86 # - x86_64 +# - powerpc64(le) since gcc 8.1 # - When available, libquadmath requires wchar support. config BR2_TOOLCHAIN_HAS_LIBQUADMATH bool default y if BR2_i386 || BR2_x86_64 + default y if BR2_powerpc64 || BR2_powerpc64le endmenu diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk index 6d91cb5d1e..75ea8dc23d 100644 --- a/toolchain/toolchain-external/pkg-toolchain-external.mk +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk @@ -143,7 +143,7 @@ endif ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y) TOOLCHAIN_EXTERNAL_LIBS += libgfortran.so.* -# fortran needs quadmath on x86 and x86_64 +# fortran needs quadmath on x86, x86_64, powerpc64(le). ifeq ($(BR2_TOOLCHAIN_HAS_LIBQUADMATH),y) TOOLCHAIN_EXTERNAL_LIBS += libquadmath.so* endif