diff options
| author | Khem Raj <raj.khem@gmail.com> | 2016-05-11 10:35:04 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-13 13:40:50 +0100 |
| commit | 93226e8c74be438781df79f0be5cbf563c79df8b (patch) | |
| tree | 6f835995f61c293ada1931f2e7a7d58b4bd543ab /meta | |
| parent | 4f2898f598c466fa0fde5be64ac4d6a60aae68f7 (diff) | |
| download | openembedded-core-93226e8c74be438781df79f0be5cbf563c79df8b.tar.gz openembedded-core-93226e8c74be438781df79f0be5cbf563c79df8b.tar.bz2 openembedded-core-93226e8c74be438781df79f0be5cbf563c79df8b.zip | |
gcc: Add gcc6 recipes
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
60 files changed, 7169 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/0001-gcc-runtime-Symlink-c-header-in-target_triplet-for-S.patch b/meta/recipes-devtools/gcc/0001-gcc-runtime-Symlink-c-header-in-target_triplet-for-S.patch new file mode 100644 index 0000000000..c598a0d6f7 --- /dev/null +++ b/meta/recipes-devtools/gcc/0001-gcc-runtime-Symlink-c-header-in-target_triplet-for-S.patch @@ -0,0 +1,49 @@ +From 0ef3d75514ee5a74b7c04ea36423cff97843fbb8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 10 May 2016 01:07:24 -0700 +Subject: [PATCH] gcc-runtime: Symlink c++ header in target_triplet 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 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + meta/recipes-devtools/gcc/gcc-runtime.inc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc +index 8639c1c..8e4d5eb 100644 +--- a/meta/recipes-devtools/gcc/gcc-runtime.inc ++++ b/meta/recipes-devtools/gcc/gcc-runtime.inc +@@ -70,13 +70,15 @@ do_install () { + if [ -d ${D}${infodir} ]; then + rmdir --ignore-fail-on-non-empty -p ${D}${infodir} + fi ++} ++ ++do_install_append_class-target () { + if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then + ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS} + fi +- if [ "${TARGET_OS}" = "linux-gnuspe" ]; then ++ if [ "${TARGET_OS}" = "linux-gnuspe" -o "${TCLIBC}" != "glibc" ]; then + ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux + fi +- chown -R root:root ${D} + } + + INHIBIT_DEFAULT_DEPS = "1" +-- +2.8.2 + diff --git a/meta/recipes-devtools/gcc/gcc-6.1.inc b/meta/recipes-devtools/gcc/gcc-6.1.inc new file mode 100644 index 0000000000..1a00f3fea1 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-6.1.inc @@ -0,0 +1,131 @@ +require gcc-common.inc + +# Third digit in PV should be incremented after a minor release + +PV = "6.1.1" + +#SNAP = "5-20150405" + +# BINV should be incremented to a revision after a minor gcc release + +BINV = "6.1.1" + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-6.1:${FILE_DIRNAME}/gcc-6.1/backport:" + +DEPENDS =+ "mpfr gmp libmpc zlib" +NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native" + +LICENSE = "GPL-3.0-with-GCC-exception & GPLv3" + +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \ +" + +SRCREV = "bd9a826d5448db11d29d2ec5884e7e679066f140" + +#BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2" +BASEURI ?= "git://github.com/gcc-mirror/gcc;branch=gcc-6-branch;protocol=git" + +SRC_URI = "\ + ${BASEURI} \ + file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://0002-uclibc-conf.patch \ + file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \ + file://0004-uclibc-locale.patch \ + file://0005-uclibc-locale-no__x.patch \ + file://0006-uclibc-locale-wchar_fix.patch \ + file://0007-uclibc-locale-update.patch \ + file://0008-missing-execinfo_h.patch \ + file://0009-c99-snprintf.patch \ + file://0010-gcc-poison-system-directories.patch \ + file://0011-gcc-poison-dir-extend.patch \ + file://0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \ + file://0013-64-bit-multilib-hack.patch \ + file://0014-optional-libstdc.patch \ + file://0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \ + file://0016-COLLECT_GCC_OPTIONS.patch \ + file://0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \ + file://0018-fortran-cross-compile-hack.patch \ + file://0019-cpp-honor-sysroot.patch \ + file://0020-MIPS64-Default-to-N64-ABI.patch \ + file://0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \ + file://0022-gcc-Fix-argument-list-too-long-error.patch \ + file://0023-Disable-sdt.patch \ + file://0024-libtool.patch \ + file://0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \ + file://0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch \ + file://0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \ + file://0028-export-CPP.patch \ + file://0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \ + file://0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \ + file://0031-Ensure-target-gcc-headers-can-be-included.patch \ + file://0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \ + file://0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch \ + file://0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \ + file://0035-aarch64-Add-support-for-musl-ldso.patch \ + file://0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch \ + file://0037-handle-sysroot-support-for-nativesdk-gcc.patch \ + file://0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch \ + file://0039-Fix-various-_FOR_BUILD-and-related-variables.patch \ + file://0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch \ + file://0041-ssp_nonshared.patch \ + file://0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch \ + file://0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \ + file://0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch \ + file://0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \ + file://0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \ + ${BACKPORTS} \ +" + +BACKPORTS = "" + +#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" +S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git" +B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" + +# Language Overrides +FORTRAN = "" +JAVA = "" + +LTO = "--enable-lto" + +EXTRA_OECONF_BASE = "\ + ${LTO} \ + --enable-libssp \ + --enable-libitm \ + --disable-bootstrap \ + --disable-libmudflap \ + --with-system-zlib \ + --with-linker-hash-style=${LINKER_HASH_STYLE} \ + --enable-linker-build-id \ + --with-ppl=no \ + --with-cloog=no \ + --enable-checking=release \ + --enable-cheaders=c_global \ + --without-isl \ +" + +EXTRA_OECONF_INITIAL = "\ + --disable-libmudflap \ + --disable-libgomp \ + --disable-libitm \ + --disable-libquadmath \ + --with-system-zlib \ + --disable-lto \ + --disable-plugin \ + --enable-decimal-float=no \ + --without-isl \ + gcc_cv_libc_provides_ssp=yes \ +" + +EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float " + +EXTRA_OECONF_PATHS = "\ + --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \ + --with-sysroot=/not/exist \ + --with-build-sysroot=${STAGING_DIR_TARGET} \ +" diff --git a/meta/recipes-devtools/gcc/gcc-6.1/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-6.1/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch new file mode 100644 index 0000000000..415f091ee7 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-6.1/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch @@ -0,0 +1,42 @@ +From 92ed30da16b7487b334f739be177eb39885ab772 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 29 Mar 2013 08:37:11 +0400 +Subject: [PATCH 01/46] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Upstream-Status: Inappropriate [embedded specific] +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 35f231e..bfadc33 100755 +--- a/configure ++++ b/configure +@@ -7550,7 +7550,7 @@ fi + # for target_alias and gcc doesn't manage it consistently. + target_configargs="--cache-file=./config.cache ${target_configargs}" + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in +diff --git a/configure.ac b/configure.ac +index 74bf58a..197d61b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3149,7 +3149,7 @@ fi + # for target_alias and gcc doesn't manage it consistently. + target_configargs="--cache-file=./config.cache ${target_configargs}" + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in +-- +2.8.2 + diff --git a/meta/recipes-devtools/gcc/gcc-6.1/0002-uclibc-conf.patch b/meta/recipes-devtools/gcc/gcc-6.1/0002-uclibc-conf.patch new file mode 100644 index 0000000000..4d284ef862 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-6.1/0002-uclibc-conf.patch @@ -0,0 +1,53 @@ +From 4efc5a258c812875743647d756f75c93c4d514a5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 29 Mar 2013 08:38:25 +0400 +Subject: [PATCH 02/46] uclibc-conf + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Upstream-Status: Pending +--- + contrib/regression/objs-gcc.sh | 4 ++++ + libjava/classpath/ltconfig | 4 ++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh +index 60b0497..6dc7ead 100755 +--- a/contrib/regression/objs-gcc.sh ++++ b/contrib/regression/objs-gcc.sh +@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ] + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 +diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig +index d318957..df55950 100755 +--- a/libjava/classpath/ltconfig ++++ b/libjava/classpath/ltconfig +@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in +-linux-gnu*) ;; ++linux-gnu*|linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + version_type=linux + need_lib_prefix=no + need_version=no +-- +2.8.2 + diff --git a/meta/recipes-devtools/gcc/gcc-6.1/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/meta/recipes-devtools/gcc/gcc-6.1/0003-gcc-uclibc-locale-ctype_touplow_t.patch new file mode 100644 index 0000000000..df07febee2 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-6.1/0003-gcc-uclibc-locale-ctype_touplow_t.patch @@ -0,0 +1,87 @@ +From ad5fd283fc7ef04f66c7fb003805364ea3bd34e9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 29 Mar 2013 08:40:12 +0400 +Subject: [PATCH 03/46] gcc-uclibc-locale-ctype_touplow_t + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Upstream-Status: Pending +--- + libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++ + libstdc++-v3/config/locale/generic/c_locale.h | 9 +++++++++ + libstdc++-v3/config/os/gnu-linux/ctype_base.h | 9 +++++++++ + 3 files changed, 23 insertions(+) + +diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc +index ef6ce8f..4740636 100644 +--- a/libstdc++-v3/config/locale/generic/c_locale.cc ++++ b/libstdc++-v3/config/locale/generic/c_locale.cc +@@ -273,5 +273,10 @@ _GLIBCXX_END_NAMESPACE_VERSION + #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT + #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \ + extern "C" void ldbl (void) __attribute__ ((alias (#dbl))) ++#ifdef __UCLIBC__ ++// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int* ++_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs); ++#else + _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi); ++#endif + #endif // _GLIBCXX_LONG_DOUBLE_COMPAT +diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h +index 794471e..d65f955 100644 +--- a/libstdc++-v3/config/locale/generic/c_locale.h ++++ b/libstdc++-v3/config/locale/generic/c_locale.h +@@ -40,13 +40,22 @@ + + #include <clocale> + ++#ifdef __UCLIBC__ ++#include <features.h> ++#include <ctype.h> ++#endif ++ + #define _GLIBCXX_NUM_CATEGORIES 0 + + namespace std _GLIBCXX_VISIBILITY(default) + { + _GLIBCXX_BEGIN_NAMESPACE_VERSION + ++#ifdef __UCLIBC__ ++ typedef __ctype_touplow_t* __c_locale; ++#else + typedef int* __c_locale; ++#endif + + // Convert numeric value of type double and long double to string and + // return length of string. If vsnprintf is available use it, otherwise +diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h +index 591c793..55eb0e9 100644 +--- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h ++++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h +@@ -33,6 +33,11 @@ + + // Information as gleaned from /usr/include/ctype.h + ++#ifdef __UCLIBC__ ++#include <features.h> ++#include <ctype.h> ++#endif ++ + namespace std _GLIBCXX_VISIBILITY(default) + { + _GLIBCXX_BEGIN_NAMESPACE_VERSION +@@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + struct ctype_base + { + // Non-standard typedefs. ++#ifdef __UCLIBC__ ++ typedef const __ctype_touplow_t* __to_type; ++#else + typedef const int* __to_type; ++#endif + + // NB: Offsets into ctype<char>::_M_table force a particular size + // on the mask type. Because of this, we don't use an enum. +-- +2.8.2 + diff --git a/meta/recipes-devtools/gcc/gcc-6.1/0004-uclibc-locale.patch b/meta/recipes-devtools/gcc/gcc-6.1/0004-uclibc-locale.patch new file mode 100644 index 0000000000..ae2627c2ef --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-6.1/0004-uclibc-locale.patch @@ -0,0 +1,2862 @@ +From 68bd083357e78678a9baac760beb2a31f00954a5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 29 Mar 2013 08:41:39 +0400 +Subject: [PATCH 04/46] uclibc-locale + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Upstream-Status: Pending +--- + libstdc++-v3/acinclude.m4 | 37 ++ + .../config/locale/uclibc/c++locale_internal.h | 63 ++ + libstdc++-v3/config/locale/uclibc/c_locale.cc | 160 +++++ + libstdc++-v3/config/locale/uclibc/c_locale.h | 117 ++++ + .../config/locale/uclibc/codecvt_members.cc | 308 +++++++++ + .../config/locale/uclibc/collate_members.cc | 80 +++ + libstdc++-v3/config/locale/uclibc/ctype_members.cc | 300 +++++++++ + .../config/locale/uclibc/messages_members.cc | 100 +++ + .../config/locale/uclibc/messages_members.h | 118 ++++ + .../config/locale/uclibc/monetary_members.cc | 692 +++++++++++++++++++++ + .../config/locale/uclibc/numeric_members.cc | 160 +++++ + libstdc++-v3/config/locale/uclibc/time_members.cc | 406 ++++++++++++ + libstdc++-v3/config/locale/uclibc/time_members.h | 68 ++ + libstdc++-v3/configure | 75 +++ + libstdc++-v3/include/c_compatibility/wchar.h | 2 + + libstdc++-v3/include/c_std/cwchar | 2 + + 16 files changed, 2688 insertions(+) + create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h + create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc + create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h + create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc + create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc |
