From patchwork Mon Sep 2 16:06:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 271977 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 6B4D62C008A for ; Tue, 3 Sep 2013 02:07:24 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 092DDE172; Mon, 2 Sep 2013 16:07:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CBjBRZsyMfOC; Mon, 2 Sep 2013 16:07:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 682BDE1B3; Mon, 2 Sep 2013 16:07:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 969B01BF9A3 for ; Mon, 2 Sep 2013 16:07:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2BCE332AB0 for ; Mon, 2 Sep 2013 16:07:06 +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 uyJPMMO8oZhA for ; Mon, 2 Sep 2013 16:07:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (top.free-electrons.com [176.31.233.9]) by silver.osuosl.org (Postfix) with ESMTP id 960BB32A15 for ; Mon, 2 Sep 2013 16:07:05 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id E5FDE85A; Mon, 2 Sep 2013 18:07:34 +0200 (CEST) Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id 4B62985B for ; Mon, 2 Sep 2013 18:07:07 +0200 (CEST) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Mon, 2 Sep 2013 18:06:30 +0200 Message-Id: <1378138000-12739-5-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1378138000-12739-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1378138000-12739-1-git-send-email-thomas.petazzoni@free-electrons.com> Subject: [Buildroot] [PATCHv2 04/14] gcc: fix Fortran support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This commit fixes the Fortran support in the gcc package by making sure that the runtime Fortran library is properly installed to the target. It also takes this opportunity to slightly reword the Config.in option help text, to no longer mention gcc < 4.2 since they are no longer supported in Buildroot, and to have a more meaningful explanation. Finally, it fixes the gcc-final.mk code to use the correct BR2_INSTALL_FORTRAN option rather than the non-existing BR2_GCC_CROSS_FORTRAN option, to decide whether Fortran support should be enabled or not in the cross-compiler. Signed-off-by: Thomas Petazzoni --- package/gcc/Config.in.host | 8 ++++---- package/gcc/gcc-final/gcc-final.mk | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host index 7e6df2d..b440ee2 100644 --- a/package/gcc/Config.in.host +++ b/package/gcc/Config.in.host @@ -119,13 +119,13 @@ config BR2_INSTALL_OBJC Build/install Objective-C compiler and runtime? config BR2_INSTALL_FORTRAN - bool "Build/install Fortran compiler and runtime?" + bool "Enable Fortran support" depends on !BR2_avr32 select BR2_PACKAGE_LIBMPFR help - Build/install Fortran compiler and runtime? - Note that it is highly recommended NOT to use gfortran - from gcc older than 4.2.0 + Enable the support for the Fortran language in the + cross-compiler, and install the Fortran runtime to the + target. config BR2_GCC_ENABLE_TLS bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk index b62dfe2..15adadd 100644 --- a/package/gcc/gcc-final/gcc-final.mk +++ b/package/gcc/gcc-final/gcc-final.mk @@ -34,7 +34,7 @@ HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_FINAL_CONFIGURE_SYMLINK # Languages supported by the cross-compiler GCC_FINAL_CROSS_LANGUAGES-y = c GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBSTDCPP) += c++ -GCC_FINAL_CROSS_LANGUAGES-$(BR2_GCC_CROSS_FORTRAN) += fortran +GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_FORTRAN) += fortran GCC_FINAL_CROSS_LANGUAGES-$(BR2_GCC_CROSS_OBJC) += objc GCC_FINAL_CROSS_LANGUAGES = $(subst $(space),$(comma),$(GCC_FINAL_CROSS_LANGUAGES-y)) @@ -113,6 +113,10 @@ ifeq ($(BR2_GCC_ENABLE_OPENMP),y) HOST_GCC_FINAL_USR_LIBS += libgomp endif +ifeq ($(BR2_INSTALL_FORTRAN),y) +HOST_GCC_FINAL_USR_LIBS += libgfortran +endif + ifneq ($(HOST_GCC_FINAL_USR_LIBS),) define HOST_GCC_FINAL_INSTALL_USR_LIBS mkdir -p $(TARGET_DIR)/usr/lib