scripts/build/companion_libs/cloog.sh
author "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
Wed Dec 14 16:55:22 2011 +0100 (2011-12-14)
branch1.13
changeset 2848 1ff89596dab0
parent 2757 f070d922facf
child 2854 a70abdbfa342
permissions -rw-r--r--
libc/eglibc: fix localedef 2.14 build

The localedef of eglibc 2.14 requires NOT_IN_libc to be defined in order to
compile intl/l10nflist.c.

This is because localedef is built separately from eglibc and uses some parts of
eglibc that don't compile in standalone without this preprocessor definition.

This fixes the following error:

[ALL ] gcc -g -O2 -DNO_SYSCONF -DNO_UNCOMPRESS
-DLOCALE_PATH='"/usr/lib/locale:/usr/share/i18n"'
-DLOCALEDIR='"/usr/lib/locale"' -DLOCALE_ALIAS_PATH='"/usr/share/locale"'
-DCHARMAP_PATH='"/usr/share/i18n/charmaps"'
-DREPERTOIREMAP_PATH='"/usr/share/i18n/repertoiremaps"'
-DLOCSRCDIR='"/usr/share/i18n/locales"' -Iglibc/locale/programs -Iglibc/locale
-I/<snip>/.build/src/eglibc-localedef-2_14/include
-I/<snip>/.build/src/eglibc-localedef-2_14 -I.
-include /<snip>/.build/src/eglibc-localedef-2_14/include/always.h -Wall
-Wno-format -c -o locarchive.o glibc/locale/programs/locarchive.c
[ALL ] glibc/locale/programs/locarchive.c: In function 'enlarge_archive':
[ALL ] glibc/locale/programs/locarchive.c:303:21: warning: variable
'oldlocrectab' set but not used [-Wunused-but-set-variable]
[ALL ] In file included from glibc/locale/programs/locarchive.c:651:0:
[ALL ] glibc/locale/programs/../../intl/l10nflist.c: In function
'_nl_normalize_codeset':
[ERROR] glibc/locale/programs/../../intl/l10nflist.c:342:9: error:
'_nl_C_locobj_ptr' undeclared (first use in this function)
[ALL ] glibc/locale/programs/../../intl/l10nflist.c:342:9: note: each
undeclared identifier is reported only once for each function it appears in
[ALL ] glibc/locale/programs/locarchive.c: In function
'add_locales_to_archive':
[ALL ] glibc/locale/programs/locarchive.c:1450:7: warning: passing argument
1 of '__xpg_basename' discards 'const' qualifier from pointer target type
[enabled by default]
[ALL ] /usr/include/libgen.h:35:14: note: expected 'char *' but argument is
of type 'const char *'
[ERROR] make[1]: *** [locarchive.o] Error 1

Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
(transplanted from 4cd9134739b594451794cf61a6e1b137422cdafd)
     1 # This file adds the functions to build the CLooG library
     2 # Copyright 2009 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 do_cloog_get() { :; }
     6 do_cloog_extract() { :; }
     7 do_cloog() { :; }
     8 
     9 # Overide functions depending on configuration
    10 if [ "${CT_CLOOG}" = "y" ]; then
    11 
    12 # Download CLooG
    13 do_cloog_get() {
    14     CT_GetFile "cloog-ppl-${CT_CLOOG_VERSION}"  \
    15         ftp://gcc.gnu.org/pub/gcc/infrastructure
    16 }
    17 
    18 # Extract CLooG
    19 do_cloog_extract() {
    20     local _t
    21 
    22     # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!)
    23     # while versions 0.15.4 onward do have the version in the dirname.
    24     # But, because the infrastructure properly creates the extracted
    25     # directories (with tar's --strip-components), we can live safely...
    26     CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}"
    27     CT_Patch "cloog-ppl" "${CT_CLOOG_VERSION}"
    28 
    29     if [ "${CT_CLOOG_NEEDS_AUTORECONF}" = "y" ]; then
    30         CT_Pushd "${CT_SRC_DIR}/cloog-ppl-${CT_CLOOG_VERSION}"
    31         CT_DoExecLog CFG ./autogen.sh
    32         CT_Popd
    33     fi
    34 }
    35 
    36 do_cloog() {
    37     local cloog_src_dir="${CT_SRC_DIR}/cloog-ppl-${CT_CLOOG_VERSION}"
    38 
    39     mkdir -p "${CT_BUILD_DIR}/build-cloog-ppl"
    40     cd "${CT_BUILD_DIR}/build-cloog-ppl"
    41 
    42     CT_DoStep INFO "Installing CLooG/ppl"
    43 
    44     CT_DoLog EXTRA "Configuring CLooG/ppl"
    45 
    46     CT_DoExecLog CFG                            \
    47     CFLAGS="${CT_CFLAGS_FOR_HOST}"              \
    48     LDFLAGS="-lm"                               \
    49     "${cloog_src_dir}/configure"                \
    50         --build=${CT_BUILD}                     \
    51         --host=${CT_HOST}                       \
    52         --prefix="${CT_COMPLIBS_DIR}"           \
    53         --with-gmp="${CT_COMPLIBS_DIR}"         \
    54         --with-ppl="${CT_COMPLIBS_DIR}"         \
    55         --with-bits=gmp                         \
    56         --with-host-libstdcxx='-lstdc++'        \
    57         --disable-shared                        \
    58         --enable-static
    59 
    60     CT_DoLog EXTRA "Building CLooG/ppl"
    61     CT_DoExecLog ALL make ${JOBSFLAGS} libcloog.la
    62 
    63     if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
    64         CT_DoLog EXTRA "Checking CLooG/ppl"
    65         CT_DoExecLog ALL make ${JOBSFLAGS} -s check
    66     fi
    67 
    68     CT_DoLog EXTRA "Installing CLooG/ppl"
    69     CT_DoExecLog ALL make install-libLTLIBRARIES install-pkgincludeHEADERS
    70 
    71     CT_EndStep
    72 }
    73 
    74 fi # CT_CLOOG