docs/2 - Installing crosstool-NG.txt
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 2563 e17f35b05539
child 2834 0a0410dd0cb0
child 2912 6467c949c91c
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 File.........: 2 - Installing crosstool-NG.txt
     2 Copyright....: (C) 2010 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
     3 License......: Creative Commons Attribution Share Alike (CC-by-sa), v2.5
     4 
     5 
     6 Installing crosstool-NG  /
     7 ________________________/
     8 
     9 
    10 There are two ways you can use crosstool-NG:
    11  - build and install it, then get rid of the sources like you'd do for most
    12    programs,
    13  - or only build it and run from the source directory.
    14 
    15 The former should be used if you got crosstool-NG from a packaged tarball, see
    16 "Install method", below, while the latter is most useful for developers that
    17 use a clone of the repository, and want to submit patches, see "The Hacker's
    18 way", below.
    19 
    20 
    21 Install method |
    22 ---------------+
    23 
    24 If you go for the install, then you just follow the classical, but yet easy
    25 ./configure way:
    26   ./configure --prefix=/some/place
    27   make
    28   make install
    29   export PATH="${PATH}:/some/place/bin"
    30 
    31 You can then get rid of crosstool-NG source. Next create a directory to serve
    32 as a working place, cd in there and run:
    33   ct-ng help
    34 
    35 See below for complete usage.
    36 
    37 
    38 The Hacker's way |
    39 -----------------+
    40 
    41 If you go the hacker's way, then the usage is a bit different, although very
    42 simple:
    43   ./configure --local
    44   make
    45 
    46 Now, *do not* remove crosstool-NG sources. They are needed to run crosstool-NG!
    47 Stay in the directory holding the sources, and run:
    48   ./ct-ng help
    49 
    50 See below for complete usage.
    51 
    52 Now, provided you used a clone of the repository, you can send me your changes.
    53 See the section titled CONTRIBUTING, below, for how to submit changes.
    54 
    55 
    56 Preparing for packaging |
    57 ------------------------+
    58 
    59 If you plan on packaging crosstool-NG, you surely don't want to install it
    60 in your root file system. The install procedure of crosstool-NG honors the
    61 DESTDIR variable:
    62 
    63   ./configure --prefix=/usr
    64   make
    65   make DESTDIR=/packaging/place install
    66 
    67 
    68 Shell completion |
    69 -----------------+
    70 
    71 crosstool-NG comes with a shell script fragment that defines bash-compatible
    72 completion. That shell fragment is currently not installed automatically, but
    73 this is planned.
    74 
    75 To install the shell script fragment, you have two options:
    76  - install system-wide, most probably by copying ct-ng.comp into
    77    /etc/bash_completion.d/
    78  - install for a single user, by copying ct-ng.comp into ${HOME}/ and
    79    sourcing this file from your ${HOME}/.bashrc
    80 
    81 
    82 Contributed code |
    83 -----------------+
    84 
    85 Some people contributed code that couldn't get merged for various reasons. This
    86 code is available as lzma-compressed patches, in the contrib/ sub-directory.
    87 These patches are to be applied to the source of crosstool-NG, prior to
    88 installing, using something like the following:
    89   lzcat contrib/foobar.patch.lzma |patch -p1
    90 
    91 There is no guarantee that a particular contribution applies to the current
    92 version of crosstool-ng, or that it will work at all. Use contributions at
    93 your own risk.