From patchwork Mon Jun 27 15:11:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vicente Olivert Riera X-Patchwork-Id: 641086 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rdXVB09Mjz9sBR for ; Tue, 28 Jun 2016 01:12:17 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 89FCC32FF9; Mon, 27 Jun 2016 15:12:16 +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 HrRkSD76K+mj; Mon, 27 Jun 2016 15:12:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 193D92F1BF; Mon, 27 Jun 2016 15:11:55 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 325BF1C1F19 for ; Mon, 27 Jun 2016 15:11:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 312FC8B7A1 for ; Mon, 27 Jun 2016 15:11:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jixoI3d0nEmn for ; Mon, 27 Jun 2016 15:11:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196]) by whitealder.osuosl.org (Postfix) with ESMTP id ACF318B777 for ; Mon, 27 Jun 2016 15:11:52 +0000 (UTC) Received: from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19]) by Forcepoint Email with ESMTPS id D7EADE9DA1170; Mon, 27 Jun 2016 16:11:47 +0100 (IST) Received: from vriera-linux.le.imgtec.org (192.168.154.36) by HHMAIL01.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.294.0; Mon, 27 Jun 2016 16:11:51 +0100 From: Vicente Olivert Riera To: Date: Mon, 27 Jun 2016 16:11:16 +0100 Message-ID: <1467040287-39390-2-git-send-email-Vincent.Riera@imgtec.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1467040287-39390-1-git-send-email-Vincent.Riera@imgtec.com> References: <1467040287-39390-1-git-send-email-Vincent.Riera@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [192.168.154.36] Subject: [Buildroot] [PATCH 02/13] package/gcc: fix fortran support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Samuel Martin Fortran depends on libquadmath, which requires a toolchain with wchar support. So: - make sure libquadmath is enable and installed when fortran is enabled; - propagate the wchar dependency (from libquadmath) to fortran, and add a comment when fortran is not available. [Vincent: only do "HOST_GCC_FINAL_USR_LIBS += libquadmath" for i386 and x86_64, otherwise it will fail saying "libquadmath.a: file not found"] Signed-off-by: Samuel Martin Signed-off-by: Vicente Olivert Riera --- package/gcc/Config.in.host | 4 ++++ package/gcc/gcc-final/gcc-final.mk | 4 ++++ package/gcc/gcc.mk | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host index 3180071..54f7e1f 100644 --- a/package/gcc/Config.in.host +++ b/package/gcc/Config.in.host @@ -120,11 +120,15 @@ config BR2_TOOLCHAIN_BUILDROOT_CXX config BR2_TOOLCHAIN_BUILDROOT_FORTRAN bool "Enable Fortran support" + depends on BR2_USE_WCHAR # libquadmath help Enable this option if you want your toolchain to support the Fortran language and you want Fortran libraries to be installed on your target system. +comment "Fortran support needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + config BR2_GCC_ENABLE_TLS bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC default y diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk index 1d1d72e..e418f51 100644 --- a/package/gcc/gcc-final/gcc-final.mk +++ b/package/gcc/gcc-final/gcc-final.mk @@ -163,6 +163,10 @@ endif ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN),y) HOST_GCC_FINAL_USR_LIBS += libgfortran +# fortran needs quadmath on x86 and x86_64 +ifeq ($(BR2_I386)$(BR2_x86_64),y) +HOST_GCC_FINAL_USR_LIBS += libquadmath +endif endif ifeq ($(BR2_GCC_ENABLE_OPENMP),y) diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk index 88d2bc2..cffdb19 100644 --- a/package/gcc/gcc.mk +++ b/package/gcc/gcc.mk @@ -109,6 +109,11 @@ endif # gcc 4.6.x quadmath requires wchar ifneq ($(BR2_USE_WCHAR),y) HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath +else +# fortran needs quadmath on x86 and x86_64 +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN)$(BR2_I386)$(BR2_x86_64),yy) +HOST_GCC_COMMON_CONF_OPTS += --enable-libquadmath +endif endif # libsanitizer requires wordexp, not in default uClibc config. Also