summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
Commit message (Collapse)AuthorAgeFilesLines
* gcc-runtime.inc: Add CPP support for x86-64-x32 tuneJuro Bystricky2016-11-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Using the following setup (as specified in yocto sample code): MACHINE = "qemux86-64" require conf/multilib.conf MULTILIBS = "multilib:libx32" DEFAULTTUNE_virtclass-multilib-libx32 = "x86-64-x32" We fail to compile simple CPP programs because CPP cannot find relevant header files, looking for them in a non-existing place. To fix this, we create a symlink of the name CPP expects and point it to the corresponding existing directory. [YOCTO#10354] [YOCTO#10380] (From OE-Core rev: 9f9be229040f4f9a523a1e25afd78d5c3f4efc23) (From OE-Core rev: 979b28c55c3b9b0134dbddbb09e30b9bf0db9231) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime.inc: add CPP support for mips64-n32 tuneJuro Bystricky2016-11-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the problem where the CPP compiler cannot find include files. The compiler is configured to look for the files in places that do not exist. When querying the CPP for search paths, we observe messages such as these: multilib configuration: MACHINE="qemumips64" require conf/multilib.conf MULTILIBS = "multilib:lib64 multilib:lib32" DEFAULTTUNE = "mips64-n32" DEFAULTTUNE_virtclass-multilib-lib64 = "mips64" DEFAULTTUNE_virtclass-multilib-lib32 = "mips32r2" ignoring nonexistent directory "<path>/sysroots/mips64-n32-poky-linux-gnun32/usr/include/c++/6.2.0/mips64-poky-linux/32 single lib configuration: MACHINE="qemumips64" DEFAULTTUNE = "mips64-n32" ignoring nonexistent directory "<path>/sysroots/mips64-n32-poky-linux-gnun32/usr/include/c++/6.2.0/mips64-poky-linux/ To fix this, create a symlink of the name CPP expects and point it to the corresponding "gnun32" directory. [YOCTO#10142] (From OE-Core rev: 55115f90f909d27599c686852e73df321ad1edff) (From OE-Core rev: fe61e95a3368d0bc0e66958d0e703b1e3c40c9bb) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libgcc-common.inc: Fix broken symlinks for multilib SDKJuro Bystricky2016-11-081-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes broken "32" symlinks for multilib settings: MACHINE = "qemuarm64" require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "armv7a" and MACHINE = "qemux86-64" require conf/multilib.conf MULTILIBS = "multilib:libx32" DEFAULTTUNE_virtclass-multilib-libx32 = "x86-64-x32" [YOCTO#8642] [YOCTO#10380] (From OE-Core rev: 2810671a0f96776c135137f27a5ca52194ddd692) (From OE-Core rev: 1c9a1b518d4c653799d4f6ca4bc5ef191fa8a349) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc, qemuppc: Explicitly disable forcing SPE flags for 4.9Pascal Bach2016-09-231-0/+11
| | | | | | | | | | | This ports the missing changes from commit: 7a51776a830167e43cbd185505f62f328704e271 from 5.3 to 4.9 so that qemuppc can be compiled. (From OE-Core rev: e625a25c473948d8c97eae5be9914f608f6a95bf) Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-5.3: fix build for gcc-6Tim Orling2016-07-272-0/+158
| | | | | | | | | | | | | Backport upstream patch. It had been applied to 4.9, but not 5.3. [YOCTO #9897] (Fedora-24) (From OE-Core rev: 41756d499f1c5ed57bcb7e3e8ab768ec020086f6) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: make sure header path is set correctlyAnuj Mittal2016-07-061-1/+0
| | | | | | | | | | | | | | | | | | | We're setting the native header paths in do_configure_prepend, and don't need to set them again here. This results in gcc-target not being able to locate the headers and not being able to detect glibc version, which in turn results in SSP support not getting detected even though it's available in libc. (From OE-Core rev: 463909e876a66555d5df628591bace8cea0a6b0c) Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 85630aa894278e7818c867179dc19ca2fbd994fc) Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-5: Fix hang with mmusl option on cmdlineKhem Raj2016-07-061-36/+36
| | | | | | | | | | | | | | | | | When using -m32 -mmusl options in this order, gcc hangs in parsing the options decode_cmdline_options_to_array() the reason is that we have broken the link when adding mmusl options, the order of specifying libc was not kept in order as a result it was unable to contruct the array correctly and ended in parse hang. We fix the options to specify the order properly. (From OE-Core rev: b6f1b26db8a1da2aae9557eeb8aae5beb7af1a06) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime, libgcc: Symlink c++ header and startup files in target_triplet ↵Khem Raj2016-06-292-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | for SDK use We build SDKs such that gcc-cross-candian is built for only one target *-*-linux and then use -muclibc or -mmusl to let it compile code for other libc variants. This works fine when libc = glibc however it does not work for c++ programs when libc != glibc since there are c++ headers installed under ${includedir}/c++/${BINV}/${TARGET_SYS} which is fine when gcc-runtime and gcc-cross-candian uses same --target options gxx includedir searches in right triplet, but it fails with musl/uclibc since gcc will look for glibc based triplet but gcc-runtime will install them under musl/uclibc triplet. This patch symlinks the musl/uclibc triplet to glibc triplet when libc != glibc This fixes SDKs for musl/uclibc (From OE-Core rev: 610c48be139b046860a234baccf13d1e6fafe2b4) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-sanitizers: Depend on target gccJussi Kukkonen2016-06-291-1/+1
| | | | | | | | | | | | | | Without this the target gcc might not be in the sysroot leading to configure failure. (From OE-Core rev: 329c532db4b2124fa3f4b3ab8c4c6d6c93ca7c2f) (From OE-Core rev: 198a992cc1e30f1d061d97595c4f08e9a0bade76) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-4.9: fix build with gcc 6Ioan-Adrian Ratiu2016-05-182-0/+152
| | | | | | | | | | | | | Building gcc-cross 4.9.3 with gcc 6 fails with the following error: error: 'const char* libc_name_p(const char*, unsigned int)' redeclared inline with 'gnu_inline' attribute This is a backport of the upstream fix. (From OE-Core rev: 178c1253c4e50d287476436abc92781fa96ef4fc) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Security fix CVE-2016-4490Armin Kuster2016-05-172-0/+271
| | | | | | | (From OE-Core rev: 927a53784f2cdc63332628f3c7938ce78a54c23b) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Security fix CVE-2016-2226Armin Kuster2016-05-172-0/+104
| | | | | | | (From OE-Core rev: 3152fc813db81398bd225323f7de3d59034ed879) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Security fix CVE-2016-4489Armin Kuster2016-05-172-0/+57
| | | | | | | (From OE-Core rev: 448e625c566d305e70321bdfbbaa39be34211704) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Security fix CVE-2016-4488Armin Kuster2016-05-172-0/+74
| | | | | | | (From OE-Core rev: de673641ec75b20a73eda81f3e7e8a8259993a14) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: obey ldflags in the link of libgccChristopher Larson2016-05-174-0/+34
| | | | | | | | | | | | | Explicitly obey it, the way it should, rather than only relying on --with-linker-hash-style. (From OE-Core rev: 146f601c7ff8d7af7e3704eaec815cec51953c4f) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-common.inc: String format tweak for available tunesnoel eck2016-04-141-1/+1
| | | | | | | | | | | | | Small change to python string formatting for error logging. Previously, tune and availtunes would print out at the end of the log message. This change allows them to print out in the correct locations of the error string. (From OE-Core rev: 65fb2a4af127d32f31fbe696c80de5bafd953200) Signed-off-by: noel eck <kceleon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Fix musl ldso name for mips64Khem Raj2016-03-301-11/+15
| | | | | | | | | | | Now we have mips64 port of musl and there is a name for ldso, backport the fix from upstream gcc master (From OE-Core rev: fd37da3a559e0c494c7481849746ec12d492a7b2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-5.3/gcc-4.9: -fdebug-prefix-map support to remap relative pathHongxu Jia2016-03-304-0/+104
| | | | | | | | | | | | For relative path in DWARF, -fdebug-prefix-map could not remap it, so translate to real path before mapping. [YOCTO #9305] (From OE-Core rev: e50d23c30cd8259941b25e336b11cd96e4f6cd31) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Backport fixes for musl ssp configurationKhem Raj2016-03-293-1/+129
| | | | | | | | | | | | | | | | | | We were trying to inject cached configure variables via EXTRA_OECONF, but that was not working due to the fact that gcc configure is called recursively via makefiles and hence these were getting lost. These backports from master fixes the problem by defining the options in configure itself dl_iterate_phdr is provided by musl as well, so lets not depend on glibc defines like inhibit_libc alone (From OE-Core rev: b3f80743cd1b9a15a8ee4d20c2a54c2f6cbcd13c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-5.3/gcc-4.9:Reuse -fdebug-prefix-map to replace -ffile-prefix-mapHongxu Jia2016-03-204-0/+88
| | | | | | | | | | | | | | | | The oe-core may use external toolchain for compiling, which did not support -ffile-prefix-map. Since we use -fdebug-prefix-map to do the same thing, so we could reuse it to replace -ffile-prefix-map. [YOCTO #7058] (From OE-Core rev: cec9ee4d32d96e8717f63268a00888260eae1b30) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-5.3/gcc-4.9:replace build path with target path in __FILE__Hongxu Jia2016-03-204-0/+570
| | | | | | | | | | | | | | | | | | | Similar -fdebug-prefix-map, add option -ffile-prefix-map to map one directory name (old) to another (new) in __FILE__, __BASE_FILE__and __builtin_FILE (). With this patch, it fixes build path issue which caused by __FILE__. We do not need to use relative path to compile any more. [YOCTO #7058] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268 (From OE-Core rev: 5e3dd820df41ab032893497a9ccea2160c07fe66) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime.inc: set LICENSE for all gcc-runtime packagesAndre McCurdy2016-03-201-5/+4
| | | | | | | | | | | | LICENSE_${PN} doesn't apply to all gcc-runtime packages. Set LICENSE instead. Without this fix, gcc-runtime packages such as libstdc++ are excluded from rootfs for builds which blacklist GPLv3. (From OE-Core rev: 9406a8ab8fd166b9d90b33b84b6d44f8672ab623) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Fix the license on GNU OpenMPHelio Chissini de Castro2016-03-121-32/+4
| | | | | | | | | | | | | | | | | | | Poky jethro has libgomp ( GNU OpenMP ) license marked as GPL-3.0, where's in fact the correct is GPL-3.0 with GCC Library Runtime Exception As stated on https://github.com/gcc-mirror/gcc/blob/master/libgomp/libgomp.h header license: ... Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. ... (From OE-Core rev: 07db569a91e2aa8456624b340830c0e027cc6ead) Signed-off-by: Helio Chissini de Castro <helio.castro@bmw-carit.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "gcc: Fix the license on GNU OpenMP"Ross Burton2016-03-121-3/+3
| | | | | | This reverts commit 892fbe373c5cff7b2f28b58aa2508b47e53d3e63. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Disable libitm for MicroBlazeNathan Rossi2016-03-111-0/+1
| | | | | | | | | | Disable libitm as it is not supported on MicroBlaze. (From OE-Core rev: 18f127765f1cdcf531f29c58641a256c199d888c) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Fix the license on GNU OpenMPHelio Chissini de Castro2016-03-111-3/+3
| | | | | | | | | | | Poky jethro has libgomp ( GNU OpenMP ) license marked as GPL-3.0, where's in fact the correct is GPL-3.0 with GCC Library Runtime Exception (From OE-Core rev: e24c8be86080bd67ef1c5aa3b9885396dc2774b2) Signed-off-by: Helio Chissini de Castro <helio.castro@bmw-carit.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Disable libitm for nios2Marek Vasut2016-03-101-0/+1
| | | | | | | | | | | | | | The libitm is not supported on nios2, so disable it. (From OE-Core rev: 9c67db02d89b48fe151a292faf65db81dd3baf50) Signed-off-by: Marek Vasut <marex@denx.de> Cc: Ley Foon Tan <lftan@altera.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Ross Burton <ross.burton@intel.com> Cc: Thomas Chou <thomas@wytron.com.tw> Cc: Walter Goossens <waltergoossens@home.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime.inc: disable libitm for little endian MIPS tooAndre McCurdy2016-03-071-0/+2
| | | | | | | | | | libitm is already disabled for big endian MIPS, but needs to be disabled for little endian MIPS targets too. (From OE-Core rev: 421e8ac60ff6eb87e66ebeab6f14d74216386578) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Add support for atomic opertions (libitm) where availableMark Hatle2016-03-022-1/+23
| | | | | | | | | | GCC 4.7 and newer have supported various automic operation directives, however these have not been previously enabled. (From OE-Core rev: 8cb4ac49677b1eae4047fc1abbd728f093a24b72) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: use relative path for configure scriptHongxu Jia2016-02-284-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The absolute path (/path/to/configure) caused __FILE__ to be an absolute path. If 'assert' invoked, it uses __FILE__, and build path would be in elf files. In assert.h ... .# define assert(expr) \ ((expr) \ ? __ASSERT_VOID_CAST (0) \ : __assert_fail (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION)) ... Which triggered buildpaths QA issue: ... | libgcc-5.3.0: File work/core2-64-poky-linux/libgcc/5.3.0-r0/packages-split/ libgcc-dev/usr/lib64/x86_64-poky-linux/5.3.0/libgcc.a in package contained reference to tmpdir [buildpaths] ... Use relative path to run configure can fix the problem. [YOCTO #7058] (From OE-Core rev: b806e4c004a7e10461fe7428fc130a5aa2528039) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Upgrade to 2.23Khem Raj2016-02-211-1/+1
| | | | | | | | | | | Drop kconfig and options-group support Forward port cross-localedef support Assume ssp support in libc when building gcc-initial (From OE-Core rev: 9c3d461c4d54d684b38ec4c038a1c3c2fb9923f0) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-5.3: backport fix for PR-target-65358Martin Jansa2016-02-192-1/+309
| | | | | | | (From OE-Core rev: f8616c30870670992c00be349bedf64b35833c34) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Backport nios2 r31 fixMarek Vasut2016-02-182-0/+104
| | | | | | | | | | | | | | | | | | | | Backport a fix from GCC mainline, which fixes libpcre 8.38 and expat 2.1.0 build on nios2. The example of the fixed error follows: | ./nios2-poky-linux-libtool --silent --mode=compile nios2-poky-linux-gcc -mel -mhw-div -mhw-mul --sysroot=/mnt/work/Yocto/build-nios2/tmp/sysroots/10m50 -I../expat-2.1.0/lib -I. -O2 -pipe -g -feliminate-unused-debug-types -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o lib/xmltok.lo -c ../expat-2.1.0/lib/xmltok.c | {standard input}: Assembler messages: | {standard input}:4988: Error: r31 cannot be used with jmp; use ret instead | {standard input}:9703: Error: r31 cannot be used with jmp; use ret instead | {standard input}:20068: Error: r31 cannot be used with jmp; use ret instead | {standard input}:24020: Error: r31 cannot be used with jmp; use ret instead | Makefile:196: recipe for target 'lib/xmltok.lo' failed | make: *** [lib/xmltok.lo] Error 1 | WARNING: exit code 1 from a shell command. (From OE-Core rev: 24b0f08ae4fbaf285d494ab53a3b168a6dd17b20) Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-4.9/5.3: Ignore -fdebug-prefix-map in producer stringHongxu Jia2016-02-184-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport from upstream master. The discussion detail: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69821 Compile without this fix: objdump -g packages-split/lib32-glibc-dev/usr/lib/gcrt1.o ... | <5f> DW_AT_producer : (indirect string, offset: 0x1b): GNU C99 5.3.0 -m32-march=core2 -mtune=core2 -msse3 -mfpmath=sse -mpreferred-stack-boundary=4 -g -O2 -std=gnu99 -fgnu89-inline -fdebug-prefix-map=/buildarea/raid0/hjia/buil d-20160127-yocto-buildpath-2/tmp/sysroots/lib32-qemux86-64= -feliminate-unused-debug-types -fmerge-all-constants -frounding-math -ftls-model=initial-exec ... Compile with this fix: objdump -g packages-split/lib32-glibc-dev/usr/lib/gcrt1.o ... | <5f> DW_AT_producer : (indirect string, offset: 0xa1): GNU C99 5.3.0 -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mpreferred-stack-boundary=4 -g -O2 -std=gnu99 -fgnu89-inline -feliminate-unused-debug-types -fmerge-all-constants -frounding-math -ftls-model=initial-exec ... [YOCTO #7058] (From OE-Core rev: a0d444a2e3e1b6b095f30b7fe1c9cfd8bce5a845) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: musl related fixes for ppc/secure-plt and gthrKhem Raj2016-02-073-0/+146
| | | | | | | | | | | These issues are fixing building gcc for target, ppc issue helps in fixing discrepency between gcc cmdline and linker cmdline (From OE-Core rev: 6af50d8865335aed68fb4f9b319edb81ce93a04e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Assume libssp and dl_iterate_phdr on muslKhem Raj2016-02-071-0/+1
| | | | | | | | | | | gcc configure fails to set these settings correctly on musl based builds (From OE-Core rev: f1cdd7bf1d9351005867b5c77c05fdddfc9656fd) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Fix build on musl with -fstack-protectorKhem Raj2016-02-074-12/+59
| | | | | | | | | | | | | | | | | When enabling the secutity flags on musl based targets the builds fail due to libssp(gcc-runtime) build asking to link with libssp and libssp_nonshared.a when configuring libssp itself. This does not work with musl since it does provide ssp implementation but not like glibc where these libraries are separate to libc Fix the nios2 patch with upstream status while at it and generate the patch after applying to my tree (From OE-Core rev: 77fb841f2e747dc7fb5e9234d870a7a32a74d09b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-configure-common.inc: drop --enable-target-optspace from configureAndre McCurdy2016-02-022-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | Configuring gcc with --enable-target-optspace (which causes gcc to append "-g -Os" to the default CFLAGS_FOR_TARGET and so force libgcc etc target libraries to always be optimised for size) dates back to the very first commit in oe-core git in 2005 (for gcc 3.4.3). Configuring gcc with --enable-target-optspace is not done widely elsewhere (it's not used for Ubuntu or Fedora host gcc, the Linaro binary toolchain or in Buildroot since early 2015). Sometime around gcc 4.5.x it caused problems for powerpc and so was disabled for that architecture: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810 This patch removes --enable-target-optspace completely (ie powerpc is no longer a special case) and allows optimisation of libgcc etc to be controlled directly by the flags present in TARGET_CFLAGS. (From OE-Core rev: 686b266506a1a56fb68ab0f00d658787dd7fe4ce) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* machine/include: drop tune-cortexm*.inc and tune-cortexr4.incAndre McCurdy2016-02-021-2/+0
| | | | | | | | | | | | | | The Cortex M1, M3 and R4 CPU tuning files are poorly tested (if at all). They have no obvious users either inside or outside oe-core. Until OE officially gains support for CPUs without an MMU, these tuning files are probably better maintained outside of oe-core (e.g. in a separate meta-nommu layer). (From OE-Core rev: 7a1445c55de904115b950c8e50432a9f11f02208) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc, qemuppc: Explicitly disable forcing SPE flagsKhem Raj2016-01-311-8/+16
| | | | | | | | | | | | | | | | | | | | | G4 does not have SPE, so we make that explicit in the tune files and since we emulate G4 when building Qemu, we ensure it for qemuppc as well. GCC config for powerpc-linux is made to include SPE by default which is equivalent if the tripet was powerpc-linux*spe, this forces gcc to configure assembler to enable -mspe by default, when we do that then the kernel fails to compile with binutils 2.26, since newer assembler is smart to detect the tlbia instructions are not compatible with SPE and hence the kernel build breaks rightly. We configure the kernel for G4 as well where it enables tlbia instrucitons rightly so because it thinks its being configured for power4. So we keep the options but do not force -mspe down to assembler as default. (From OE-Core rev: 7a51776a830167e43cbd185505f62f328704e271) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross.inc: drop pruning of PATCH_GET from the testgcc scriptAndre McCurdy2016-01-301-1/+0
| | | | | | | | | | | PATCH_GET is no longer exported by bitbake.conf, so no longer needs to be pruned from the gcc-cross do_compile() environment. (From OE-Core rev: 386d1617f1e6e293506b751faa41ff8c37348973) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: fix hidden weak symbols by removing buggy gcc patchMathieu Desnoyers2016-01-302-63/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are noticing the presence of the following patch in various openembedded gcc versions: 0024-PR-target-32219.patch However, contrarily to its "Backport" status, that patch is not upstream in gcc, and it breaks handling of start/stop automatic weak hidden symbols we use in lttng-ust. We are only experiencing problems on the various openembedded compilers, but on no other distro (with same compiler versions), which led us to suspect a buggy distro-specific gcc patch. We've been testing with openembedded gcc-4.9.2-r0. Rebuilding the gcc compiler with this patch removed fixes the lttng-ust issue. Link: http://lists.openembedded.org/pipermail/openembedded-core/2016-January/116306.html Link: http://lists.lttng.org/pipermail/lttng-dev/2014-May/023112.html Link: https://gcc.gnu.org/ml/gcc-help/2014-05/msg00042.html Link: http://cgit.openembedded.org/openembedded-core/commit/?id=3cb2b003db7371b3a47d02c08352a262e1e419b4 Link: https://sourceware.org/bugzilla/show_bug.cgi?id=15435 (From OE-Core rev: 3e98ba4d6c1d1e4919ce373ec031d41c2538f10b) Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross-canadian: Add missing DEPENDS on virtual/${HOST_PREFIX}gcc-crosssdkRichard Purdie2016-01-261-1/+1
| | | | | | | | | The cross-canadian compiler needs the nativesdk compiler to build but for some reason this was missing. Add the missing dependency. (From OE-Core rev: 77fcdfdc83f01f1ff0ae310ebb7bffbdb4330156) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime.inc: provide libquadmathIoan-Adrian Ratiu2016-01-201-1/+3
| | | | | | | | | | | libgfortran's build fails with "ld: cannot find -lquadmath" unless libquadmath is added to gcc-runtime's RUNTIMETARGET (From OE-Core rev: 80333155db8fa53fb52898c4312daa656de89c3b) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: switch to removal override syntax to modify CXXFLAGSJoshua Lock2016-01-191-1/+1
| | | | | | | | | | | | The use of immediate expansion can cause issues when trying to override variables, further the removal override syntax is clearer than oe_filter_out () — switch to using removal override syntax instead. (From OE-Core rev: 19995268da27af93af6f718fab0434178a1079ce) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-configure-common.inc: duplicate armv7a over-ride for armv7veAndre McCurdy2016-01-151-0/+1
| | | | | | | | (From OE-Core rev: 02c3ac6f066ccd1cbb6e457080bf10db5d6abfe0) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc5: Fix build on NIOS2Marek Vasut2016-01-112-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gcc 5.3 does not build on NIOS2 due to a missing MUSL_DYNAMIC_LINKER definition in it's config file. Add the definition to fix the build issue. The output produced during the failing build is as follows: g++ -isystem/b/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -L/b/tmp/sysroots/x86_64-linux/usr/lib -L/b/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/b/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/b/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/b/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/b/tmp/sysroots/x86_64-linux/lib -Wl,-O1 gcc-ar.o -o gcc-ar \ file-find.o libcommon.a ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a In file included from ./tm.h:27:0, from /b/tmp/work-shared/gcc-5.3.0-r0/gcc-5.3.0/gcc/gcc.c:34: ./config/linux.h:92:28: error: expected ',' or ';' before 'MUSL_DYNAMIC_LINKER' BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) ^ ./config/linux.h:59:60: note: in definition of macro 'CHOOSE_DYNAMIC_LINKER1' "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" ^ ./config/linux.h:91:3: note: in expansion of macro 'CHOOSE_DYNAMIC_LINKER' CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ ^ ./config/nios2/linux.h:40:25: note: in expansion of macro 'GNU_USER_DYNAMIC_LINKER' -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \ ^ /b/tmp/work-shared/gcc-5.3.0-r0/gcc-5.3.0/gcc/gcc.c:884:32: note: in expansion of macro 'LINK_SPEC' static const char *link_spec = LINK_SPEC; ^ <command-line>:0:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] /b/tmp/work-shared/gcc-5.3.0-r0/gcc-5.3.0/gcc/gcc.c:1295:48: note: in expansion of macro 'STANDARD_STARTFILE_PREFIX' static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; (From OE-Core rev: c8ec931b07c08e27027b38313e6776875db12acb) Signed-off-by: Marek Vasut <marex@denx.de> Cc: Khem Raj <raj.khem@gmail.com> Cc: Ross Burton <ross.burton@intel.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-sanitizers: link directly against sysroot libstc++Ross Burton2016-01-071-7/+2
| | | | | | | | | | | | | | Instead of building a shadow libstdc++-v3 directory with symlinks to the sysroot libstdc++-v3.la, fiddle the Makefiles so that it doesn't attempt to link to a in-tree library at all. This fixes builds where .la files are not being installed into the sysroot at all. (From OE-Core rev: f0f814a674faef2160fb8a041b63169c74da108e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-configure-common.inc: add gcc-runtime ABI fixes for armv7m and armv7rAndre McCurdy2015-12-221-0/+2
| | | | | | | | (From OE-Core rev: 55beb07da9120a2444fcc53bbe1b8f418dafb5aa) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc5: Upgrade gcc-5.2 -> gcc-5.3Khem Raj2015-12-2263-592/+502
| | | | | | | | | | | | Minor bugfix upgrade to gcc 5.3 for detailed list of fixes in 5.3 see https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&list_id=132738&resolution=FIXED&target_milestone=5.3 (From OE-Core rev: 8b664a7d6bba89a8221d7fd1a52915fef0002d71) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>