Commit Graph

518 Commits

Author SHA1 Message Date
Yann E. MORIN"
b93e67f07c libc/glibc: add fortify option
By default, recent versions of glibc and eglibc will build some
functions that take format strings (eg. printf, syslog...) with
run-time checks against some format string attacks. This is
called a fortified build.

Unfortunately, this fails somehow while building the instrumented
version of syslog, with some kind of circular dependency...

Disable fortified builds by default, and hide the enabling option
behind EXPERIMENTAL for daring users...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-02-21 23:39:46 +01:00
Yann E. MORIN"
6635f8cd2e internals: don't remove lib64 symlinks in sysroot
The lib64 symlinks are needed for the linker to find the libraries.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-02-21 14:39:24 +01:00
Yann E. MORIN"
3f0d43382c comptools: install them side-to-side with build tools
As companion tools might or might not be used to build each
toolchain, they do belong to that toolchain's build tools,
not to the generic override tools.

Fix a typo in the autoconf URL.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-18 22:55:56 +01:00
Yann E. MORIN"
a59b794f9c debug/gdb: add versions from Linaro
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-02-17 23:05:34 +01:00
Yann E. MORIN"
83a004e2c4 cc/gcc: add versions from Linaro
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-02-17 22:29:33 +01:00
Yann E. MORIN"
1339801661 internals: fix stripping host binaries
The gcc used by linaro has a version number specific to Linaro, but
identifies itself with its upstream version numbering scheme.

This breaks the strip in the finish step, because the actual gcc version
is not the same as the configured one (eg. 4.5.2 vs. linaro-4.5-2011.02-0).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-02-17 21:54:07 +01:00
Yann E. MORIN"
1838bb1f15 libc/glibc: add option to force unwind
We make it an option, as not all combinations of architectures
vs. compiler vs. glibc/eglibc exhibit the issue. Mostly visible
on old glibc versions, it seems...

This is a missing part from the glibc/eglibc merger... :-/

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-31 19:52:18 +01:00
Yann E. MORIN"
adbf0ff180 cc/gcc: enable plugins if needed
Enabling plugins in binutils is not enough, and gcc also
needs to be ./configured with --enable-plugins, although
this is not documented anywhere... :-/

Reported-by: karthik duraisami <kdconstant@hotmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-28 18:53:37 +01:00
Yann E. MORIN"
15da72b273 comptools: add make-3.81
Since the advent of make-3.82, some packages now break due to changes
in make-3.82, being stricter than 3.81 when interpreting the Makefiles.

This has bugged us a bit too much so far, and I believe fixing all
of them is a long road, while simply building make-3.81 is the easiest
route for now.

Of course, in the long term, packages will get fixed upstream, and we
should back-port the fixes to old versions, and get rid of building
make-3.81. In the meantime...

Reported several times on the mailing list.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-29 00:57:02 +01:00
Yann E. MORIN"
2014041480 libc/mingw: do not remove support symlink
Under mingw, it seems that there is a mix between the traditional /usr
directory, and a similar-purposed /mingw directory (both in the sysroot).

Currently, we create /mingw as a symlink to /usr, and we removed it in
the libc-finish step.

Unfortunately, this prevents the pre-processor to find the headers.
Keeping the symlink makes it magically work...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-26 00:04:41 +01:00
Yann E. MORIN"
94be1f470c config: add an option to name the sysroot directory
Depending on local policies, some users have expressed a need to
have the sysroot be named differently than the hard-coded name.

Add an option for that.
Default to 'sysroot' to match the existing literature.

While at it, replace 'sys-root' with 'sysroot' everywhere we
reference the sysroot.

Reported-by: Alexey Kuznetsov <Alexey.KUZNETSOV@youtransactor.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-25 20:31:16 +01:00
Yann E. MORIN"
15a1cc2491 libc: remove now unneeded do_libc_headers
do_libc_headers is now a noop, and is no longer used, so remove that step.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-22 22:36:20 +01:00
Yann E. MORIN"
0b773f5823 libc/glibc-eglibc: misc janitorial cleanups.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-20 00:27:36 +01:00
Yann E. MORIN"
129bf2fa66 libc/glibc: add glibc specifics to the shared code, and use it
Final step at sharing code between glibc and eglibc.
Fall, wall of shame, fall!... :-)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-22 22:35:58 +01:00
Yann E. MORIN"
49ab32ffe2 scripts: PARALLELMFLAGS is evil, rename
The reunification of the glibc/eglibc code paths exposed a nasty
bug in the glibc build: use of PARALLELMFLAGS breaks the build.

See the explanations in that bug report against FC6:
    https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=212111

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-22 22:35:43 +01:00
Yann E. MORIN"
b343b0216b libc/glibc: commonalise assembling the list of addons
glibc and eglibc each have two very similar ways of building this list.
This can, and should definitetly, be shared.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-22 22:35:18 +01:00
Yann E. MORIN"
a150a97e44 libc/glibc: commonalise setting of the minimum supported kernel version
It will be possible to use that also with eglibc, so this hunk belongs to
the common code.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-22 22:35:02 +01:00
Yann E. MORIN"
b560936e09 libc/glibc: use the common start_files procedure
Use the common procedure, shared between glibc and eglibc. This requires
that glibc-specific bits be included in the shared procedure.

But still build the full libc with the glibc-specific procedure. This will
be commonalised in a future commit.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-22 22:37:25 +01:00
Yann E. MORIN"
b43ff236bb libc/eglibc: cleanup common code for sharing with glibc
Some stuff is eglibc-specific, so needs to be conditonal.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-17 23:04:57 +01:00
Yann E. MORIN"
cc0894e731 libc/eglibc: move generic code to a common file
The build procedure for eglibc is generic enough to
be shared between glibc and eglibc. This includes:
 - headers install (empty!)
 - start files build
 - complete libc build
 - libc finish (empty!)
 - add-ons list

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-17 23:04:37 +01:00
Yann E. MORIN"
2dd949cd7f libc/mingw: move content of do_libc_headers into do_libc_start_files
It is unnecessary to split C library preparation into two steps, as only
one really makes sense. So, do_libc_headers is bound to be withdrawn
short-term, in favor of do_libc_start_files.

mingw already had all its start files installation in do_libc_headers, and
do_libc_start_files was empty, just migrate the content of the former into
the latter.


Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-22 22:32:44 +01:00
Yann E. MORIN"
7b003fde97 libc/uClibc: move content of do_libc_headers into do_libc_start_files
It is unnecessary to split C library preparation into two steps, as only
one really makes sense. So, do_libc_headers is bound to be withdrawn
short-term, in favor of do_libc_start_files.

uClibc already had all its start files installation in do_libc_headers, and
do_libc_start_files was empty, just migrate the content of the former into
the latter.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-22 22:32:25 +01:00
Yann E. MORIN"
6568c1a39a libc-glibc: remove 2.3.6
This is an obsolete version which is no longer used by any sample (the only
user, the ia64 sample, has been removed).

It also makes the code path a bit complex, with twists just to accomodate
that version. Removing the version will make those twists go away, and
will ease commonalisation of glibc and eglibc in the future (hopefully!).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-03 23:40:22 +01:00
Yann E. MORIN"
a28b593548 arch: remove ia64
ia64 is broken in every gcc/glibc combinations I tested (except for the
existing sample that used very old versions).

Nobody complained on the list about not being able to build recent versions.

So the only way forward I can see is to remove the architecture altogether.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-03 22:02:06 +01:00
Yann E. MORIN"
1ce0dba9d7 kernel/linux: simplify the download URL
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-14 18:36:07 +01:00
Yann E. MORIN"
3de7ced945 kernel/linux: longterm kernel location changed
The location of the longterm Linux kernels on FTP has changed.
Here is a simple (but not very versatile) fix.

Signed-off-by: "Björn A. Herwig" <herwig@gdsys.de>
[yann.morin.1998@anciens.enib.fr: make it generic/versatile]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-14 18:32:38 +01:00
Yann E. MORIN"
23d449366d complibs/cloog: regenerate autostuff files
Latest version of CLooG does not have properly generated autoconf files,
so they need to be regenerated before the call to ./configure

Signed-off-by: "Ilya A. Volynets-Evenbakh" <ilya@total-knowlege.com>
[yann.morin.1998@anciens.enib.fr: make it conditional on 0.15.10 only]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-13 23:20:39 +01:00
Yann E. MORIN"
ba27d02036 debug/ltrace: fix building for mips
ltrace 0.5.3 currently fails to build for target mips because MY_TARGET
(introduced by patches/ltrace/0.5.3/150-allow-configurable-arch.patch)
is set to 'mips' via CT_ARCH, while the mips specific stuff in ltrace
(0.5.3) is stored under sysdeps/linux-gnu/mipsel:

  result: *** No rule to make target `mips/arch.h', needed by `sysdep.h'.
  Stop.

The following patch fixes this issue

Signed-off-by: "Horst Kronstorfer" <horst.kronstorfer@aon.at>
[yann.morin.1998@anciens.enib.fr: reformat commit log]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-08 18:07:02 +01:00
Yann E. MORIN"
e5ded6e946 cc/gcc: build lto-plugin if binutils' gold is built
To properly enable LTO with gold, gcc has to install a plugin that gold
uses to handle the LTO information.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-29 17:58:35 +01:00
Yann E. MORIN"
2841bb7a35 binutils/binutils: add wrapper to gold and ld
When both gold and ld are installed, add a wrapper that calls
to either gold or ld.

In case the wrapper is installed, we also need to symlink ld.bfd
and ld.gold for the core_cc steps.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-29 18:19:40 +01:00
Yann E. MORIN"
8a952d18e0 binutils/binutils: add support for threaded gold
When configured with support for threads, gold can link in
parallel, possibly cooperating with a make jobserver.

Add an option enabling threads.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-02 13:52:16 +01:00
Yann E. MORIN"
e4d610f905 binutils/binutils: add support for plugins
Add an option to enable plugins support in binutils.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-02 13:56:05 +01:00
Yann E. MORIN"
a0d9851dd0 binutils/binutils: add option to enable gold
gold is a new, optimised, multi-threaded linker with support
for plugins.

Add support for gold starting with binutils 2.21. Although 2.20
also had gold, the configure flags have changed, and supporting
2.20 would be a mess in the code.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-28 00:11:33 +01:00
Yann E. MORIN"
b0c69b3cdc complibs/libelf: build with -fPIC
libelf is used by gcc to build the lto-plugin used
by binutils' gold to perform LTO.

This requires that files in libelf be compiled with
-fPIC to generate a proper .so.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-29 02:34:18 +01:00
Bryan Hundven
6bd24a2c73 libc/uClibc: normalize uclibc hidden version names
Hidden version names for uClibc conflicted:

LIBC_UCLIBC_V_0_9_30_2
LIBC_V_0_9_30_1

name them constantly as:
LIBC_UCLIBC_V_<version>

Also update the build script where we use snapshots by version or snapshots by date.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2011-01-03 01:15:30 +01:00
Yann E. MORIN"
88c8168763 internals: properly remove all docs
Part of the installed doc was not removed (if configured to).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-29 19:41:17 +01:00
Bryan Hundven
889eb6df62 libc/eglibc: fix installed scripts
Like rev 2002, eglibc installs some bash scripts, but use the path to the
buildtool bash as the interpreter (on the shebang line). This is only a
symlink to the real bash, and thus is not available at runtime.

Fix that by assuming that shell on the target *will* be /bin/bash.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2010-12-22 22:42:11 +01:00
Yann E. MORIN"
908f4aeab9 kernel/linux: Cleanup unneeded files from 'headers_check' and 'headers_install'
headers_install makes  .install and ..install.cmd files.
headers_check makes    .check   and ..check.cmd   files.
Remove these files uncoditionaly after installing (and checking) header files
into the sys-root.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
[Yann E. MORIN: reformat the patch, move hunk out of headers_check conditional]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-22 22:41:51 +01:00
Kalle Kankare
461ca92d5d complibs/libelf: use host compiler
It appears, that the configure scripts of libelf versions 0.8.13 and
0.8.12 do not honour the --host option. The compiler must be given as an
environment variable or the process will use the command "gcc" as the
compiler.

It seems that this is already done in the function do_libelf_target in
scripts/build/companion_libs/libelf.sh, but not in function do_libelf.
2010-12-03 12:36:44 +01:00
Yann E. MORIN"
a9966d1e1c internals: fix stripping
Do not try to strip any script.

Previously, only shell scripts were ignored, but when the Java frontend
is installed, it also installs a Python script. So we have to ignore
any "script text executable", and not restrict it to "shell script text
executable".

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-12 20:47:40 +01:00
Yann E. MORIN"
2bf2991ebd scripts/internals: strip all executables
Using a list of files to strip misses a few of them.
Now, scan appropriate directories, and strip all ELF
executables and shared objects.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-05 16:27:06 +01:00
Bryan Hundven"
1ad4399072 cc/gcc: build bare-metal gcc statically
- add a new parameter to do_cc_core: build_statically=[yes|no]
- pass build_statically=yes in core_pass_2 when doing bare_metal
- fix handling the static / static libstdc++ / static complibs stuff
- add a commment to keep both blocks (in core and final) in sync

Signed-off-by: "Bryan Hundven" <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-09 18:55:59 +01:00
Bryan Hundven"
118a6a5f98 cc/gcc: build final gcc statically
If the global static option is set, then build the final gcc statically.

Signed-off-by: "Bryan Hundven" <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-09 18:55:42 +01:00
Bryan Hundven"
bf3c89ebb5 binutils/binutils: build statically
If the global static option is set, then build binutils statically.

Signed-off-by: "Bryan Hundven" <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-09 18:55:33 +01:00
Yann E. MORIN"
63750f8841 complibs/cloog: fix linking with libstdc++
This rules out 0.15.5 and previous versions, that did not
have this option, so remove them from the list. Anyway,
they were marked 'OBSOLETE', so it's not a big loss...

[Yann E. MORIN: remove obsolete versions]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-29 00:50:21 +01:00
Yann E. MORIN"
9dbbc8e5f6 scripts: remove aria2c as downloader, retain only curl and wget
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-16 10:00:27 +01:00
Yann E. MORIN"
f1c391e1d9 complibs/CLooG: only install the libraries
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-18 16:51:01 +02:00
Yann E. MORIN"
70309ce671 scripts/xldd: report appropriate load address for 32- or 64-bit
For 32-bit target systems, report 4-byte (8-xdigit) wide adresses,
and for 64-bit, report 8-byte (16-xdigit) wide adresses.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-23 21:35:15 +01:00
Yann E. MORIN"
dc4498ca35 scripts/xldd: fix space-damage
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-23 21:35:01 +01:00
Yann E. MORIN"
b36267c6a6 scripts/xldd: fix version string
The version string was hard-coded.
Now, the version string follows the crosstool-NG version.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-23 21:34:56 +01:00