blob: 06bd8fa669e5ddf5071018c83384887b973e8b86 [file] [log] [blame]
Patrick Williams2194f502022-10-16 14:26:09 -05001require recipes-devtools/gcc/gcc-common.inc
2
3# Third digit in PV should be incremented after a minor release
Andrew Geisslerea144b02023-01-27 16:03:57 -06004ARM_GCC_VERSION = "12.2"
Patrick Williams2194f502022-10-16 14:26:09 -05005ARM_GCC_SUB_VERSION = "rel1"
6PV = "arm-${ARM_GCC_VERSION}"
Andrew Geisslerea144b02023-01-27 16:03:57 -06007CVE_VERSION = "12.2"
Patrick Williams2194f502022-10-16 14:26:09 -05008
9# BINV should be incremented to a revision after a minor gcc release
10
Andrew Geisslerea144b02023-01-27 16:03:57 -060011BINV = "12.2.1"
Patrick Williams2194f502022-10-16 14:26:09 -050012
Andrew Geisslerea144b02023-01-27 16:03:57 -060013MMYY = "22.12"
Patrick Williams2194f502022-10-16 14:26:09 -050014RELEASE = "20${MMYY}"
15PR = "r${RELEASE}"
16
17FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-arm-${ARM_GCC_VERSION}:${FILE_DIRNAME}/gcc-arm-${ARM_GCC_VERSION}/backport:"
18
19DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
20NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native zstd-native"
21
22LICENSE = "GPL-3.0-with-GCC-exception & GPL-3.0-only"
23
24LIC_FILES_CHKSUM = "\
25 file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
26 file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
27 file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
28 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
29 file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
30"
31
32BASEURI ?= "https://developer.arm.com/-/media/Files/downloads/gnu/${ARM_GCC_VERSION}.${ARM_GCC_SUB_VERSION}/srcrel/arm-gnu-toolchain-src-snapshot-${ARM_GCC_VERSION}.${ARM_GCC_SUB_VERSION}.tar.xz"
Andrew Geisslerea144b02023-01-27 16:03:57 -060033SRC_URI = "${BASEURI} \
Patrick Williams2194f502022-10-16 14:26:09 -050034 file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
35 file://0002-gcc-poison-system-directories.patch \
36 file://0003-64-bit-multilib-hack.patch \
Andrew Geisslerea144b02023-01-27 16:03:57 -060037 file://0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch \
38 file://0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
39 file://0006-cpp-honor-sysroot.patch \
40 file://0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
Patrick Williams2194f502022-10-16 14:26:09 -050041 file://0008-libtool.patch \
42 file://0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
43 file://0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
44 file://0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
Andrew Geisslerea144b02023-01-27 16:03:57 -060045 file://0013-Ensure-target-gcc-headers-can-be-included.patch \
46 file://0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
47 file://0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
48 file://0016-handle-sysroot-support-for-nativesdk-gcc.patch \
49 file://0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
50 file://0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \
51 file://0019-Re-introduce-spe-commandline-options.patch \
52 file://0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
53 file://0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \
54 file://0023-libatomic-Do-not-enforce-march-on-aarch64.patch \
55 file://0024-Fix-install-path-of-linux64.h.patch \
56 file://0026-rust-recursion-limit.patch \
57 file://prefix-map-realpath.patch \
58 file://hardcoded-paths.patch \
Patrick Williams2194f502022-10-16 14:26:09 -050059"
Andrew Geisslerea144b02023-01-27 16:03:57 -060060SRC_URI[sha256sum] = "108b5e0786b988c7ce24b82187d8cf643fefbd8e3db24fa5f67e530e727d0c70"
Patrick Williams2194f502022-10-16 14:26:09 -050061
62S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/arm-gnu-toolchain-src-snapshot-${ARM_GCC_VERSION}.${ARM_GCC_SUB_VERSION}"
63
64# For dev release snapshotting
65#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${RELEASE}"
66#B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
67
68# Language Overrides
69FORTRAN = ""
70JAVA = ""
71
72SSP ?= "--disable-libssp"
73SSP:mingw32 = "--enable-libssp"
74
75EXTRA_OECONF_BASE = "\
76 ${SSP} \
77 --enable-libitm \
78 --enable-lto \
79 --disable-bootstrap \
80 --with-system-zlib \
81 ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if '${LINKER_HASH_STYLE}' else ''} \
82 --enable-linker-build-id \
83 --with-ppl=no \
84 --with-cloog=no \
85 --enable-checking=release \
86 --enable-cheaders=c_global \
87 --without-isl \
88"
89
90EXTRA_OECONF_INITIAL = "\
91 --disable-libgomp \
92 --disable-libitm \
93 --disable-libquadmath \
94 --with-system-zlib \
95 --disable-lto \
96 --disable-plugin \
97 --enable-linker-build-id \
98 --enable-decimal-float=no \
99 --without-isl \
100 --disable-libssp \
101"
102
103EXTRA_OECONF:append_aarchilp32 = " --with-abi=ilp32"
104
105EXTRA_OECONF_PATHS = "\
106 --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
107 --with-sysroot=/not/exist \
108 --with-build-sysroot=${STAGING_DIR_TARGET} \
109"
110
111# Is a binutils 2.26 issue, not gcc
112CVE_CHECK_IGNORE += "CVE-2021-37322"