From patchwork Mon May 19 10:09:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Thomas X-Patchwork-Id: 350206 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 6C22F140094 for ; Mon, 19 May 2014 20:15:14 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A4A3231F3C; Mon, 19 May 2014 10:15:13 +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 JCbrzj17taKO; Mon, 19 May 2014 10:15:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 48EDD3206A; Mon, 19 May 2014 10:15:07 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 18AE01C243B for ; Mon, 19 May 2014 10:15:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 15D168A969 for ; Mon, 19 May 2014 10:15:06 +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 Ev+PTh0JpQkA for ; Mon, 19 May 2014 10:15:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from blu0-omc2-s16.blu0.hotmail.com (blu0-omc2-s16.blu0.hotmail.com [65.55.111.91]) by whitealder.osuosl.org (Postfix) with ESMTP id 6E9E78A697 for ; Mon, 19 May 2014 10:15:05 +0000 (UTC) Received: from BLU436-SMTP160 ([65.55.111.73]) by blu0-omc2-s16.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 19 May 2014 03:09:56 -0700 X-TMN: [V7b5A/LQYC0yXHcXc9IbiXas0NIOeeMW] X-Originating-Email: [scjthm@live.com] Message-ID: Received: from localhost.localdomain ([124.168.125.47]) by BLU436-SMTP160.smtp.hotmail.com over TLS secured channel with Microsoft SMTPSVC(8.0.9200.16384); Mon, 19 May 2014 03:09:55 -0700 From: Steve Thomas To: buildroot@buildroot.org Date: Mon, 19 May 2014 10:09:09 +0000 X-Mailer: git-send-email 1.9.3 In-Reply-To: <1400494150-6936-1-git-send-email-scjthm@live.com> References: <1400494150-6936-1-git-send-email-scjthm@live.com> X-OriginalArrivalTime: 19 May 2014 10:09:55.0589 (UTC) FILETIME=[7B9FFB50:01CF734A] MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 3/3] Add an BR2_GCC_ENABLE_GRAPHITE flag for the buildroot toolchain 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: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net The gcc graphite optimisations such as loop-interchange, blocking and loop-flattening, also known as graphite are an optional feature of gcc that is very well supported since about gcc version 4.5. This patch adds support for graphite for the toolchain as an optional flag for versions 4.6 onwards as an optional flag, that is disabled by default. Signed-off-by: Steve Thomas --- Changes v1 -> v2: - added more lucid and verbose description in commit messages - fixed the url and removed the sources files - add complete graphite as three commits yet a single patch --- package/gcc/Config.in.host | 16 ++++++++++++++++ package/gcc/gcc.mk | 9 +++++++++ 2 files changed, 25 insertions(+) diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host index ca991da..6ecfef5 100644 --- a/package/gcc/Config.in.host +++ b/package/gcc/Config.in.host @@ -3,6 +3,9 @@ comment "GCC Options" config BR2_GCC_NEEDS_MPC bool +config BR2_GCC_SUPPORTS_GRAPHITE + bool + choice prompt "GCC compiler Version" default BR2_GCC_VERSION_4_4_X if BR2_sparc_sparchfleon || BR2_sparc_sparchfleonv8 || BR2_sparc_sparcsfleon || BR2_sparc_sparcsfleonv8 @@ -42,36 +45,43 @@ choice config BR2_GCC_VERSION_4_6_X depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_cortex_a7 && !BR2_cortex_a12 && !BR2_x86_jaguar && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4 select BR2_GCC_NEEDS_MPC + select BR2_GCC_SUPPORTS_GRAPHITE bool "gcc 4.6.x" config BR2_GCC_VERSION_4_7_X depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_cortex_a12 && !BR2_x86_jaguar && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4 select BR2_GCC_NEEDS_MPC + select BR2_GCC_SUPPORTS_GRAPHITE bool "gcc 4.7.x" config BR2_GCC_VERSION_4_8_X depends on !BR2_microblaze && !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_cortex_a12 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 select BR2_GCC_NEEDS_MPC + select BR2_GCC_SUPPORTS_GRAPHITE bool "gcc 4.8.x" config BR2_GCC_VERSION_4_8_ARC depends on BR2_arc select BR2_GCC_NEEDS_MPC + select BR2_GCC_SUPPORTS_GRAPHITE bool "gcc 4.8-arc" config BR2_GCC_VERSION_4_9_X depends on !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 select BR2_GCC_NEEDS_MPC + select BR2_GCC_SUPPORTS_GRAPHITE bool "gcc 4.9.x" config BR2_GCC_VERSION_4_9_MICROBLAZE depends on BR2_microblaze select BR2_GCC_NEEDS_MPC + select BR2_GCC_SUPPORTS_GRAPHITE bool "gcc 4.9-microblaze" config BR2_GCC_VERSION_SNAP depends on !BR2_microblaze && !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 select BR2_GCC_NEEDS_MPC + select BR2_GCC_SUPPORTS_GRAPHITE bool "gcc snapshot" endchoice @@ -147,6 +157,12 @@ config BR2_INSTALL_FORTRAN cross-compiler, and install the Fortran runtime to the target. +config BR2_GCC_ENABLE_GRAPHITE + bool "Enable compiler graphite optimisations" + depends on BR2_GCC_SUPPORTS_GRAPHITE + help + Enable the compiler to support graphite optimisations + config BR2_GCC_ENABLE_TLS bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC default y diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk index 32219cc..c05a824 100644 --- a/package/gcc/gcc.mk +++ b/package/gcc/gcc.mk @@ -156,6 +156,15 @@ HOST_GCC_COMMON_DEPENDENCIES += host-mpc HOST_GCC_COMMON_CONF_OPT += --with-mpc=$(HOST_DIR)/usr endif +ifeq ($(BR2_GCC_ENABLE_GRAPHITE),y) +HOST_GCC_COMMON_DEPENDENCIES += \ + host-isl \ + host-cloog +HOST_GCC_COMMON_CONF_OPT += \ + --disable-isl-version-check \ + --disable-cloog-version-check +endif + ifneq ($(BR2_arc)$(BR2_GCC_VERSION_SNAP),) HOST_GCC_COMMON_DEPENDENCIES += host-flex host-bison endif