From 822fb9415e457383450c96d2432b76c8874ada49 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 24 May 2009 22:04:14 +0000 Subject: /devel/gcc-4.4: - add support for building CLooG -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/companion_libs/cloog.sh | 60 60 0 0 ++++++++++++++++++++++++++++++++++ /devel/gcc-4.4/scripts/addToolVersion.sh | 3 2 1 0 +- /devel/gcc-4.4/scripts/crosstool-NG.sh.in | 3 3 0 0 ++ /devel/gcc-4.4/steps.mk | 1 1 0 0 + /devel/gcc-4.4/config/companion_libs/cloog.in | 32 32 0 0 ++++++++++++++++++ /devel/gcc-4.4/config/companion_libs.in | 1 1 0 0 + 6 files changed, 99 insertions(+), 1 deletion(-) diff --git a/config/companion_libs.in b/config/companion_libs.in index d581d80..c95418b 100644 --- a/config/companion_libs.in +++ b/config/companion_libs.in @@ -49,6 +49,7 @@ config PPL_CLOOG if PPL_CLOOG source config/companion_libs/ppl.in +source config/companion_libs/cloog.in endif endmenu diff --git a/config/companion_libs/cloog.in b/config/companion_libs/cloog.in new file mode 100644 index 0000000..e67e79f --- /dev/null +++ b/config/companion_libs/cloog.in @@ -0,0 +1,32 @@ +# CLooG options + +choice + bool + prompt "CLooG/ppl version" + +config CLOOG_V_0_15_3 + bool + prompt "0.15.3" + +# CT_INSERT_VERSION_ABOVE +# Don't remove above line! +endchoice + +config CLOOG_VERSION + string + default "0.15.3" if CLOOG_V_0_15_3 +# CT_INSERT_VERSION_STRING_ABOVE +# Don't remove above line! + +config CLOOG_CHECK + bool + prompt "Check CLooG (!!! README !!!)" + default n + help + It is highly recommended to check the newly built CLooG library. + Unfortunately, this is a very intensive task, and takes a loooong time. + + Checking CLooG is thus disabled by default. + + If you suspect that your CLooG library is the cause for incorrectly + generated code, you should answer 'Y' here. diff --git a/scripts/addToolVersion.sh b/scripts/addToolVersion.sh index 8e0446e..337c656 100755 --- a/scripts/addToolVersion.sh +++ b/scripts/addToolVersion.sh @@ -13,7 +13,7 @@ Usage: ${myname} <[options] version [...]> ... 'tool' in one of: --gcc, --binutils, --glibc, --eglibc, --uClibc, --linux, --gdb, --dmalloc, --duma, --strace, --ltrace, --libelf - --gmp, --mpfr, --ppl + --gmp, --mpfr, --ppl, --cloog Valid options for all tools: --stable, -s, +x (default) @@ -134,6 +134,7 @@ while [ $# -gt 0 ]; do --gmp) EXP=; OBS=; cat=GMP; tool=gmp; tool_prefix=companion_libs;; --mpfr) EXP=; OBS=; cat=MPFR; tool=mpfr; tool_prefix=companion_libs;; --ppl) EXP=; OBS=; cat=PPL; tool=ppl; tool_prefix=companion_libs;; + --cloog) EXP=; OBS=; cat=CLOOG; tool=cloog; tool_prefix=companion_libs;; # Tools options: -x|--experimental|+s) EXP=1;; diff --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh new file mode 100644 index 0000000..43ef648 --- /dev/null +++ b/scripts/build/companion_libs/cloog.sh @@ -0,0 +1,60 @@ +# This file adds the functions to build the CLooG library +# Copyright 2009 Yann E. MORIN +# Licensed under the GPL v2. See COPYING in the root of this package + +do_cloog_get() { :; } +do_cloog_extract() { :; } +do_cloog() { :; } +do_cloog_target() { :; } + +# Overide functions depending on configuration +if [ "${CT_PPL_CLOOG}" = "y" ]; then + +# Download CLooG +do_cloog_get() { + CT_GetFile "cloog-ppl-${CT_CLOOG_VERSION}" \ + ftp://gcc.gnu.org/pub/gcc/infrastructure +} + +# Extract CLooG +do_cloog_extract() { + CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}" + CT_Pushd "${CT_SRC_DIR}/cloog-ppl" + CT_Patch "cloog-ppl-${CT_CLOOG_VERSION}" nochdir + CT_Popd +} + +do_cloog() { + mkdir -p "${CT_BUILD_DIR}/build-cloog-ppl" + cd "${CT_BUILD_DIR}/build-cloog-ppl" + + CT_DoStep INFO "Installing CLooG/ppl" + + CT_DoLog EXTRA "Configuring CLooG/ppl" + CFLAGS="${CT_CFLAGS_FOR_HOST}" \ + CT_DoExecLog ALL \ + "${CT_SRC_DIR}/cloog-ppl/configure" \ + --build=${CT_BUILD} \ + --host=${CT_HOST} \ + --prefix="${CT_PREFIX_DIR}" \ + --with-gmp="${CT_PREFIX_DIR}" \ + --with-ppl="${CT_PREFIX_DIR}" \ + --disable-shared \ + --enable-static \ + --with-bits=gmp + + CT_DoLog EXTRA "Building CLooG/ppl" + CT_DoExecLog ALL make ${PARALLELMFLAGS} + + if [ "${CT_CLOOG_CHECK}" = "y" ]; then + CT_DoLog EXTRA "Checking CLooG/ppl" + CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check + fi + + CT_DoLog EXTRA "Installing CLooG/ppl" + CT_DoExecLog ALL make install + + CT_EndStep +} + +fi # CT_PPL_CLOOG diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index a2032bc..2a9ff5a 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -91,6 +91,7 @@ CT_DoLog INFO "Building environment variables" . "${CT_LIB_DIR}/scripts/build/companion_libs/gmp.sh" . "${CT_LIB_DIR}/scripts/build/companion_libs/mpfr.sh" . "${CT_LIB_DIR}/scripts/build/companion_libs/ppl.sh" +. "${CT_LIB_DIR}/scripts/build/companion_libs/cloog.sh" . "${CT_LIB_DIR}/scripts/build/binutils/binutils.sh" . "${CT_LIB_DIR}/scripts/build/binutils/elf2flt.sh" . "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh" @@ -447,6 +448,7 @@ if [ -z "${CT_RESTART}" ]; then do_gmp_get do_mpfr_get do_ppl_get + do_cloog_get do_binutils_get do_cc_get do_libc_get @@ -464,6 +466,7 @@ if [ -z "${CT_RESTART}" ]; then do_gmp_extract do_mpfr_extract do_ppl_extract + do_cloog_extract do_binutils_extract do_cc_extract do_libc_extract diff --git a/steps.mk b/steps.mk index bb25061..3386548 100644 --- a/steps.mk +++ b/steps.mk @@ -21,6 +21,7 @@ CT_STEPS := libc_check_config \ gmp \ mpfr \ ppl \ + cloog \ binutils \ elf2flt \ cc_core_pass_1 \ -- cgit v0.10.2-6-g49f6