Commit Graph

66 Commits

Author SHA1 Message Date
Yann E. MORIN"
a2e31b9c53 scripts: squash the multi-slash in the sysroot symlink
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-26 19:13:18 +01:00
Yann E. MORIN"
7817bcebe7 config: add an option not to remove the destination directory
In certain circumstances, removing the destination/installation directory
is a bad idea. For example, when the build environment is already taking
care of sanitising the build tree, and pre-installs stuff in there, it is
a very bad idea to remove the destination directory.

This happens now in buildroot, as the crostool-NG backend now installs the
toolchain in the common host-tools directory, and pre-install there a few
host-utilities (eg. host-automake and host-gawk).

Provide a config knob to turn on/off the removal of the destination
directory, defaulting to 'y' (previous behavior), and forced to 'n' when
used as a backend.

Reported-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-28 22:06:49 +01:00
Yann E. MORIN"
8efc6dae8a scripts: fix double slash in paths
Computed paths may contain double slashes.
This is not an issue but it is just ugly to look at.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-25 21:59:03 +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"
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"
dd9fad50f5 scripts: also overide LANG
On some systems, we also need to overide LANG as well as LC_ALL.

Reported-by: Geoffrey Lee <geoffl@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-01 16:59:39 +01:00
Yann E. MORIN"
ae27f71102 scripts: do not provide to-sysroot include symlink
Do not provide the PREFIX/TUPLE/include -> SYSROOT/usr/include symlink,
and let gcc install its dependable C++ headers were it sees fit to
install them.

See the test by Anthony (by the end of the messages):
  http://sourceware.org/ml/crossgcc/2010-10/msg00129.html
  http://sourceware.org/ml/crossgcc/2010-10/msg00134.html

See also the comment by Arnaud:
  http://sourceware.org/ml/crossgcc/2010-10/msg00157.html

Reported-by: Anthony Foiani <anthony.foiani@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-31 16:50:07 +01:00
Yann E. MORIN"
96c2e11894 scripts: always create lib32 and lib64 symlinks
Unconditionally create the lib32 -> lib/ and lib64 -> lib/ symlinks.

This is reportedly a fix to build a toolchain for a 32-bit target on
a 'pure' 64-bit host (eg. on Fedora FC12, host libs are in lib64/,
and there is no lib -> lib64 symlink, as we can see on other distors,
as Debian). As gcc only puts static host lib in lib64/ (along with
target files in subdirs), we can safely create the symlinks.

Also note that the symlinks are summarily removed at the end
of the build.

Signed-off-by: Anthony Foiani <anthony.foiani@gmail.com>
[Yann E. MORIN: fix a comment, rephrase the commit log]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-07 22:37:06 +02:00
Yann E. MORIN"
ab9b5d109e scripts: hack-in lib32->lib symlinks
Some archs (eg. ppc64 with n32 ABI) will install their
variants in lib32/ instead of lib/, so do for lib32 as
we do for lib64->lib symlinks.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-09-10 12:14:24 +02:00
Remy Bohmer
b1ac0964f4 scripts: add option to strip all toolchain executables
To reduce filesizes of the toolchain and even improve build times
of projects to be build with this toolchain it is usefull to strip
the delivered toolchain executables. Since it is not likely that we
will debug the toolchain executables itself we do not need the
debug information inside the executables itself.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
2010-05-27 23:18:19 +02:00
Yann E. MORIN"
8bd0034057 scripts: remove . from $PATH
Add CT_SanitizePath function which removes entries referring to ., /tmp
and non-existing directories from $PATH, and call it early in the
build script.

If . is in PATH, gcc-4.4.4 build breaks:

[ALL  ]    checking what assembler to use...
/tmp/build/targets/arm-unknown-linux-uclibcgnueabi/build/gcc-core-static/arm-unknown-linux-uclibcgnueabi/bin/as
...
[ALL  ]    config.status: creating as

i.e. "as" is supposed to be the arm-unknown-linux-uclibcgnueabi cross assembler,
but config.status creates a local "as" script which is calling the
host assembler.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
[Yann E. MORIN: style fixes + explanations]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-07-29 19:30:37 +02:00
Yann E. MORIN"
dbd5e50583 test-suite: apply cleanup pass
Remove all non-modifiable items (target tuple, gcc version, toolchain path...)
Makefile syntax ( use $(...) instead of ${...} )
Update doc
Space-damage cleanups
2010-05-22 22:04:31 +02:00
Martin Lund
1779c82ad2 test-suite: Added new test suite feature (experimental)
This patch adds support for installing the gcc test suite. A helper
Makefile is provided for building and running the gcc tests.

The default configuration runs all gcc tests and requires automatic
ssh/scp login access to a networked target board. See README for
more details.

Note: Current feature is tested with the powerpc-unknown-linux-gnu
sample but it should work with others as well.

Signed-off-by: Martin Lund <mgl@doredevelopment.dk>
2010-05-19 17:53:04 +02:00
Titus von Boxberg
16ef145f50 scripts/crosstool-NG.sh.in: On MacOS/BSD use the output of CT_DoConfigGuess for CT_BUILD.
On 64bit MacOS `gcc -dumpmachine` gives i686 for the host machine.
This conflicts with the expectations of some following configure scripts
that a 64bit x86 is given as x86_64; i686 is understood as a 32 bit machine.
config.guess sets the host machine in CT_BUILD correctly.

yann.morin.1998@anciens.enib.fr:
As suggested by Khem RAJ on the ML, always use config.guess.
2010-05-19 18:13:00 +02:00
Titus von Boxberg
a85fc6dcb7 crosstool-NG.sh: suppress failure message from uname -o
On non-GNU systems (BSD/MacOS) there is no uname -o.
Suppress the failure message on these systems in the
call to set CT_SYS_OS (uname -s actually sets this variable).

yann.morin.1998@anciens.enib.fr: remove 'uname -o' altogether.
2010-05-19 18:17:39 +02:00
Yann E. MORIN"
9997da0725 scripts: don't set LD_PRELOAD with static companion libraries
When cpmpanion libraries are built statically, it is useless to set
LD_PRELOAD. Worse, it might break the build in some corner cases.
2010-04-29 00:25:17 +02:00
Yann E. MORIN"
5c6ccff589 scripts: also prepare include symlink to sysroot/include 2010-04-20 09:58:41 +02:00
Yann E. MORIN"
9815852ae0 scripts: check g++ only for host
g++ is only needed when building additonal libs on the HOST,
so check wheter g++ is available for the HOST compiler only

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
[Yann E. MORIN: fix space damage]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-04-19 23:42:31 +02:00
Yann E. MORIN"
1f87ae813c scripts: don't print the build system guess warning 2010-04-15 22:34:11 +02:00
Yann E. MORIN"
58de741ecf complibs: save directory with static complibs for stop/restart 2010-04-11 15:37:53 +02:00
Yann E. MORIN"
a01284b0e2 complibs: don't install in toolchain dir when built as static 2010-04-11 11:10:06 +02:00
Yann E. MORIN"
b0fece4689 tools: move sstrip to the binary utilities menu
sstrip is now alone in its 'tools' menu, and we will probably never gain
any other 'tool'. Besides, sstrip is just strip, but a little bit more
agressive, so it deserves going to the 'binary utilities' menu.
2010-03-17 00:21:57 +01:00
Titus von Boxberg"
00ac124509 scripts: use more portable sed options
No need for extended regular expressions here.
2010-02-03 00:24:24 +01:00
Yann E. MORIN"
991b90f242 comp-libs: make libelf a companion library
When gcc-4.5 is out, it will require libelf. So better make it a
companion library now rather than postponing the ineluctable.
2010-02-17 23:41:17 +01:00
Yann E. MORIN"
26e5cb4021 scripts: fix dumping 'other environment'
Do not sort the environment, it cripples the output.
2010-02-18 00:04:48 +01:00
Titus von Boxberg
bc5c6b3178 scripts: also dump the rest of the environment 2010-02-03 00:24:24 +01:00
Titus von Boxberg
cb62adf58f scripts: use kernel name (uname -s) when system name (uname -o) is not availabe
'uname -o' is a GNU extension.
2010-02-03 00:24:24 +01:00
Yann E. MORIN"
8920a94354 Merge. 2010-01-29 23:46:43 +01:00
Yann E. MORIN"
88d3a95eca global: do not offer the renice option, let's the user handle that
It's broken anyway. Eg.:
- user is already niced at 10
- user configures to renice at 5
- breaks because user is not allowed to 'boost' his/her nice value

Bette let the user handle the renice with:
  nice -XX ct-ng 'action'
2010-01-29 23:14:53 +01:00
Yann E. MORIN"
9e595444f4 binutils/elf2flt: activate elf2flt build
The code has been lying around inactivated for some time.
Let's enable it at last, and see if any one needs it.
2010-01-29 22:43:28 +01:00
Yann E. MORIN"
df2e088c8f companion_tools/autoconf: add autoconf tool
Initial version of adding autoconf as a companion tool.

Signed-off-by: Richard Strand <richard.strand@icomera.com>
[yann.morin.1998@anciens.enib.fr: use generic overide tools dir]
[yann.morin.1998@anciens.enib.fr: update menu entries]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-01-12 21:09:30 +01:00
Yann E. MORIN"
72e623bbc7 scripts/crosstool-ng: Change overide bin dir
Change the overide bin dir so it can be used by companion tools

Signed-off-by: Richard Strand <richard.strand@icomera.com>
[yann.morin.1998@anciens.enib.fr: more generic overide tools dir]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-01-12 21:21:39 +01:00
Yann E. MORIN"
135ea6486f scripts/functions: do not double check if downloads are allowed
Only call the *_get functions if downloads are allowed, so there
is no need to check it again in the retrieval wrappers.
2009-11-25 20:36:04 +01:00
Yann E. MORIN"
5347a90a4f scripts: check for, and warn about an unset CT_PREFIX_DIR
The user shall provide a directory to install the toolchain into.
If he/she does not, this is an error, and shall be detected properly,
rather than relying on failure down the road.

Thanks to "Pedro I. Sanchez" <psanchez@colcan.ca> for pointing out
the issue:
  http://sourceware.org/ml/crossgcc/2009-12/msg00011.html
2009-12-19 12:44:21 +01:00
Yann E. MORIN"
75f0ec107c scripts: correctly warn when the local tarballs directory does not exist
Warn about a missing local tarball directory, only if it was configured.
Avoid the spurious message:
  Directory '${CT_LOCAL_TARBALLS_DIR}' does not exist.
  Will not save downloaded tarballs to local storage.

Thanks to "Pedro I. Sanchez" <psanchez@colcan.ca> for pointing out the
issue:
  http://sourceware.org/ml/crossgcc/2009-12/msg00011.html
2009-12-14 19:17:37 +01:00
Yann E. MORIN"
4a1d73f209 crosstool.sh.in: better mesage when creating script-overrides 2009-09-06 16:49:54 +02:00
Yann E. MORIN"
946a86fb67 [config] Merge CONFIG_SHELL selection. 2009-08-03 08:50:56 +02:00
Yann E. MORIN"
27cdd4367c [config] Allow user to specify custom CONFIG_SHELL
In case the shell the user wants to use as CONFIG_SHELL is located in a
weird place (eg. /opt/bash/bin/bash), or is weirdly named (eg. bash-4),
let the user enter the patch to the shell.
2009-08-02 20:06:44 +02:00
Yann E. MORIN"
d6195c6483 [config] Add bash as a possible CONFIG_SHELL
On some systems and/or for some components, it may be necessary to
explicitly use bash as the shell used by ./configure and Makefiles.
2009-08-02 20:06:06 +02:00
Yann E. MORIN"
a08142a02a [config] Change the way to select the CONFIG_SHELL
Transform the single boolean option to a 'choice' selection
with two options: "sh" and "ash".

This is needed to later add "bash" as override.
2009-08-02 23:43:15 +02:00
Bart vdr. Meulen
a183b3f8bc Add g++ to required tools
Because gmp is now always build with --enable-cxx,
g++ has become a required tool

Signed-off-by: Bart vdr Meulen <bartvdrmeulen@gmail.com>

---
2009-08-02 16:45:33 +02:00
Yann E. MORIN"
f65cb24909 Cleanup the handling of canadian settings
Bring handling the 'canadian' settings as par with the existing
'cross' settings.
2009-06-26 19:09:22 +02:00
Bart van der Meulen
1a84e201d0 Add support code for the canadian-cross case.
Add implementation for a candadian build option already
present in crosstool in order to build a cross-compiler
where build != host != target

Signed-off-by: Bart van der Meulen <bartvdrmeulen@gmail.com>
2009-06-26 19:09:22 +02:00
Bart van der Meulen
c8c70933f0 Don't use prefix/bin to install the buildtools.
Collect the build tools in a seperate folder in order to prevent accidental
calling our newly build tools.

Signed-off-by: Bart van der Meulen <bartvdrmeulen@gmail.com>
2009-06-26 19:09:22 +02:00
Yann E. MORIN"
ecb02cb9dc Use configured shell in all build-tools wrappers
Abide by the user's wish to use dash as shell in
build-tools wrappers, instead of plain /bin/sh.
2009-06-23 22:56:39 +02:00
Bart van der Meulen
f9d93f2b91 Fix creating the .../lib/ directory structure in the non-sysroot case
The symbol link that is created in the sysroot directory only needs
to be made when the cross compiler is build with the sysroot option

Signed-off-by: Bart van der Meulen <bartvdrmeulen@gmail.com>
2009-06-23 22:52:14 +02:00
Yann E. MORIN"
b816a5e6c9 Also set CT_DEBUGROOT_DIR for non sysroot-ed toolchains.
In the non-sysroot-ed case, the debuf-root directory would not be set;
debug tools would have been installed God-only-knows-where...

Spotted by Bart van der Meulen <bartvdrmeulen@gmail.com>.
2009-06-23 22:52:13 +02:00
Yann E. MORIN"
4f48f57e86 Remove left-over debug lines.
Remove two lines of code that were commented out and are definitely not used.
2009-06-23 22:49:50 +02:00
Yann E. MORIN"
56a26d84e1 Check paths sanity before they get used.
Don't use the PATHs before they get checked for sanity.
2009-06-22 21:53:09 +02:00
Yann E. MORIN"
f8828f22c3 Better check for spaces in paths
Spaces are evil in paths. Print the path that contains a sapce.
Don't print computed paths, as they'rebased on provided paths,
and don't get space added into them.
2009-06-22 21:51:14 +02:00