Commit Graph

66 Commits

Author SHA1 Message Date
Yann E. MORIN"
951a749ffb cc/gcc: fix building core when building statically
There was a mishap when cut-n-pasting code from the final
step into the core step: a variable was not renamed.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-03-27 00:09:42 +01:00
Yann E. MORIN"
babb494db3 cc/gcc: log even more
Also log variable assignement for single commands.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-03-20 01:17:27 +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"
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"
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"
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
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
Yann E. MORIN"
5ddca154bb Merge. 2010-10-24 22:03:53 +02:00
Yann E. MORIN"
8b275095e0 Revert #a09246191120: cc/gcc: fix C++ headers location
This was intended as a fix for g++ not finding its headers,
but it breaks in othe horrible ways. So just revert it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-24 22:03:47 +02:00
Anthony Foiani
92898249bd scripts: add "FILE" and "CFG" debug levels.
I ran into some minor difficulties looking through the build log for a
particular file: I wasn't interested in seeing it unpacked, but only
when it is built or installed.  Adding these two levels allows me to
differentiate between those cases.

[Yann E. MORIN: Those are blind log levels, and are used only to search
 in the build-log afterward.]

Signed-off-by: Anthony Foiani <anthony.foiani@gmail.com>
2010-10-22 22:02:57 +02:00
Yann E. MORIN"
2b912ba840 cc/gcc: fix 128-bit long doubles option
Spotted by Arnaud LACOMBE:
  http://sourceware.org/ml/crossgcc/2010-10/msg00122.html

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-20 15:25:38 +02:00
Yann E. MORIN"
cbd352f9ac cc/gcc: fix C++ headers location
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>
2010-10-08 23:37:12 +02:00
Yann E. MORIN"
b17f8707c1 cc/gcc: add an option to enable/disable build of libssp
libssp is the run-time Stack-Smashing Protection library.
It can be usefull to have or miss, depends...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-09 11:38:04 +02:00
Yann E. MORIN"
8922def6b4 cc/gcc: add an option to enable/disable build of libgomp
libgomp is the GNU implementation of the OpenMP API.
It can be usefull to have or miss, depends...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-08 23:58:58 +02:00
Yann E. MORIN"
416eb29198 cc/gcc: add option to enable 128-bit long doubles
Needed by some PPC targets, at least.
Requires gcc 4.2+ (noticed by Arnaud LACOMBE).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-09 22:49:28 +02:00
Yann E. MORIN"
8b0af28c69 cc/gcc: fix enabling/disabling LTO
There is a ./configure option for that.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-08 23:51:38 +02:00
Yann E. MORIN"
9176074aec cc/gcc: disable complibs if not selected
Force gcc to not link with some companion libraries when
there are not needed (because selected-out).

There is no option to tell gcc *not* to build the Graphite and/or
LTO stuff. They *will* be built if gcc finds the suitable companion
libraries. If we do not provide them, but the host has them, then
gcc *will* find them, and link with them.

Consider the following:
- host has suitable PPL and CLooG (eg. Debian Squeeze)
- user wants to build gcc>=4.4
- user de-selects GRAPHITE
- gcc will find the hosts PPL and CLooG, and will use them
- the user moves the toolchain to an older host that does
  not have them (eg. Debian Lenny)
- the toolchain fails, when it was properly setup not to

So, explicitly tell gcc *not* to use unneeded companion libs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-09-12 23:51:25 +02:00
Yann E. MORIN"
d34a5ec7d8 cc/gcc: do not force use of non-vital companion libraries
While GMP and MPFR are required by gcc>=4.3 (to build the frontends),
and MPC is required by gcc>=4.5, the other libs are not. If they are
present then gcc will enable advanced features; if they are missing,
then gcc will (should) simply disable those features.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-09-12 20:54:54 +02:00
Darcy Watkins
f30a7df9c9 cc/gcc: with static ppl, correctly link with libm
On some Fedora boxen (at least FC13), it is also required
to link with libm when static ppl is used.
2010-08-05 18:19:07 +02:00
Johannes Stezenbach
143f02e0ce cc/gcc: add option to compile against static libstdc++, for gcc-4.4 and newer
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-29 19:47:16 +02:00
Yann E. MORIN"
8bb436dad1 cc/gcc: add option to enable/disable libmudflap
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-28 23:55:10 +02:00
Yann E. MORIN"
61ebaa97ca cc/gcc: make sjlj config option a tristate
A tristate fits better here than a choice.
2010-07-28 23:53:09 +02:00
Bart vdr. Meulen
25bb99693a complibs: fix using static companion libraries
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-19 23:16:02 +02:00
Yann E. MORIN"
b81d232a9b kernel: add mingw
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-11 21:36:20 +02:00
Yann E. MORIN"
4144845579 cc/gcc: gcc-4.4 does not use MPC
As reported by Johannes Stezenbach, see thread at:
  http://sourceware.org/ml/crossgcc/2010-07/msg00017.html
2010-07-10 15:25:10 +02:00
Yann E. MORIN"
8b8f2c17ba cc/gcc: add option do disable PCH
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-17 21:26:23 +02:00
Yann E. MORIN"
656dae57eb cc/gcc: baremetal requires a two-pass process
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-13 23:38:37 +02:00
Yann E. MORIN"
399e7f8f8a cc/gcc: store core build rules in an array
Using an array makes it easier to add new rules.
Besides, it is easy to expand from build rules to install rules
2010-06-13 20:43:02 +02:00
Yann E. MORIN"
3983fe1184 cc/gcc: implement default for core options 2010-06-13 20:31:42 +02:00
Yann E. MORIN"
7b3c12d9a3 cc/gcc: fix headers copy for core static 2010-06-13 20:25:00 +02:00
Titus von Boxberg
d2d3c15c14 cc/gcc: Make usage of --enable-target-optspace configurable
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-24 16:34:55 +02:00
Remy Bohmer
9c6c090d7b cc/gcc: use proper host compiler for canadian bare-metal
While compiling a canadian toolchain for host=mingw32, build=linux,
target=m68k-elf the build fails because in this step of the gcc build
the Host compiler is used in this stage with the build-flags for the
build system. This results in an error where the header <sys/wait.h>
cannot be found.
This problem happens at least in the GCC-4.3.x and GCC-4.4.x range.

This is solved by passing the proper compilers on the Make cmd-line

Signed-off-by: Remy Bohmer <linux@bohmer.net>
2010-04-09 21:04:37 +02:00
Bart vdr. Meulen
76ae48462a cc/gcc: allow building a canadian bare-metal compiler
Previous addition of the canadian cross compiler did not allow
to build a baremetal only variant, no reason why this is not
allowed

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
2010-04-20 10:06:04 +02:00
Yann E. MORIN"
a6da1aa63a cc/gcc: fix cc symlink when executables have an extension
When building a cross-compiler for a host which depends
on file extensions the symlink for cc was not installed correctly

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
[Yann E. MORIN: style fixes, enhancements, code prettying]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-04-20 11:39:13 +02:00
Yann E. MORIN"
3c160b2205 cc/gcc: add support for 4.5.0 or later versions
starting with 4.5.0, gcc requires libelf.
2010-04-15 22:35:18 +02:00
Yann E. MORIN"
bf86627982 scripts/functions: make CT_Patch dumber
It is the responsibility of the caller to split the package name from
its version. It already knows that.
2010-04-11 23:18:10 +02:00
Remy Bohmer
9ccad74f02 cc/gcc: add bugurl and compiler version to core gcc compiler
When building for bare-metal the core-gcc compiler is delivered
as final compiler, so the version info and bugurl is useful
in the core compiler as well.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
2010-04-09 21:04:33 +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"
5b27e8de52 complibs: allow either static or shared build 2010-04-11 00:47:23 +02:00
Yann E. MORIN"
5b663e2aae complibs: build static libraries 2010-04-10 23:43:08 +02:00
Arnaud Lacombe
93042972a8 cc/gcc: fix thread-less final gcc build
If threads are disabled in libc, we don't want to enable them in the
final compiler. Doing so pass the configure stage, but fails latter on
a missing <pthread.h>.

Moreover, we don't want to build libgomp if threads are disabled; its
configure script would fails anyway.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2010-04-07 18:35:22 +02:00
Arnaud Lacombe
2059d43d86 cc/gcc: fix recent gcc build
This fix missed conversion of CT_GCC_USE_* to CT_CC_GCC_USE_*.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2010-04-07 18:35:21 +02:00
Yann E. MORIN"
8e47201cf2 cc/gcc: fix use of companion libraries 2010-03-05 18:55:25 +01:00
Yann E. MORIN"
3eaa187de5 complibs: split-up selection for individual libs 2010-02-17 23:47:47 +01:00
Yann E. MORIN"
83a48e12f0 Allow setting --enable-cxx-flags on gcc ./configure
Some setups require one to pass extra CXX flags at the time of ./configure.
Make it easy.
2009-08-19 19:44:45 +02:00
Yann E. MORIN"
f255716872 Make gcc's extra_config an array containing ./configure options
Change extra_config from a string to a array of options.
2009-08-19 19:44:42 +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
Yann E. MORIN"
637b137512 /devel/gcc-4.4:
- add gcc-4.4.0 patches, vampirised from the Gentoo patchset
- gcc-4.4.0 auto-selects and uses appropriate companion linraries

 -------- diffstat follows --------
 /devel/gcc-4.4/scripts/build/cc/gcc.sh                             |   20    18     2     0 +
 /devel/gcc-4.4/patches/gcc/4.4.0/280-freebsd.patch                 |  188   188     0     0 ++++++++++
 /devel/gcc-4.4/patches/gcc/4.4.0/140-default-format-security.patch |   98    98     0     0 +++++
 /devel/gcc-4.4/patches/gcc/4.4.0/290-freebsd.patch                 |  128   128     0     0 +++++++
 /devel/gcc-4.4/patches/gcc/4.4.0/310-uclibc-conf.patch             |   70    70     0     0 ++++
 /devel/gcc-4.4/patches/gcc/4.4.0/240-libstdc++-pic.patch           |  106   106     0     0 ++++++
 /devel/gcc-4.4/patches/gcc/4.4.0/260-sh-libgcc-stacks.patch        |   50    50     0     0 +++
 /devel/gcc-4.4/patches/gcc/4.4.0/100-alpha-mieee-default.patch     |   48    48     0     0 +++
 /devel/gcc-4.4/patches/gcc/4.4.0/180-libgomp-no-werror.patch       |   24    24     0     0 +
 /devel/gcc-4.4/patches/gcc/4.4.0/170-sparc64-bsd.patch             |   58    58     0     0 +++
 /devel/gcc-4.4/patches/gcc/4.4.0/200-libiberty.h-asprintf.patch    |   30    30     0     0 ++
 /devel/gcc-4.4/patches/gcc/4.4.0/220-libiberty-pic.patch           |   22    22     0     0 +
 /devel/gcc-4.4/patches/gcc/4.4.0/110-trampolinewarn.patch          |   54    54     0     0 +++
 /devel/gcc-4.4/patches/gcc/4.4.0/160-netbsd-symbolic.patch         |   22    22     0     0 +
 /devel/gcc-4.4/patches/gcc/4.4.0/190-flatten-switch-stmt-00.patch  |   48    48     0     0 +++
 /devel/gcc-4.4/patches/gcc/4.4.0/150-default-fortify-source.patch  |   52    52     0     0 +++
 /devel/gcc-4.4/patches/gcc/4.4.0/340-libmudflap-susv3-legacy.patch |   96    96     0     0 +++++
 /devel/gcc-4.4/patches/gcc/4.4.0/120-java-nomulti.patch            |   92    92     0     0 +++++
 /devel/gcc-4.4/patches/gcc/4.4.0/270-sh-pr24836.patch              |   48    48     0     0 +++
 /devel/gcc-4.4/patches/gcc/4.4.0/330-c99-snprintf.patch            |   24    24     0     0 +
 /devel/gcc-4.4/patches/gcc/4.4.0/230-superh-default-multilib.patch |   24    24     0     0 +
 /devel/gcc-4.4/patches/gcc/4.4.0/250-ia64-noteGNUstack.patch       |  158   158     0     0 +++++++++
 /devel/gcc-4.4/patches/gcc/4.4.0/300-pr40105.patch                 |  360   360     0     0 ++++++++++++++++++++
 /devel/gcc-4.4/patches/gcc/4.4.0/210-arm-unbreak-armv4t.patch      |   24    24     0     0 +
 /devel/gcc-4.4/patches/gcc/4.4.0/130-cross-compile.patch           |   78    78     0     0 ++++
 /devel/gcc-4.4/patches/gcc/4.4.0/320-missing-execinfo_h.patch      |   24    24     0     0 +
 /devel/gcc-4.4/config/cc/gcc.in                                    |    1     1     0     0 +
 27 files changed, 1945 insertions(+), 2 deletions(-)
2009-05-27 21:16:01 +00:00
Yann E. MORIN"
f149116490 /devel/gcc-4.4:
- gcc build script: no longer use the gcc-4.4 snapshot version

 -------- diffstat follows --------
 /devel/gcc-4.4/scripts/build/cc/gcc.sh |   33    13    20     0 +++++++++++++--------------------
 1 file changed, 13 insertions(+), 20 deletions(-)
2009-05-25 20:09:17 +00:00