summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2010-10-08cc/gcc: fix C++ headers locationYann E. MORIN"1-0/+9
In case we build the C++ compiler, we have to tell gcc where to put the C++ headers, or else it will try to # put it in prefix/tuple/include, which we make a symlink to sysroot/usr/include during the build, and that we delete (the symlink!) after the build, but gcc will not look in sysroot/usr/inlcude for C++ headers by default. Implements a fix suggested by: Bryan Hundven <bryanhundven@gmail.com> Reported-by: Anthony Foiani <anthony.foiani@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> (transplanted from a0924619112015bdaa81a0a2313d21ef38607bc2)
2010-08-26scripts/log: do not interpret log string as printf formatYann E. MORIN"1-1/+1
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> (transplanted from 5f01a23be1e427f95806bbf5d880f5ee6839bed1)
2010-08-11scripts: in case of failed download, remove partial filesYann E. MORIN"1-2/+2
It happens from time to time that the server mis-behaves, and breaks the connection right in the middle of nowhere, for no good reason, leaving us with a partial file, on which the extract pass would choke. Remove partial downloads, to fail early. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> (transplanted from eefacabd9e72f3d578e5dc5908026ed780f9a240)
2010-08-11libc/uClibc: fix downloading pregen localesYann E. MORIN"1-1/+1
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> (transplanted from 223aaf040327e204f0801549e9c0cf6225bdf29d)
2010-08-05complibs/cloog: with static ppl, correctly link with libmYann E. MORIN"1-1/+1
On some Fedora boxen (at least FC13), it is also required to link with libm when static ppl is used. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> (transplanted from 5526fb72a893f89286d6daa29da0161ca988a1d0)
2010-08-05cc/gcc: with static ppl, correctly link with libmDarcy Watkins1-2/+4
On some Fedora boxen (at least FC13), it is also required to link with libm when static ppl is used. (transplanted from bcd33fce4db9c18223b59ecdc96f10bf6dd574de)
2010-07-30Fix CT_SanitizePathJohannes Stezenbach1-7/+5
Replace the over-engineered and buggy test in CT_SanitizePath with a straight forward string pattern match, and also handle empty PATH elements which are qeuivalent to ".". Thanks-To: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Johannes Stezenbach <js@sig21.net>
2010-07-29cc/gcc: add option to compile against static libstdc++, for gcc-4.4 and newerJohannes Stezenbach1-4/+10
Idea and know-how taken from CodeSourcery build script. Normal build: $ ldd arm-unknown-linux-uclibcgnueabi-gcc linux-gate.so.1 => (0xb77f3000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb76e8000) libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb75a1000) libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb757a000) /lib/ld-linux.so.2 (0xb77f4000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb755c000) CC_STATIC_LIBSTDCXX=y: $ ldd arm-unknown-linux-uclibcgnueabi-gcc linux-gate.so.1 => (0xb7843000) libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb76e6000) /lib/ld-linux.so.2 (0xb7844000) I made CC_STATIC_LIBSTDCXX default=y since I think it is always desirable. Signed-off-by: Johannes Stezenbach <js@sig21.net>
2010-07-29scripts: remove . from $PATHYann E. MORIN"2-0/+21
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-28cc/gcc: add option to enable/disable libmudflapYann E. MORIN"1-0/+6
For some scenarii, libmudflap is not very usefull or can break the build. Make in an optioon that defaults to 'N' to be on the safe side. For the core gcc-s, there is absolutely no need to build libmidflap. Idea from: Bernhard Pfund <bernhard@chapter7.ch>
2010-07-28cc/gcc: make sjlj config option a tristateYann E. MORIN"1-2/+5
A tristate fits better here than a choice.
2010-07-27libc/uClibc: fix space damageYann E. MORIN"1-37/+37
2010-07-27libc/uClibc: fix using pre-generated locale dataYann E. MORIN"1-4/+19
Some time, someone updated the locale Makefile to use newer pre-generated locales data, but did not upload those. So we just force using the existing, ageing archive, dating back 20030818. Sigh...
2010-07-27libc/uClibc: do not systematically use pre-generated locale dataYann E. MORIN"1-12/+27
It seems that using pre-generated locale data can be more problematic than usefull in some circumstances. Offer a config knob to enable/disable use of the pregen locale data. Also, do not extract pregen locales data ourselves, it's broken.
2010-07-22scripts: add a cross-ldd-likeYann E. MORIN"2-0/+227
Add a cross-ldd that mimicks a native ldd.
2010-07-22libc/uClibc: do not install cross-lddYann E. MORIN"1-11/+0
I was unable to make the cross-ldd from uClibc to work, and it is not possible to build it on non-POSIX system. Besides, we have a generic script that is in the starting-blocks to replace it, that will work for any C library, and also will work on non-POSIX systems. Bonus!
2010-07-19complibs: fix using static companion librariesBart vdr. Meulen1-1/+1
When building a cross-compiler for a target which uses a file extension for binaries the symbolic link to cc is not created correctly because the lookup of the gcc binary is done in a incorrect path Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
2010-07-17scripts/functions: recognise Cygwin build hostsYann E. MORIN"1-1/+1
2010-07-17scripts: use 'hg archive' to create release tarballsYann E. MORIN"1-10/+3
2010-07-15scripts: update config.{guess,sub}Yann E. MORIN"2-29/+62
2010-07-11debug/gdb: properly remove build ticYann E. MORIN"1-1/+1
tic is isntalled in buildtools, not in the toolchain's bin dir. Plus, it may have an extension...
2010-07-11debug/gdb: Fix compilation for Mingw hostsYann E. MORIN"1-61/+72
GDB requires PDcurses instead of ncurses while running on Windows. So, do not always compile ncurses in case GDB needs to build. PDcurses is provided by an earlier build step and is not described in this file. Signed-off-by: Remy Bohmer <linux@bohmer.net> [yann.morin.1998@anciense.nib.fr: we already have a way to detect ncurses usage] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-07-11kernel/mingw: add target librariesYann E. MORIN"1-1/+79
Add several development libraries to the build of the mingw cross-compiler to be used on target Libraries: PDCurses (port of the ncurses library) GnuRX (the regex library) DirectX OpenGL Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com> [yann.morin.1998@anciens.enib.fr: don't show DX and RX versions if disabled] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-07-11kernel: add mingwYann E. MORIN"3-1/+109
Add the option to build a cross-compiler for kernel type 'mingw'. The resulting cross-compiler can be used to build applications on a Linux host that can be run on a Windows target. Compiler is build using the mingwrt and w32-api packages aviable from the MinGW project (http://sourceforge.net/projects/mingw). The windows headers (w32-api package) are extracting with the kernel_headers step The libraries and other headers from both packages are build and installed in the various steps of libc Signed-off-by: Bart vdr Meulen <bartvdrmeulen@gmail.com> [yann.morin.1998@anciens.enib.fr: fix kernel headers comment, don't "return 0"] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-07-10cc/gcc: gcc-4.4 does not use MPCYann E. MORIN"1-6/+6
As reported by Johannes Stezenbach, see thread at: http://sourceware.org/ml/crossgcc/2010-07/msg00017.html
2010-07-02libc/uClibc: enable NPTL for snapshotsYann E. MORIN"1-5/+73
Recently, NPTL has matured a lot in uClibc, and more and more people are interested to at least give it a try. So enable it.
2010-07-02libc/uClibc: fix snapshotsYann E. MORIN"1-4/+19
Snapshots are in a subdir named uClibc, not uClibc-snapshot (or uClibc-YYYYMMDD either).
2010-07-02libc/uClibc: fix munging .config for LT old/newYann E. MORIN"1-7/+4
2010-07-07scripts/finish: do not try to symlink if sed expr is a no-opYann E. MORIN"1-1/+5
If the sed expression does not transform the tuple, do not try to create the symlink.
2010-06-30debug/gdb: fix incorrect pathYann E. MORIN"1-1/+1
Fix discrepancy between the directory we create, and the directory into which we install tic.
2010-06-30libc/glibc: fix installed scriptsYann E. MORIN"1-0/+13
glibc installs some bash-scripts, but uses the path to the buildtool bash as 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 bash on the target *will* be /bin/bash.
2010-06-22scripts/wrapper: fix wrong test when checking access to the reall toolYann E. MORIN"1-1/+1
In C, the proper syntax for a bit-wise OR is a single '|', not two. It worked so far because all was well: - X_OK == 1 - R_OK||X_OK == 1 - the file we searched for had the x-bit set -> access( file, R_OK||X_OK ) worked - inicidentally, the file we searched for also had the r-bit set, but we were not testing that in fact.
2010-06-17cc/gcc: add option do disable PCHYann E. MORIN"1-0/+3
In some cases, using Pre-Compiled Headers breaks the build. Ass an option to disable building the PCH, as suggested by: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
2010-06-17kernel/linux: allow headers from full custom source treeYann E. MORIN"1-8/+49
Accept a local tarball name as the source of the Linux kernel headers, rather than forcing the user to use either an upstream tarball, or a local pre-installed headers tree.
2010-06-15kernel/linux: reorder upstream/custom-tree handlingYann E. MORIN"1-7/+5
2010-06-13cc/gcc: baremetal requires a two-pass processYann E. MORIN"1-4/+12
Here, we implement a highly ugly hack. I'm not proud of that one... To build the libstdc++ library, the compiler requires the C library. In case we build for non-baremetal, this is normally handled by the final step, later. But in the case of bare-metal, we never go through the final step (because it does not work, and it seems complex enough to make it work), so the baremetal compilers are issued out of the core step.
2010-06-13libc/newlib: build in the 'start files' passYann E. MORIN"1-8/+6
A few facts: - building the C library requires a proper core compiler - core compiler is issued from one of the core passes - the C library is required to build libstdc++ - newlib is only built for baremetal - in bare metal, the final compiler is issued from one of the core passes So we need to build the C library between core pass 1 and core pass 2. The only place is eithe libc_headers() or libc_start_files(). The most pertinent seems to be libc_start_files(). So we build newlib from libc_start_files(), and leave libc() empty.
2010-06-13cc/gcc: store core build rules in an arrayYann E. MORIN"1-8/+6
Using an array makes it easier to add new rules. Besides, it is easy to expand from build rules to install rules
2010-06-13cc/gcc: implement default for core optionsYann E. MORIN"1-14/+15
2010-06-13cc/gcc: fix headers copy for core staticYann E. MORIN"1-2/+1
2010-06-08libc/uClibc: apply the threading model to the configurationYann E. MORIN"1-0/+30
The threading model shall be be set in the .config file. Also, offer the choice between 'old/stable' and 'new' linuxthreads.
2010-05-24cc/gcc: Make usage of --enable-target-optspace configurableTitus von Boxberg1-2/+8
Optionally configure to compile gcc-internal libs with -Os. yann.morin.1998@anciens.enib.fr: Rename the config options, it is in the GCC /namespace/.
2010-05-22scripts/build/internals.sh: compile wrapper with portable options.Titus von Boxberg1-6/+6
static linking is not possible on MacOS, and unnessecary on other systems. The old optimization and warning flags crash the gcc on MacOS and (imho) are a bit overdone for this software.
2010-05-22test-suite: apply cleanup passYann E. MORIN"2-17/+11
Remove all non-modifiable items (target tuple, gcc version, toolchain path...) Makefile syntax ( use $(...) instead of ${...} ) Update doc Space-damage cleanups
2010-05-19test-suite: Added new test suite feature (experimental)Martin Lund3-0/+84
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-22scripts/wrapper.c: Under MacOS set DYLD_LIBRARY_PATHTitus von Boxberg1-2/+7
Depending on (predefined) macro __APPLE__, use DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH.
2010-05-22scripts/build/internals.sh: Always use binary wrapper under BSD/MacOSTitus von Boxberg1-0/+7
The shell wrapper script uses a nonportable call to readlink. Thus, always use the binary wrapper under BSD/MacOS. yann.morin.1998@anciens.enib.fr: Use 'case' instead of 'if'.
2010-05-17scripts/wrapper.in: Add a comment about readlink not being portable.Titus von Boxberg1-0/+5
Documented that the call to readlink will not work on BSD systems.
2010-05-19scripts/crosstool-NG.sh.in: On MacOS/BSD use the output of CT_DoConfigGuess ↵Titus von Boxberg1-3/+3
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-19scripts/functions: Use stat correctly on non-GNU (BSD/Darwin) systems.Titus von Boxberg1-1/+11
Call to get the directory mode depending on $CT_SYS_OS yann.morin.1998@anciens.enib.fr: CT_SYS_OS has changed on Linuxsystem, it only gets the kernel name "Linux", and not the system name, 'GNU/'.