Age | Commit message (Collapse) | Author |
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
libgfortran did not have the GCC exception in the same manner as
libgcc had.
Change-Id: If48ab6e6775da235c8fdd0ca4e835acf1e831252
Signed-off-by: Santhosh Nadig <santhosn@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This can save configure time since it runs configure multiple times:
$ time bitbake gcc-runtime -cconfigure
60s -> 54s
Saved 6s
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
In OE we do not build mutlib like gcc does it by default, this ensures
that mutlilib is virtually disabled for OE, since we hardly use same gcc
to build for multiple ABIs
This fixes cases in SDK where g++ is not able to find standard c++
include headers
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We no longer have special "libc" for gcc so we can rely on plain
virtual/libc and reduce the complexity in the dependencies.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Separated out from the previous commit for clarity, this simply drops
all the -inital pieces of gcc which are no longer needed after the
previous commit.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We need a libgcc to build glibc. Tranditionally we therefore build
a non-threaded and non-shared compiler (gcc-cross-initial), then use
that to build libgcc-initial which is used to build glibc which we can
then build gcc-cross and libgcc against.
Firstly, we can drop the glibc dependency from gcc-cross, *if* we make
two changes:
a) specify the minimum glibc version to support in a configure option
b) create a dummy limits.h file so that later when glibc creates one,
the headers structure has support for it. We can do this with a simple
empty file
Once gcc-cross is libc independent, we can use it to build both
libgcc-initial and then later libgcc.
libgcc-initial is tricky as we need to imitate the non-threaded and
non-shared case. We can do that by hacking the threading mode back to
"single" even if gcc reports "posix" and disable libc presence for the
libgcc-intial build. We have to create the dummy limits.h to avoid
compiler errors from a missing header.
glibc will fail to link with libgcc-initial due to a missing "exception
handler" capable libgcc (libgcc_eh.a). Since we know glibc doesn't need
any exception handler, we can safely symlink to libgcc.a.
With those changes, gcc-cross can be used in all places and we only need
one build of gcc for each architecture.
For some reason ifunc was being disabled on mips prior to these changes
but afterwards became enabled but caused assertion failures. This is
therefore disabled until we can debug that.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
libmpx is not supported any longer and infact has been removed
completely from gcc-9, see
https://github.com/gcc-mirror/gcc/commit/1e42d5c637e1b1f65dfddd0923dfb25676bb56e5
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
For reasons lost in the depths of time, perhaps performane related,
we only have a dependency on libc at packaging time. This is too late,
as demonstrated by a recent build failure on non-IA builds where
the glibc 2.29 upgrade had been removed from the build:
ld: recipe-sysroot/usr/lib/../lib/libstdc++.so: undefined reference to `log@GLIBC_2.29'
libstdc++ should have been rebuilt but had not as the dependency
wasn't present.
Add the missing dependency to avoid this problem (and drop the other
form of dependency which is no longer needed).
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We've had gcc 8.2 around for long enough that 7.3 can be removed now.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
There are four functions using TFmode type (128bit) that isn't
available when building with musl. Move each of them from common
ppc64-fp.c to individual files referenced from t-float128 that used
when ldbl 128 enabled at configure time.
For gcc-7.3 if -mfloat128 is given -mfloat128-type must be given too.
Exclude ibm-ldouble.c when ldbl 128 isn't enabled at config time.
Build and boot tested with musl (no float128) and glibc (float128
and ibm128 on PowerPC64).
Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
When building for powerpc64 using musl as C library we get preprocessor
macro redefinition errors since gcc-configure-common.inc adds #define
of STANDARD_STARTFILE_PREFIX_1 and STANDARD_STARTFILE_PREFIX_2 to
gcc/defaults.h after ones added by a patch that ensures target gcc
headers included.
Since gcc-configure-common.inc included in every gcc recipe either
directly or indirectly, do_configure task is not disabled/deleted for
any of them (except gcc-source.inc) and there is no precondition that
skips gcc/defaults.h patching in
gcc-configure-common.inc::do_configure_prepend() we can just remove
conflicting parts of mentioned above patch to have single place where
start files prefixes defined in do_configure() task.
Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
By default GCC for ARC is configured with ARC700 CPU.
This means when we don't pass "-mcpu=xxx":
a) Code will be compiled for ARC700
b) Libs will used for ARC700
And if we happen to run on ARCv2 core like ARC HSxx we
won't be able to use target gcc w/o "-mcpu=xxx" which
is not very convenient as we want to build "target" toolchain
but not canadian-cross.
Note the trick here is we set TUNE_PKGARCH in just 2 values,
it is either "arc700" for all ARCompact cores (ARC750 & ARC770)
and "archs" for all ARCv2 cores (ARC HS38 & HS48), see [1].
This gives us usable defaults.
For cross-compilation we use TUNE_CCARGS for fine-tuning depending
on which HW features we have on the current target so that
we may have HW feature A & B or B & C or A & B & C, see [2].
[1] https://github.com/foss-for-synopsys-dwc-arc-processors/meta-synopsys/blob/master/conf/machine/include/tune-arcv2.inc#L4
[2] https://github.com/foss-for-synopsys-dwc-arc-processors/meta-synopsys/blob/master/conf/machine/include/tune-arcv2.inc#L34
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Without this the build fails for armv6t targets due to invalid
assembler instructions in thumb mode.
[YOCTO #12929]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Passing --with-mpfr and --with-mpc when compiling the cross compiler
appears to be at best unnecessary, and at worst can cause build failures.
Firstly, the paths passed in gcc-cross-canadian are using the undefined
${layout_exec_prefix}. This results in configure passing
-I${STAGING_DIR_HOST}/include twice to the compiler when it's doing its
test builds. This is mostly pointless since that directory doesn't exist
with the default oe-core configuration - the correct path would be
-I${STAGING_DIR_HOST}/usr/include.
The path for mpfr passed in gcc-cross is correct, but unnecessary since it
is just the sysroot default.
I've gone back through the history, and it seems that these lines (or
similar ones) were originally added way back in
8800d8be25295dd7c7d84dde62c3be4df8e43346 for GCC 4.1.1 in 2006! I asked[1]
if anyone knew why this was necessary but received no response, so I can
only assume that no-one knows.
I've successfully built for various targets with this patch applied and
observed no problems.
[1] http://lists.openembedded.org/pipermail/openembedded-core/2018-September/155971.html
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
GCC's built-in spec for LD is missing a space after
"--eh-frame-hdr" thus with the next option merged together they
are not understood by LD and so LD fails.
Back-port from upstream GCC, see:
https://github.com/gcc-mirror/gcc/commit/892142379c6b99fe8c3ebdfe0b79e2a435228c1d
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The libitm is not supported on ARC, so disable it
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
These patches may as well be merged together as they affect the same code
and things are clearer this way.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
C++ applications that contain a specfic use of std::pair with tempates
cause the build to require many gigabytes of RAM to build.
This is a fix that was applied to the upstream GCC 7 branch.
Change-Id: I213f96d1d6332e2dce5765482ff3413f1abd7ff8
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
When building on ppc64le hosts that have GCC 8 (such as Ubuntu 18.10)
the GCC build bootstrap fails.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86162
This is a fix that was applied to the upstream GCC 7 branch.
Change-Id: I7796d2a999ec420805dd1c6cf0a1ecba1de5a897
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Refresh 0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
to also define GLIBC_DYNAMIC_LINKER relative to SYSTEMLIBS_DIR on riscv.
Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This is especially needed when defaulting to hard-float ABI
Fixes errors e.g.
cc1: error: -mfloat-abi=hard: selected processor lacks an FPU
Fixes [YOCTO #12795]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Originally these ARM specific EXTRA_OECONF options were applied to
both gcc for the target and gcc-cross. That lead to a compromise
being made: gcc on the target was configured to default to an ARM
architecture which was at least compatible with the target (but not
necessarily an exact match) and gcc-cross was configured default to
armv7a for both armv7a and armv7ve (to avoid gcc-cross rebuilds when
switching between the two).
However, when these ARM specific EXTRA_OECONF options were moved from
gcc-configure-common.inc into gcc-target.inc (ie they were made to
apply only to gcc on the target) the compromise no longer needed to
be made.
http://git.openembedded.org/openembedded-core/commit/?id=851937dde81de2a9ef54c5f19a78fb12fb82afd4
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The patch was previously removed for gcc7 but came back with gcc8.
http://git.openembedded.org/openembedded-core/commit/?id=f71bc69e5b7581c53071055b694bb0dbfe4b4a87
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Apply patch from Taras Kondratiuk <takondra@cisco.com> to gcc 8.x too.
Normal gcc-cross has build-id feature enabled by default, so most of
target binaries has build-id. But libc (glibc, musl) doesn't have
build-id, because it is built with gcc-cross-initial.
Build-id is a useful feature, so enable it for gcc-cross-initial too.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Normal gcc-cross has build-id feature enabled by default, so most of
target binaries has build-id. But libc (glibc, musl) doesn't have
build-id, because it is built with gcc-cross-initial.
Build-id is a useful feature, so enable it for gcc-cross-initial too.
Signed-off-by: Taras Kondratiuk <takondra@cisco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
This patch adds the posibility to build using TCLIBC=newlib.
It allows users to build baremetal applications with the use of a
C library.
Newlib is a lightweight C library meant to be used on embedded systems,
it is meant to be easily portable for new platforms and to provide
basic functionality on them, by design, it provides stubs for some of
these core functions declared as weak, so they can be built correctly
and then linked against some other library which provides specifics
about the platform being used if need be, libgloss takes care of these
in some cases, but it can also be extended, this patch also allows the
user to easily add other libraries to it by adding them to
NEWLIB_EXTENDED for this specific reason.
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
|
|
Newlib is a C library that is intended to be used on embedded systems.
It is a conglomeration of several library parts, all under free software
licenses that make them easily usable on embedded products.
Newlib provides a C library alternative that can run on baremetal, mainly
for resource constrained devices.
Libgloss is the BSP part of the C library, which can be easily modified
to port for new hardware platforms.
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
|
|
* otherwise it fails with:
sanitizer_linux.s:5749: Error: lo register required -- `ldr ip,[sp],#8'
@ 1538 "../../../../../../../../../work-shared/gcc-8.1.0-r0/gcc-8.1.0/libsanitizer/sanitizer_common/sanitizer_linux.cc" 1
swi 0x0
cmp r0, #0
bne 1f
ldr r0, [sp, #4]
ldr ip, [sp], #8
blx ip
mov r7, #1
swi 0x0
1:
mov r0, r0
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This will solve the mcpu/march conflicts we get when -mcpu=cortex-a7
is passed on cmdline since it will become incompatible with default
ifuncs in libatomic which is using armv7-a
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fixes installed-vs-shipped QA errors
Reported-by: Dan McGregor <danismostlikely@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The patch seems to have been left behind when other uClibc specific
patches were purged from gcc in:
http://git.openembedded.org/openembedded-core/commit/?id=ec03023d2165b49a52b83bac1ea2f0bfded7b852
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
libssp is implemented fully in glibc as well as in musl
so we really do not need the gcc version of this library
except may be for mingw, where we keep it enabled anyway
gcc in OE is built with the knowledge that C library
already provides libssp implementation, we should therefore
not need the gcc implementation of same.
libssp_nonshared piece is a detail which is needed when gcc
is the compiler, in glibc this is part of libc_nonshared.a
already and libc_nonshared.a is linked always when linking
with -lc becuase libc.so in glibc is actually a linker script
GROUP ( /usr/lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /usr/lib/ld-linux-x86-64.so.2 ) )
which automatically links in the needed runtime bits, this however
is not the case for musl, where core SSP APIs are implemented in full
but compiler specific runtime isn't, for this we add a new package
called libssp_nonshared which generate the needed runtime stub
and gcc is already carrying patch to link to libssp_nonshared.a
on musl
This should fix a long standing problem where static PIE executable
were not buildable with OE since it was conflicting SSP implementation
one from C library and the other one from gcc and we end up with
duplicate symbol errors during linking.
Backport a patch from trunk which enhances enable|disable-libssp
to not only disable building libssp but also not emit the gcc
specs to use it for subsequent linking when stack-protector options
are used on compiler cmdline
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
aarch64 has been supported since GCC 5.1, sparc has been supported
since 4.9, and S390 since 7.1.
Also mark as broken entirely with musl.
Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We allow to set LINKER_HASH_STYLE to be empty so this would fail
since --with-linker-hash-style needs an argument and cant be empty
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Backport a patch to fix an ICE when compiling for MIPS64.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Due to patch fuzz, it was applied again, so the same code sequence was
repeated twice. Not sure if that caused any bugs, but certainly wasn't
the right thing to do.
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Fix an internal compiler error on PPC from building a specific test:
$ $CC -S 7d-02.c
7d-02.c: In function รข:
7d-02.c:11:5: internal compiler error: in copy_to_mode_reg, at explow.c:612
vec_st(v, i*16,p);
^~~~~~
The failure appears to happen on all optimizations levels as well.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Whenever "-mno-sse" is used, "-mfpmath" should be set to 387.
The test case should be modified accordingly as below:
/* { dg-additional-options "-mno-sse -mfpmath=387 " { target { i?86-*-* x86_64-*-* } } } */
Original patch from: RAGHUNATH LOLUR <raghunath.lolur@kpit.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
This patch is already in gcc-7-branch
https://github.com/gcc-mirror/gcc/commit/6e6c7fc1e15525a10f48d4f5ac2edd853e2f5cb7
Thanks nsz for noticing it
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
These functions were moved to meta/lib/oe in 2010 and the base_* functions in
utils.bbclass were intended to be a short-term compatibility layer. They're
still used in a few places, so update the callers to use the new functions.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The static PIE patch was updated by Juro Bystricky <juro.bystricky@intel.com>
to work with gcc 7.3.
This update from the stable gcc 7 branch includes the retpoline
functionality which is useful to assist with recent security issues.
Two backported patches were dropped as they're included in 7.3.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|