Commit Graph

418 Commits

Author SHA1 Message Date
Romain Naour
77b3c089e9 package/gcc: remove libmudflap option
libmudflap was removed from gcc 4.9 [1] so it depends on gcc <= 4.9.
This option can't be selected since we removed gcc 4.8 from Buildroot
[2].

[1] 4a692aefee
[2] f66952197b

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-08-02 22:51:54 +02:00
Yann E. MORIN
f9d70202c1 package/gcc: drop negative conditions on C-SKY for older versions
Now that the C-SKY architecture requires gcc-9, we can drop the special
conditions on the individual older versions.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Guo Ren <guoren@kernel.org>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Romain Naour <romain.naour@gmail.com>
Acked-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-08-01 10:18:34 +02:00
Yann E. MORIN
b8aad93817 arch/csky: restrict ck610 to the C-SKY gcc port
As Guo explained, upstream gcc does not support abi-v1 (only abi-v2), but
ck610 needs abi-v1 [0] [1]

To simplify things, we make the whole C-SKY architecture require gcc-9
or later, and add a single exception in gcc to force the ck610 to use
the C-SKY port.

Note that this does not change the default gcc version to be used for
C-SKY: the C-SKY port is still always the default one; the gcc-9 version
is only proposed as an alternative (except for ck610, of course).

[0] http://lists.busybox.net/pipermail/buildroot/2019-July/254386.html
[1] package/Makefile.in#73

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Guo Ren <guoren@kernel.org>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Romain Naour <romain.naour@gmail.com>
Acked-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-08-01 10:15:17 +02:00
Alexey Brodkin
3173b9df77 package/gcc/{arc-2019.03,9.1}.0: fix compilation of glibc
When storing a TLS symbol to memory, always use an intermediate
register to load it. Otherwise the compiler generates an instruction
which couldn't be encoded and we see:

----------------------------->8---------------------------
In file included from gethstent_r.c:34:
../nss/getXXent_r.c: In function '__gethostent_r':
../nss/getXXent_r.c:168:1: error: unrecognizable insn:
 }
 ^
(insn 25 24 26 5 (set (mem:SI (plus:SI (reg/f:SI 149 virtual-outgoing-args)
                (const_int 16 [0x10])) [0  S4 A32])
        (plus:SI (reg:SI 25 r25)
            (reg:SI 174))) "../nss/getXXent_r.c":160 -1
     (nil))
during RTL pass: vregs
../nss/getXXent_r.c:168:1: internal compiler error: in extract_insn, at recog.c:2304
In file included from getnetent_r.c:34:
../nss/getXXent_r.c: In function '__getnetent_r':
../nss/getXXent_r.c:168:1: error: unrecognizable insn:
 }
 ^
(insn 25 24 26 5 (set (mem:SI (plus:SI (reg/f:SI 149 virtual-outgoing-args)
                (const_int 16 [0x10])) [0  S4 A32])
        (plus:SI (reg:SI 25 r25)
            (reg:SI 174))) "../nss/getXXent_r.c":160 -1
     (nil))
during RTL pass: vregs
../nss/getXXent_r.c:168:1: internal compiler error: in extract_insn, at recog.c:2304
----------------------------->8---------------------------

Note that this patch is not yet submitted to the GCC's master and
gcc-9-branch but will be submitted soon. That said with th bump of GCC
for ARC this patch will no longer be needed.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Evgeniy Didin <didin@synopsys.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-07-18 22:33:10 +02:00
Alexey Brodkin
69bb37d577 package/gcc/9.1.0: fix ICE on ARC
In a nutshell while compiling glibc GCC raises an Internal Compiler
Error (ICE).

This is a backport of upstream fix [1] for GCC's BUG #89838 [2].
The fix is the same as the one already merged for arc-2019.03 [3].

With the update of GCC to 9.2.0, this patch won't be needed anymore:
it's already merged in both the stable "gcc-9-branch" branch and the
"master" branch.

[1] 472bac30e6
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89838
[3] https://git.buildroot.org/buildroot/commit/?h=dbf7fffb37e25c40fd5c03d0a64e50a1bba86424

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Evgeniy Didin <didin@synopsys.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-07-18 22:32:12 +02:00
Romain Naour
da70a55a19 package/gcc: enable gcc 9.1 for ork1 (openrisc)
openrisc support has been added with gcc 9.1.
Keep for now the old gcc 5 fork for ork1.

https://gcc.gnu.org/gcc-9/changes.html

Tested using qemu_or1k_defconfig.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-07-13 23:09:03 +02:00
Evgeniy Didin
dbf7fffb37 toolchain: fix ARC GCC internal compiller error
With recent arc-toolchain update some packages started to fail with
internal compiler error. This error first was caught while building
glibc-testsuite with upstream gcc-8 and ARC port of glibc. For
more information see BUG 89838:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89838

This commit adds the upstream patch for current version of arc-gcc and
should be removed with update to next version of ARC tools.

Fix in upstream gcc:
https://gcc.gnu.org/viewcvs/gcc?view=revision&sortby=date&revision=272645

Fixes:
http://autobuild.buildroot.net/results/66e/66e8f28ed171b5c8994e6ba8c4e6257d6bbe0191//
http://autobuild.buildroot.net/results/789/789016ff66bb4bcd2667a8c5241a680b98db5b2f//
http://autobuild.buildroot.net/results/dd9/dd9de722b886dee3e6373b026062e1aecc11efd3//

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: arc-buildroot@synopsys.com
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-07-11 22:01:01 +02:00
Romain Naour
0a8cc22331 package/gcc: switch to gcc 8.x as the default
Even if gcc 7 is still maintained for some time (gcc 7.5 is pending),
switch to gcc 8.x since it has been released since 2018-05-02 and
gcc 9.x is available since 2019-05-03.

We have been having toolchains in the autobuilders with gcc
8.x for a while, so the vast majority of the problems should have
already been solved.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-06-22 21:42:16 +02:00
Romain Naour
16951722d7 arch: add BR2_ARCH_NEEDS_GCC_AT_LEAST_9
This new symbol will be used by architectures introduced with gcc 9 and
by external toolchains based on gcc 9.

[1] https://gcc.gnu.org/gcc-9/changes.html

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-06-22 21:38:23 +02:00
Romain Naour
089000eccf package/gcc: add support for gcc 9.1
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
[Thomas: don't allow gcc 9.x for powerpc spe]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-06-22 21:37:46 +02:00
Evgeniy Didin
be0aaaaecd toolchain: bump ARC tools to arc-2019.03 release
This commit finally bumps ARC tools to the most recent arc-2019.03 release version.

ARC GNU tools of version arc-2019.03 bring some quite significant changes like:
 * Binutils v2.32.51.20190308 with additional ARC patches
 * GCC 8.3.1 with additional ARC patches
 * glibc 2.29 with additional ARC patches

More information on this release could be found here:
 https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/tag/arc-2019.03-release

Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: arc-buildroot@synopsys.com
Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-06-19 13:49:46 +02:00
Peter Korsgaard
f590097045 Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-06-02 22:11:20 +02:00
Romain Naour
2df8b1417b package/gcc: don't build a toolchain for powerpc with spe ABI with gcc >= 8.x
The powerpc*-*-*spe* support has been deprecated in GCC 8 [1] and has
been removed in GCC 9 [2].

While building with GCC 8, the build stop since we don't provide --enable-obsolete
option.

For now, keep powerpcspe support in Buildroot but only for older compiler
up to GCC 7.

Note: Although we can't select Glibc for powerpcspe since commit [4], this
support has been removed for the next version of Glibc (the upcoming 2.30).

[1] https://gcc.gnu.org/ml/gcc/2018-04/msg00102.html
[2] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b31d0348ddada49453e3edaaf93a423fdc61dc79
[3] https://sourceware.org/git/?p=glibc.git;a=commit;h=a053e878494080f7070cf92890e546057236c9c9
[4] https://git.buildroot.net/buildroot/commit/?id=5777e3ffd99132a57e3d29659850eec14b1625f8

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-06-01 14:26:34 +02:00
Guo Ren
7873a5bd5e package/gcc: add C-SKY specific gcc version
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-05-31 22:59:57 +02:00
Evgeniy Didin
08c330c464 toolchain: bump ARC tools to arc-2019.03-rc1
This commit bumps ARC toolchain to arc-2019.03-rc1.  We want to test
how new toolchain-rc1 builds packages, so we can make fixes before
release of toolcain.

ARC GNU tools of version arc-2019.03-rc1 bring some quite significant
changes like:
* Binutils v2.32.51.20190308 with additional ARC patches
* GCC 8.3.1 with additional ARC patches
* glibc 2.29 with additional ARC patches

Please note that it is a release candidate and it might contain some
breakages, please don't use it for production builds.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: arc-buildroot@synopsys.com
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-05-14 19:17:42 +02:00
Vadim Kochan
2bce7d7de9 package/pkg-autotools: disable NLS for host packages by default
There is no need for language translaion feature for the host
packages, anyway some of them disable it explicitly, so lets do it
automatically at least for the host-autotools- kind of packages.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-04-04 22:47:25 +02:00
Ed Blake
d586541bd8 package/gcc: select BR2_TOOLCHAIN_HAS_OPENMP if BR2_GCC_ENABLE_OPENMP
BR2_TOOLCHAIN_HAS_OPENMP is also selected by external toolchains, so
can be used by packages to determine OpenMP support.

Signed-off-by: Ed Blake <ed.blake@sondrel.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-03-26 20:17:42 +01:00
Romain Naour
57df4792c3 package/glibc: bump to version 2.29
Changes to build and runtime requirements:

* Python 3.4 or later is required to build the GNU C Library.

* On most architectures, GCC 5 or later is required to build the GNU C
  Library.  (On powerpc64le, GCC 6.2 or later is still required, as
  before.)

While at it, remove the double "glibc-" prefix in the version.

https://www.sourceware.org/ml/libc-alpha/2019-01/msg00723.html

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-03-15 22:27:09 +01:00
Romain Naour
d8605e4bb0 package/gcc: bump to version 8.3.0
Remove upsteam xtensa patches:
68ca69a485
972057cb25

Tested using Toolchain-builder:
https://gitlab.com/kubu93/toolchains-builder/pipelines/48904471

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-02-26 13:09:27 +01:00
Ricardo Martincoski
b03fa5d96f utils/check-package: warn about overridden variables
For the general case, appending values to variables is OK and also a
good practice, like this:
|PACKAGE_VAR = value1
|ifeq ...
|PACKAGE_VAR += value2

or this, when the above is not possible:
|PACKAGE_VAR = value1
|ifeq ...
|PACKAGE_VAR := $(PACKAGE_VAR), value2

But this override is an error:
|PACKAGE_VAR = value1
|PACKAGE_VAR = value2

as well this one:
|ifeq ...
|PACKAGE_VAR += value1
|endif
|PACKAGE_VAR = value2

And this override is error-prone:
|PACKAGE_VAR = value1
|ifeq ...
|PACKAGE_VAR = value2

Create a check function to warn about overridden variables.

Some variables are likely to have a default value that gets overridden
in a conditional, so ignore them. The name of such variables end in
_ARCH, _CPU, _SITE, _SOURCE or _VERSION.

After ignoring these variable names, there are a few exceptions to this
rule in the tree. For them use the comment that disables the check.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Simon Dawson <spdawson@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Tested-by: Titouan Christophe <titouan.christophe@railnova.eu>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-02-05 20:24:57 +01:00
Romain Naour
469987b6d4 package/gcc: remove unused HOST_GCC_FAKE_TESTSUITE
HOST_GCC_FAKE_TESTSUITE was removed since commit [1].

[1] 545ca6a0f2

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-12-10 11:48:22 +01:00
Romain Naour
78fab2a08d package/gcc/7.4.0: remove upstream patch
0001-m68k-coldfire-pr68467.patch is already upstream and backported to
gcc 7.4.0 [1].

[1] 2d1d94491c

Fixes:
https://gitlab.com/ymorin/buildroot/-/jobs/131924271
https://gitlab.com/ymorin/buildroot/-/jobs/131924272

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Reported-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-12-09 16:53:54 +01:00
Romain Naour
587eb69d97 package/gcc: remove arm soft patch
The patch refers to [1] which says "Unfortuantely, arm-gcc defaults to
generating code for armv5t." Since we always explicitly pass the target
CPU for ARM, the default CPU shouldn't matter.

As suggested by Arnout [2], a test based on qemu_arm_versatile_defconfig
has been done without this patch and there is no regression.

[1] https://sourceware.org/ml/crossgcc/2008-05/msg00009.html
[2] http://lists.busybox.net/pipermail/buildroot/2018-May/222104.html

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-12-08 20:56:43 +01:00
Romain Naour
c7e43580f5 package/gcc: remove uclibc-conf patch
This patch is present in Buildroot since a long time and has been rebased on
several version of gcc without beqing upstreamed.  Also it only concern
contrib/regression, which is not used at all during the build...

As suggested by Arnout [1], a test based on qemu_x86_defconfig has
been done without this patch and there is no regression.

[1] http://lists.busybox.net/pipermail/buildroot/2018-May/222104.html

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-12-08 20:56:09 +01:00
Romain Naour
7f283452c8 package/gcc: bump to version 6.5.0
Remove upstream patches:

0002-fix-building-on-ppc64.patch
765527ad37

0003-libsanitizer-Use-pre-computed-size.patch
61f38c64c0

942-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
b685411208

943-sanitizer-linux.patch
8937b94d1a

870-xtensa-fix-PR-target-82181.patch
dbbb835381

871-xtensa-fix-PR-target-65416.patch
36f42654cb

872-gcc-xtensa-fix-NAND-code-in-xtensa_expand_atomic.patch using patch
9f149a1a92

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-12-08 20:54:47 +01:00
Romain Naour
92bab9a23c package/gcc: bump to version 7.4.0
Remove upstream patches:

0002-fix-building-on-ppc64.patch
aa65a43516

0003-gcc-xtensa-fix-NAND-code-in-xtensa_expand_atomic.patch
8709905244

0003-xtensa-fix-PR-target-65416.patch
5dcbd70ec0

0004-libsanitizer-Use-pre-computed-size.patch
61f38c64c0

0005-gcc-xtensa-don-t-force-PIC-for-uclinux-target.patch
6ef0a00dea

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-12-08 20:53:01 +01:00
Evgeniy Didin
2f70946c39 toolchain: fix URLs for ARC gcc/binutils/gdb
In commit cd9d58f1fc ("toolchain: bumb
ARC tools to arc-2018.09 release"), the ARC-specific binutils, gcc and
gdb versions were updated to use the 2018.09 release. However, they
are mistakenly pointing to a branch rather than a tag. This commit
fixes that by using the proper release tag.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: arc-buildroot@synopsys.com
[Thomas: rework commit log]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-12-06 21:05:06 +01:00
Peter Korsgaard
13c43455a0 Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-12-02 08:16:10 +01:00
Alexey Brodkin
3e53b51983 package/gcc: enable __cxa_atexit
This is what GCC manual says [1]:
-------------------------->8----------------------
--enable-__cxa_atexit

    Define if you want to use __cxa_atexit, rather than atexit,
    to register C++ destructors for local statics and global objects.

    This is essential for fully standards-compliant handling of destructors,
    but requires __cxa_atexit in libc.

    This option is currently only available on systems with GNU libc
    ...
-------------------------->8----------------------

Important disadvantages of a simple atexit() are that [2]:
-------------------------->8----------------------
1999 C Standard only requires that the implementation support 32
registered functions, although most implementations support many more.

More important it does not deal at all with the ability in most implementations
to remove DSOs from a running program image by calling dlclose
prior to program termination.
-------------------------->8----------------------

Also it seems like all libc's we support in Buildroot (Glibc, uClibc and musl)
support __cxa_at_exit() so enable it unconditionally.

FWIW if we look around we'll see:
 1. In OpenEmbedded it is enabled for everything except gcc-cross-initial: [3], [4]
 2. In Crosstool-NG it is enabled by default: [5]
 3. In OpenWrt it is disabled only for uClibc, otherwise enabled: [6]

So I think we should be good with it as well.

[1] https://gcc.gnu.org/install/configure.html
[2] https://itanium-cxx-abi.github.io/cxx-abi/abi.html#dso-dtor-motivation
[3] https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-devtools/gcc/gcc-configure-common.inc#L59
[4] https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-devtools/gcc/gcc-cross-initial.inc#L23
[5] https://github.com/crosstool-ng/crosstool-ng/blob/master/config/cc/gcc.in#L270
[6] https://github.com/openwrt/openwrt/blob/master/toolchain/gcc/common.mk#L170

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Nicolas Cavallari <Nicolas.Cavallari@green-communications.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Mark Corbin <mark.corbin@embecosm.com>
Cc: Romain Naour <romain.naour@gmail.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Cc: Claudiu Zissulescu <claziss@synopsys.com>
Cc: Cupertino Miranda <cmiranda@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-11-29 22:12:38 +01:00
Evgeniy Didin
cd9d58f1fc toolchain: bumb ARC tools to arc-2018.09 release
This commit finally bumps ARC tools to the most recent arc-2018.09 release version.

ARC GNU tools of version arc-2018.09 bring some quite significant changes like:
 * Binutils v2.31.1 with additional ARC patches
 * GCC 8.2.1 with additional ARC patches
 * glibc 2.28 with additional ARC patches

More information on this release could be found here:
https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/tag/arc-2018.09-release

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: arc-buildroot@synopsys.com
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-11-29 21:32:51 +01:00
Mark Corbin
2355ebb613 package/gcc: define _REENTRANT for RISC-V when -pthread is passed
The detection of pthread support fails on RISC-V unless _REENTRANT is
defined. This commit backports a patch that is already in upstream gcc
8.x to gcc 7.x to define _REENTRANT when -pthread is passed.

This will replace a number of package-specific fixes that have been
introduced to define _REENTRANT.

Signed-off-by: Mark Corbin <mark.corbin@embecosm.com>
[Thomas: tweak commit log.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-11-24 11:21:19 +01:00
Evgeniy Didin
c786ca2fcb toolchain: Bump ARC tools to arc-2018.09-rc2
This commit bumps ARC toolchain to arc-2018.09-rc2,
which includes significant changes since arc-2018.09-rc1.
We want to test how new toolchain-rc2 builds packages,
so we can make fixes before release of toolcain.
This makes us closer to toolchain release which will be in a few weeks.

Please note that it is a release candidate and it might
contain some breakages, please don't use it for production builds.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: arc-buildroot@synopsys.com
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-11-20 23:13:20 +01:00
Evgeniy Didin
5d4f23cbe6 toolchain: Bump ARC tools to arc-2018.09-rc1
This commit bumps ARC toolchain to arc-2018.09-rc1.
We want to test how new toolchain-rc1 builds packages,
so we can make fixes before release of toolcain.

ARC GNU tools of version arc-2018.09-rc1 bring some quite significant changes like:
* Binutils v2.31.1 with additional ARC patches
* GCC 8.2.1 with additional ARC patches
* glibc 2.28 with additional ARC patches

Please note that it is a release candidate and it might contain some
breakages, please don't use it for production builds.

Signed-off-by: Evgeniy Didin <didin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: arc-buildroot@synopsys.com
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-11-18 20:47:31 +01:00
Max Filippov
4debb2fbb7 package/gcc: fix xtensa uclinux code generation
xtensa-uclinux uses bFLT executable file format that cannot relocate
fields representing offsets from data to code. C++ objects built as PIC
use offsets to encode FDE structures. As a result C++ exception handling
doesn't work correctly on xtensa-uclinux. Don't use PIC by default on
xtensa-uclinux.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-11-09 15:51:07 +01:00
Alexey Brodkin
545ca6a0f2 gcc: Don't mess with test-suite exclusion
We used to exclude GCC's test-suite for quite some time now
mostly for the sake of space reduction.

But:
 1. On each GCC version bump we need to revise that functionality
    as we need to accommodate changes in GCC sources and this
    couldn't be automated

 2. The space reduction is significant, but not huge. The two test
    suites together take up 290MB, out of 660MB total for GCC (each of
    them times two because there is the -initial and -final copy).
    However, whenever we build GCC, we also have kernel headers (about
    900MB) and a libc (e.g. glibc is 250MB). So at best, it saves less
    than 20%.

 3. It doesn't really save on build time either.
    Below are timings of 2 runs on my laptop:

    a) Vanilla master:
    --------------------->8---------------------
    time make host-gcc-final
    real	7m15.114s
    user	19m36.611s
    sys 	2m26.927s
    --------------------->8---------------------

    b) master + testsuite:
    --------------------->8---------------------
    time make host-gcc-final
    real	7m59.860s
    user	20m21.668s
    sys 	2m36.618s
    --------------------->8---------------------

    From figures above it's seen that difference is ~45 seconds
    or ~10%. On both host-gcc-initial and -final we may save ~1.5
    minutes... but these are not the only components we build and
    compared to a total toolchain build time IMHO it is not that
    much time to care especially traded for maintenance costs
    on GCC version bumps.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Cc: Romain Naour <romain.naour@gmail.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
[Arnout: add explanation about size impact.]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2018-11-03 11:49:00 +01:00
Thomas Petazzoni
6561d925f4 package/gcc: remove BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE
Since commit 8f8e9162fa ("package/gcc:
do not mourn avr32 for too long..."), in which we dropped AVR32
support, the BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE is always
'y'. Therefore, it is totally useless to keep this option around, and
this commit removes it, making the corresponding code unconditional
along the way.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-10-21 16:26:59 +02:00
Thomas Petazzoni
6300de5464 package/gcc: introduce BR2_GCC_SUPPORTS_LIBCILKRTS
libcilkrts was introduced in gcc 4.9, and removed in gcc
8.x. Therefore, it does not make sense to pass --disable-libcilkrts in
gcc 8.x and higher. This commit introduces BR2_GCC_SUPPORTS_LIBCILKRTS
that allows the makefile code to know if the selected gcc version
supports libcilkrts or not.

This new option mainly allows to annotate the fact that libcilkrts
exists in gcc [4.9, 7] and that once we have dropped support for those
gcc versions, the libcilkrts related logic can be removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-10-21 16:26:54 +02:00
Thomas Petazzoni
076fd27da7 package/gcc: disable libcilkrts when there is no thread support
The libcilkrts configure script errors out with "Pthreads are required
to build libcilkrts" if the C library doesn't have thread support. To
fix that, we disable libcilkrts when thread support is not available.

This issue was not noticed until now, because we only regularly build
a no-thread toolchain for ARM, and libcilkrts was enabled on ARM only
starting in gcc 7.x.

This fixes the build of no-thread toolchains on architectures where
libcilkrts is supported, i.e x86/x86-64, ARM and Sparc.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-10-21 16:26:47 +02:00
Thomas Petazzoni
cf2b12cbfb arch: drop BR2_GCC_TARGET_CPU_REVISION option
In commit 325bb37942, support for the
Blackfin architecture was removed. This was our only use of
BR2_GCC_TARGET_CPU_REVISION, and since this config option somewhat
complicates the calculation of the --with-cpu/-mcpu option values,
let's drop it.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-10-01 14:52:32 +02:00
Mark Corbin
bd0640a213 arch: allow GCC target options to be optionally overwritten
The BR2_GCC_TARGET_* configuration variables are copied to
corresponding GCC_TARGET_* variables which may then be optionally
modified or overwritten by architecture specific makefiles.

All makefiles must use the new GCC_TARGET_* variables instead
of the BR2_GCC_TARGET_* versions.

Signed-off-by: Mark Corbin <mark.corbin@embecosm.com>
[Thomas: simplify include of arch/arch.mk]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-23 22:17:57 +02:00
Romain Naour
1380f4c9a6 package/gcc: glibc >= 2.27 needs gcc >= 5 on aarch64
With the following defconfig:
BR2_aarch64=y
BR2_BINUTILS_VERSION_2_28_X=y
BR2_GCC_VERSION_4_9_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y

The build fail with this error:
In file included from ../sysdeps/ieee754/flt-32/math_config.h:23:0,
                 from ../sysdeps/ieee754/flt-32/e_expf.c:29:
../sysdeps/aarch64/fpu/math_private.h: In function 'roundtoint':
../sysdeps/aarch64/fpu/math_private.h:311:3: error: implicit declaration of function 'vrndn_f64' [-Werror=implicit-function-declaration]
   return vget_lane_f64 (vrndn_f64 (vld1_f64 (&x)), 0);
   ^
cc1: all warnings being treated as errors

vrndn_f64 function has been introduced in glibc code since version 2.27 [1].
So we can't build a glibc based toolchain with gcc 4.9 anymore.

Add a new dependency in the toolchain infra to avoid selecting
glibc toolchain using gcc 4.9.

[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=72aa623345ada1276ed89dbc00fdff9639cb8eaf

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-16 21:16:01 +02:00
Peter Korsgaard
721e4cbb52 Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-09-07 13:13:17 +02:00
Max Filippov
84efe72b78 package/gcc: xtensa: fix atomic NAND code generation
xtensa gcc incorrectly generates code for atomic NAND operation as
~a1 & a2 instead of ~(a1 & a2). Fix that.

Backported from: r264087
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-05 21:14:47 +02:00
Bernd Kuhls
6b33b7ba51 package/gcc: fix build of gcc-4.9.4 with glibc-2.28
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-14 15:35:20 +02:00
Bernd Kuhls
fb7b010682 package/gcc: fix build of gcc-5.5.0 with glibc-2.28
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-14 15:35:14 +02:00
Bernd Kuhls
9e8cae2958 package/gcc: fix build of gcc-6.4.0 with glibc-2.28
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-14 15:34:56 +02:00
Bernd Kuhls
b9db27a03c package/gcc: fix build of gcc-7.3.0 with glibc-2.28
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-14 15:34:51 +02:00
Bernd Kuhls
5c935f78e7 package/gcc: renumber patch
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-14 14:41:59 +02:00
Joel Stanley
88a161b388 gcc: Fix building on ppc64le GCC 8 host
When building on a ppc64le host we see this error:

    build/genmatch --gimple ../../gcc/match.pd \
        > tmp-gimple-match.c
    ../../gcc/match.pd:120:1 error: expected (, got NAME
       negative value by 0 gives -0, not +0.  */

This was reported upstream[1] and fixed on the GCC 6 [2] and GCC 7 [3]
branches:

    Backport from mainline
    2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>

    * lex.c (search_line_fast): Remove illegal coercion of an
    unaligned pointer value to vector pointer type and replace with
    use of __builtin_vec_vsx_ld () built-in function, which operates
    on unaligned pointer values.

The patches included in Buildroot contain just the code changes, and not
the changelog, to make it easer to manage backporting.

Tested on Ubuntu Cosmic ppc64le.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86162
[2] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=261621
[3] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=262243

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-07-31 22:00:58 +02:00
Romain Naour
b338fb7429 package/gcc: bump to version 8.2.0
Remove upstream patches.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-07-27 09:07:58 +02:00