Commit Graph

178 Commits

Author SHA1 Message Date
Johannes Stezenbach
b8baed585d fix eglibc-2.16 manual build
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Message-Id: <20121022133228.GA16536@sig21.net>
Patchwork-Id: 193156
2012-10-22 03:32:28 +00:00
Yann E. MORIN"
3127749581 libc/{,e}glibc: remove rude wordings in commetns
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-08-22 23:11:03 +02:00
Johannes Stezenbach
2aee11ccf2 libc/uClibc: add additional debug level between "minimal" and "all"
During application development it is desirable to enable malloc
debugging and LD_DEBUG support, but the extensive debug spew from
SUPPORT_LD_DEBUG_EARLY is only useful when working on
uClibc's ld.so.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
2012-02-24 16:08:32 +01:00
Yann E. MORIN"
21b1d79706 libc/glibc: use CT_mkdir_pushd helper
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-01 17:35:10 +01:00
Yann E. MORIN"
70659870b7 libc/newlib: build newlib in the proper step
Currently, newlib is built in the start_file step, which is wrong, but was
needed when the baremetal integration was... well, 'unfinished'.

Now that we build the baremetal compiler from the final cc step, and a
proper core gcc in pass-1 and pass-2, we can move the newlib build to the
step do_libc, where it belongs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 18:01:28 +02:00
Yann E. MORIN"
e1899ce97c libc/glibc: do not consume parameters when parsing them
Currently, there are two constructs used to parse arguments in
glibc backends, one that consumes args as they are parsed, and
one that does not.

Always use the construct that does not eat args as they are parsed.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-02-13 21:47:25 +01:00
Yann E. MORIN"
af32c9331b libc/glibc: cleanup CFLAGS handling
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-28 17:05:46 +01:00
Yann E. MORIN"
6c47c0077a libc/glibc: remove multi-dir
Remove the sysroot/${multi_dir} directory after the libc install.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-27 16:11:34 +01:00
Yann E. MORIN"
3a31d01b49 libc/glibc: allow to selectively install headers and/or start-files
When doing multilib, we only need the headers from the default variant,
but we need the startfiles for each variants.

Allow the frontend to specify either one, or both.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-27 14:45:03 +01:00
Yann E. MORIN"
9d53aa6475 libc/glibc: add multilib-cacpable backend
For mutlilib, the C library must be built once for each variants.
Special care must be taken to put the resulting libraries in
the proper places.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-23 00:11:36 +01:00
Yann E. MORIN"
a5006075b7 libc/glibc: fix code formatting
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-22 00:51:37 +01:00
Yann E. MORIN"
cfb908d2ee libc/glib: pass installation subdir to backend
When building a multilib variant, install in a separate directory, to
avoid clutering the default or any other variant.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-22 00:16:37 +01:00
Yann E. MORIN"
170091aa2a libc/glibc: set the endian option according to extra CFLAGS
When building a multilib, some extra CFLAGS can override the
default config option. This is the case for the endianness
selection.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-22 00:11:51 +01:00
Yann E. MORIN"
a2e7a536e0 libc/glibc: set the float option according to extra CFLAGS
When building a multilib, some extra CFLAGS can override the
default config option. This is the case for the floating point
selection.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-21 23:56:53 +01:00
Yann E. MORIN"
2d5dc881e3 libc/glibc: add extra CFLAGS when building the C library
When building multilib, we need extra CFLAGS that tell the compiler
to use non-default settings (eg. big/little endian, hard/soft float,
-march/cpu/tune flags, and so on...).

We have to pass these flags to the build.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-21 23:33:08 +01:00
Yann E. MORIN"
d6f8cd9b0a libc/glibc: no default mode for backend
The caller SHALL explicitly ask for a nmode, and not rely on a default mode.
That's what actually happens, so we can get rid of the default.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-13 11:51:07 +01:00
Benoît Thébaudeau"
bcc636057f 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>
2011-12-14 16:55:22 +01:00
Yann E. MORIN"
d68d3cc408 libc/newlib: build manual for newlib
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
[yann.morin.1998@anciens.enib.fr: copy with a single call to 'cp']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-15 15:20:33 +08:00
Yann E. MORIN"
06daaa7cc4 libc/glibc: document the glibc backend arguments
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-21 23:35:21 +01:00
Yann E. MORIN"
7637254dfe libc/glibc: create build dir using libc_mode
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-21 23:26:18 +01:00
Zhenqiang Chen
381366c8b6 libc/newlib: remove hard-coded "-O"
With hard-coded "-O", users can not customize CFLAGS_FOR_TARGET
by CT_TARGET_CFLAGS. If "-O" is needed, users can input it in
CT_TARGET_CFLAGS. By default, "-Os" is enabled.

Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
2011-11-28 16:05:23 +08:00
Zhenqiang Chen
91eb66a629 libc/newlib: add option to optimise for size
Add an option to build with -Os instead of the default -O.

Reviewed-by: Michael Hope
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
2011-11-22 14:18:14 +08:00
Zhenqiang Chen
e714fd6a14 libc/newlib: Add extra config for newlib.
So users can input config like --enable-newlib-register-fini.

Reviewed-by: Michael Hope
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
2011-11-18 11:47:30 +08:00
Yann E. MORIN"
1185c9bf05 libc/uClibc: use endian string in tests
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-20 21:08:27 +01:00
Yann E. MORIN"
756d7e704e libc/eglibc: use endian string in tests
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-20 21:06:36 +01:00
Yann E. MORIN"
74d555b2c3 scripts: add support for building manuals
Add support for building the HTML and PDF manuals for the major
components.  Implement for binutils, GCC, GDB, and GLIBC.

Always build all manuals and install a subset.  Be explicit about the
subset to reduce the clutter and to avoid getting copies of common
manuals like bfd from all of the sourceware based components.  Downside of
being explicit is that you need to update it when a new component
comes along.

Build the manuals as part of the last GCC build, namely 'cc' for glibc
based ones and cc_core_pass_2 for baremetal.

An example of the output is at:
 http://people.linaro.org/~michaelh/incoming/crosstool-NG/

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: depends on ! remove docs; gold manual install]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-16 10:06:21 +13:00
Yann E. MORIN"
bc94e564de libc/uClibc: use the floating-point string option in tests
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-14 18:54:37 +01:00
Yann E. MORIN"
4fc56b1d14 arch: add softfp support
Some architectures support a mixed hard/soft floating point, where
the compiler emits hardware floating point instructions, but passes
the operands in core (aka integer) registers.

For example, ARM supports this mode (to come in the next changeset).

Add support for softfp cross compilers to the GCC and GLIBC
configuration. Needed for Ubuntu and other distros that are softfp.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-19 15:27:32 +13:00
Yann E. MORIN"
28e54116c3 scripts: introduce float type as a string
With the upcoming softfp support, the case..esac test would become
a bit convoluted if it were to test three different booleans.

Introduce a new blind string config option that defaults to the
selected floating point type used.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-19 15:27:32 +13:00
Yann E. MORIN"
315b15109f libc/glibc: run ./configure in CONFIG_SHELL
Tremendously helps when running on at least Ubuntu, with dash as
the system shell (ie. /bin/sh points to dash).

Reported by a few people, of which:
  leming, ccct and ccole on IRC

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-11 22:21:48 +02:00
Yann E. MORIN"
85a85d3cc7 libc/glibc: add log messages for glibc addons dirs and symlinks
Signed-off-by: "Esben Haabendal" <esben.haabendal@prevas.dk>
[yann.morin.1998@anciens.enib.fr: fix linewrap-carnage]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-07 15:23:47 +02:00
Kévin PETIT
1097bea2e0 libc/newlib: add a config option allowing to disable builtin syscalls
Allows to choose if one wants to keep or not the syscalls that are provided with
newlib. It passes the --disable-newlib-supplied-syscalls or
--enable-newlib-supplied-syscalls to the configure script. If one chooses to
disable the builtin syscalls, he/she will have to write his/her own. This can
be usefull to port newlib to a new platform/board.

Signed-off-by: Kévin PETIT <kpet@free.fr>
2011-08-28 20:12:26 +02:00
Yann E. MORIN"
b021021fec libc/uClibc: force use of ctor/dtor
Although ctor/dtor do not seem strictly required, missing them proves
rather inconvenient, as ld can't link binaries.

Reported-by: John Spencer <maillist-uclibc@barfooze.de> (sh4rm4 on IRC)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-13 00:05:51 +02:00
Benoît THÉBAUDEAU"
5938837633 libc: remove unneeded glibc/eglibc common functions
do_libc_locales_extract() and do_libc_locales() in glibc-eglibc.sh-common have
been overridden for both glibc and eglibc, so they can now be removed, which
this patch does.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-07-29 15:30:58 +02:00
Benoît THÉBAUDEAU"
568251c281 libc/glibc: add partial support for locales
This patch adds partial support for glibc locales.

For now, it only generates the appropriate locales when the host and the target
have the same endianness and uint32_t alignment.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-07-29 15:30:53 +02:00
Benoît THÉBAUDEAU"
a88d3d7e7c libc/eglibc: add support for locales
This patch adds support for eglibc locales.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-07-29 14:42:20 +02:00
Benoît THÉBAUDEAU"
d44205998b libc: create an infrastructure to build and install the libc locales
This patch adds a common glibc/eglibc infrastructure to build and install the
libc locales.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-07-29 13:25:57 +02:00
Yann E. MORIN"
f0b0c6666f libc/mingw: fix mingw source dirs
Someof the mingw32 source tarballs have an appended '-src' after the
version.

Since changeset #6e1412ba8da9 (scripts/functions: force extract folder
to archive basename), it means mingw tarballs get extracted in a directory
ending with '-src'.

Fix that.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-01 00:16:12 +02:00
Yann E. MORIN"
03b1bc0302 libc/uclibc: fix src dir location
Now that we akways extract the tarballs in a sane location (see changeset
#6e1412ba8da9: scripts/functions: force extract folder to archive basename),
the uClibc snapshot dir now has the date (as version) in it, eg.:
  uClibc-20100710

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-31 22:07:08 +02:00
Benoît THÉBAUDEAU"
2ea05ecaa7 scripts/libc: do not build add-ons by default
Currently, no --enable-add-ons option is passed to libc configure when
"$(do_libc_add_ons_list ,)" is empty, which makes configure automatically search
for present add-ons. In that case, all present add-ons are built, although
no add-on was selected by the user in the config. Moreover, this can make the
configure fail if some non-standard add-ons like eglibc-localedef are present.

This behavior also leads to an inconsistency from a user point of view between
the following cases:
 - LIBC_ADDONS_LIST="", LIBC_GLIBC_USE_PORTS=n and THREADS="none" in the config,
   which makes "$(do_libc_add_ons_list ,)" return "", so all present add-ons
   are built.
 - LIBC_ADDONS_LIST="", LIBC_GLIBC_USE_PORTS=n and THREADS!="none" in the
   config, which makes "$(do_libc_add_ons_list ,)" return the add-on supporting
   the chosen threading implementation, e.g. "nptl", so only this add-on is
   built.

This patch disables the building of all add-ons in that case.

It is still possible to build all present add-ons by adding --enable-add-ons to
LIBC_GLIBC_EXTRA_CONFIG_ARRAY.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-07-28 22:09:31 +02:00
Yann E. MORIN"
96ab98a14b libc/glibc: fix passing args with spaces when calling backend
Spaces in arguments to the glibc backend were not handled.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-09 19:40:24 +02:00
Yann E. MORIN"
2dfb4412bf libc/eglibc: Add option that allows for getting svn over http://
Instead of getting eglibc over standard svn://svn.eglibc.org
Add an option that allows the user to get source from
http://www.eglibc.org/svn

This is useful if you are behind a firewall or proxy.
If you are behind a proxy, don't forget to configure
${HOME}/.subversion/servers

In the [global] section setup your proxy configuration.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
[yann.morin.1998@anciens.enib.fr: removed useless 'default n']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-30 18:14:01 +02:00
Bryan Hundven
6940a6c0eb glibc: Refactor startfiles/headers into do_libc_backend()
Refactor the contents of 'do_libc_start_files()' and 'do_libc()' into a
parameterized 'do_libc_backend()'. 'do_libc_start_files()' and 'do_libc()'
call 'do_libc_backend()' with either 'libc_mode=startfiles' or
'libc_mode=final' (respectively) so that the startfiles/headers and
the final libc builds are configured and built with the same options.

One example of where this is needed is when building a mips toolchain.
Previously, if you were building an n32 toolchain, you wouldn't have
noticed an issue, because if '-mabi' is not in CFLAGS, n32 is the
default:

http://sourceware.org/git/?p=glibc-ports.git;a=blob;f=sysdeps/mips/preconfigure;hb=HEAD

But when trying to build an o32 or n64 toolchain the build would
have failed. This is because (e)glibc expects "-mabi={o32,n32,n64}" to be
in CFLAGS, but was not previously provided in 'do_libc_start_files()'.
The build failure would happen in the shared-core gcc when it tries to
configure an n64 or o32 gcc with an n32 libc.

A simpler solution would have been to just add TARGET_CFLAGS to configure
in 'do_libc_start_files()', but this way makes configure and make
consistent for both steps.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2011-06-26 03:26:54 -07:00
Yann E. MORIN"
39dedfbcb6 libc/glibc: do not try to download NPTL add-on
The NPTL add-on has always been internal, so there is no
reason to try downloading it, it will never succeed.
Add provision to skip other add-ons as well.

For consistency, do the same test in both glibc and eglibc.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-04 17:15:58 +02:00
Benoît THÉBAUDEAU"
d147fbb201 kconfig: prepend CT-NG's version tag to PKGVERSION
"crosstool-NG-${CT_VERSION}" is currently the default for TOOLCHAIN_PKGVERSION,
and this options is passed as is to --with-pkgversion.

This patch prepends "crosstool-NG ${CT_VERSION}" to TOOLCHAIN_PKGVERSION before
passing it to --with-pkgversion.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-06-03 17:21:56 +02:00
Yann E. MORIN"
93b0db91b4 glibc: properly handle internal addons
Some addons are bundled with glibc/eglibc, so we should not try to
download and extract them.

This is done as thus:
 - at download time:
   - if the add-on download fails, keep going;
 - at extract time:
   - if the addon is present in the source tree, ignore it;
   - if the addon is missing in the source tree:
     - if the archive is present, extract it;
     - if the archive is missing, bail out.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-30 23:05:28 +02:00
Yann E. MORIN"
3d6ce4cd3d libc/eglibc: use generic SVN functions
eglibc is only available from SVN. The script currently calls svn
in its own tortuous and convoluted way.

Use the egeneric SVN extract functions, and sinplify the eglibc
download function.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-31 00:20:44 +02:00
Benoît THÉBAUDEAU"
d558bb995d eglibc: use the PKGVERSION and BUGURL options
This patch makes eglibc benefit from the TOOLCHAIN_PKGVERSION and
TOOLCHAIN_BUGURL options.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-31 20:55:30 +02:00
Yann E. MORIN"
8f32ebcc88 libc/glibc: commonalise extraction btw glibc and eglibc
glibc and eglibc have a very similar extraction process, so it
makes sense to commonalise it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-29 19:24:41 +02:00
Yann E. MORIN"
82fa824f68 libc/glibc: fix {e,}glibc add-ons with short or long names
Fixes the issue with {e,}glibc addons having short and long names (such as
eglibc-ports-2_13 and ports), which caused configure scripts to run
through them twice and thus configuring incorrectly.

For instance, the mips64el-n32-linux-gnu toolchain would be recognized
correctly first, but then the second pass would change it to mips32,
building a mixed MIPS-III N32 and MIPS-I libc.

Signed-off-by: Nicolás Reynolds <fauno@kiwwwi.com.ar>
[yann.morin.1992@anciens.enib.fr: remove spurious trailing spaces]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-27 22:02:30 -03:00