summaryrefslogtreecommitdiffstats
path: root/meta-microblaze/recipes-devtools/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'meta-microblaze/recipes-devtools/gcc')
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12.2.inc114
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0001-LOCAL-Testsuite-builtins-tests-require-fpic-Signed-o.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch)10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0002-Quick-fail-g-.dg-opt-memcpy1.C-This-particular-testc.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch)14
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0003-For-dejagnu-static-testing-on-qemu-suppress-warnings.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0003-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch)14
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0004-Add-MicroBlaze-to-target-supports-for-atomic-buil.-..patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0004-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch)14
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0005-Update-MicroBlaze-strings-test-for-new-scan-assembly.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0005-Patch-testsuite-Update-MicroBlaze-strings-test.patch)10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0006-Allow-MicroBlaze-.weakext-pattern-in-regex-match-Ext.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0006-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0007-Add-MicroBlaze-to-check_profiling_available-Testsuit.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0007-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch)17
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0008-Fix-atomic-side-effects.-In-atomic_compare_and_swaps.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0008-Patch-microblaze-Fix-atomic-side-effects.patch)19
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0009-Fix-atomic-boolean-return-value.-In-atomic_compare_a.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0009-Patch-microblaze-Fix-atomic-boolean-return-value.patch)14
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0010-Fix-the-Microblaze-crash-with-msmall-divides-flag-Co.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch)23
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0011-Added-ashrsi3_with_size_opt-Added-ashrsi3_with_size_.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0011-Patch-microblaze-Added-ashrsi3_with_size_opt.patch)16
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0012-Use-bralid-for-profiler-calls-Signed-off-by-Edgar-E..patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0012-Patch-microblaze-Use-bralid-for-profiler-calls.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0013-Removed-moddi3-routinue-Using-the-default-moddi3-fun.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0013-Patch-microblaze-Removed-moddi3-routinue.patch)14
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0014-Add-INIT_PRIORITY-support-Added-TARGET_ASM_CONSTRUCT.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0014-Patch-microblaze-Add-INIT_PRIORITY-support-Added.patch)18
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0015-Add-optimized-lshrsi3-When-barrel-shifter-is-not-pre.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0015-Patch-microblaze-Add-optimized-lshrsi3.patch)14
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0016-Add-cbranchsi4_reg-This-patch-optimizes-the-generati.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0016-Patch-microblaze-Add-cbranchsi4_reg.patch)15
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0017-Inline-Expansion-of-fsqrt-builtin.-The-changes-are-m.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0017-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch)34
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0018-microblaze.md-Improve-adddi3-and-subdi3-insn-definit.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0018-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch)14
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0019-Update-ashlsi3-movsf-patterns-This-patch-removes-the.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch)22
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0020-8-stage-pipeline-for-microblaze-This-patch-adds-the-.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0020-Patch-microblaze-8-stage-pipeline-for-microblaze.patch)24
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0021-Correct-the-const-high-double-immediate-value-with-t.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0021-PATCH-21-53-Patch-microblaze-Correct-the-const-high-.patch)22
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0022-Fix-internal-compiler-error-with-msmall-divides-This.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0022-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch)22
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0023-Fix-the-calculation-of-high-word-in-a-long-long-64-b.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0023-patch-microblaze-Fix-the-calculation-of-high-word-in.patch)15
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0024-this-patch-has-1.Fixed-the-bug-in-version-calculatio.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0024-Patch-MicroBlaze-this-patch-has-1.Fixed-the-bug-in.patch)42
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0025-Fixing-the-issue-with-the-builtin_alloc.-register-r1.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0025-Fixing-the-issue-with-the-builtin_alloc.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0026-Removed-fsqrt-generation-for-double-values.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0026-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch)13
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0027-Intial-commit-of-64-bit-Microblaze.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch)36
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0028-Intial-commit-for-64bit-MB-sources.-Need-to-cleanup-.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0028-Intial-commit-for-64bit-MB-sources.patch)90
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0029-re-arrangement-of-the-compare-branches.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0029-Patch-MicroBlaze-re-arrangement-of-the-compare-branc.patch)27
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0030-previous-commit-broke-the-handling-of-SI-Branch-comp.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0030-Patch-Microblaze-previous-commit-broke-the-handling-.patch)14
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0031-Support-of-multilibs-with-m64.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0031-Patch-Microblaze-Support-of-multilibs-with-m64.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0032-Fixed-issues-like-1-Interrupt-alignment-issue-2-Sign.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0032-Patch-MicroBlaze-Fixed-issues-like.patch)22
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0033-fixed-below-issues-Floating-point-print-issues-in-64.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0033-Patch-MicroBlaze.patch)27
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0034-Added-double-arith-instructions-Fixed-prologue-stack.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0034-Added-double-arith-instructions.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch)20
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0038-fixing-the-typo-errors-in-umodsi3-file.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0038-fixing-the-typo-errors-in-umodsi3-file.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0039-fixing-the-32bit-LTO-related-issue9-1014024.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0039-fixing-the-32bit-LTO-related-issue9-1014024.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0041-corrected-SPN-for-dlong-instruction-mapping.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0041-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch)13
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0042-fixing-the-long-long-long-mingw-toolchain-issue.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0042-fixing-the-long-long-long-mingw-toolchain-issue.patch)14
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0044-We-will-check-the-possibility-of-peephole2-optimizat.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0044-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch)14
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0045-fixed-typos-in-mul-div-and-mod-assembly-files.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0045-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch)21
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0046-MB-64-removal-of-barrel-shift-instructions-from-defa.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0046-Patch-microblaze-MB-64-removal-of-barrel-shift-instr.patch)23
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0047-Added-new-MB-64-single-register-arithmetic-instructi.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0047-Added-new-MB-64-single-register-arithmetic-instructi.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0048-Added-support-for-64-bit-Immediate-values.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0048-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch)15
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0049-Fix-Compiler-crash-with-freg-struct-return-This-patc.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0049-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch)22
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0050-Add-TARGET_OPTION_OPTIMIZATION-and-disable-fivopts-b.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0051-Reducing-Stack-space-for-arguments.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0051-Patch-microblaze-Reducing-Stack-space-for-arguments.patch)18
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0052-If-we-use-break_handler-attribute-then-interrupt-vec.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch)31
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0053-Add-Zero_extended-instructions.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/0053-patch-microblaze64-Add-Zero_extended-instructions.patch)10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/0054-Fix-failure-with-gcc.c-torture-execute-ashrdi-1.c-Os.patch42
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-13/microblaze-mulitlib-hack.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-12/microblaze-mulitlib-hack.patch)0
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-common.inc118
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-configure-common.inc123
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian.inc187
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_12.2.bb5
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_13.%.bbappend1
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-cross.inc163
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-cross_12.2.bb3
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-cross_13.%.bbappend1
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-crosssdk.inc12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_12.2.bb2
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_13.%.bbappend1
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-multilib-config.inc249
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-runtime.inc310
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-runtime_12.2.bb2
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-runtime_13.%.bbappend1
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-sanitizers.inc120
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_12.2.bb7
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_13.%.bbappend1
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-shared-source.inc21
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-source.inc45
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-source_12.%.bbappend59
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-source_12.2.bb4
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-source_13.%.bbappend63
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-target.inc259
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-testsuite.inc107
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch39
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch239
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch134
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch64
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch92
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch53
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch403
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0008-libtool.patch39
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch40
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch99
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch28
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch55
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch28
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch113
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch35
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch51
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch510
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch99
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch84
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch39
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch83
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch182
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch42
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch31
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0023-libatomic-Do-not-enforce-march-on-aarch64.patch42
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch28
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0024-Fix-install-path-of-linux64.h.patch31
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/0026-rust-recursion-limit.patch92
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/hardcoded-paths.patch19
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc/prefix-map-realpath.patch63
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc_12.2.bb14
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc_13.%.bbappend1
-rw-r--r--meta-microblaze/recipes-devtools/gcc/libgcc-common.inc163
-rw-r--r--meta-microblaze/recipes-devtools/gcc/libgcc-initial.inc58
-rw-r--r--meta-microblaze/recipes-devtools/gcc/libgcc-initial_12.2.bb5
-rw-r--r--meta-microblaze/recipes-devtools/gcc/libgcc-initial_13.%.bbappend1
-rw-r--r--meta-microblaze/recipes-devtools/gcc/libgcc.inc53
-rw-r--r--meta-microblaze/recipes-devtools/gcc/libgcc_12.2.bb5
-rw-r--r--meta-microblaze/recipes-devtools/gcc/libgcc_13.%.bbappend1
-rw-r--r--meta-microblaze/recipes-devtools/gcc/libgfortran.inc88
-rw-r--r--meta-microblaze/recipes-devtools/gcc/libgfortran_12.2.bb3
-rw-r--r--meta-microblaze/recipes-devtools/gcc/libgfortran_13.%.bbappend1
-rw-r--r--meta-microblaze/recipes-devtools/gcc/microblaze-block.inc1
124 files changed, 508 insertions, 5756 deletions
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12.2.inc b/meta-microblaze/recipes-devtools/gcc/gcc-12.2.inc
deleted file mode 100644
index 82867489..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12.2.inc
+++ /dev/null
@@ -1,114 +0,0 @@
1require gcc-common.inc
2
3# Third digit in PV should be incremented after a minor release
4
5PV = "12.2.0"
6
7# BINV should be incremented to a revision after a minor gcc release
8
9BINV = "12.2.0"
10
11FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:"
12
13DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
14NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native zstd-native"
15
16LICENSE = "GPL-3.0-with-GCC-exception & GPL-3.0-only"
17
18LIC_FILES_CHKSUM = "\
19 file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
20 file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
21 file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
22 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
23 file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
24"
25# from git
26#RELEASE ?= "7092b7aea122a91824d048aeb23834cf1d19b1a1"
27#BASEURI ?= "https://repo.or.cz/official-gcc.git/snapshot/${RELEASE}.tar.gz;downloadfilename=gcc-${PV}-${RELEASE}.tar.gz"
28#SOURCEDIR ?= "official-gcc-${@'${RELEASE}'[0:7]}"
29
30# from snapshot
31#RELEASE ?= "12.1.0-RC-20220429"
32#SOURCEDIR ?= "gcc-${RELEASE}"
33#BASEURI ?= "https://gcc.gnu.org/pub/gcc/snapshots/${RELEASE}/gcc-${RELEASE}.tar.xz"
34
35# official release
36RELEASE ?= "${PV}"
37BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz"
38SOURCEDIR ?= "gcc-${PV}"
39
40SRC_URI = "${BASEURI} \
41 file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
42 file://0002-gcc-poison-system-directories.patch \
43 file://0003-64-bit-multilib-hack.patch \
44 file://0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch \
45 file://0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
46 file://0006-cpp-honor-sysroot.patch \
47 file://0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
48 file://0008-libtool.patch \
49 file://0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
50 file://0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
51 file://0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
52 file://0013-Ensure-target-gcc-headers-can-be-included.patch \
53 file://0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
54 file://0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
55 file://0016-handle-sysroot-support-for-nativesdk-gcc.patch \
56 file://0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
57 file://0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \
58 file://0019-Re-introduce-spe-commandline-options.patch \
59 file://0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
60 file://0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \
61 file://0023-libatomic-Do-not-enforce-march-on-aarch64.patch \
62 file://0024-Fix-install-path-of-linux64.h.patch \
63 file://0026-rust-recursion-limit.patch \
64 file://prefix-map-realpath.patch \
65 file://hardcoded-paths.patch \
66"
67SRC_URI[sha256sum] = "e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff"
68
69S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/${SOURCEDIR}"
70B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
71
72# Language Overrides
73FORTRAN = ""
74JAVA = ""
75
76SSP ?= "--disable-libssp"
77SSP:mingw32 = "--enable-libssp"
78
79EXTRA_OECONF_BASE = "\
80 ${SSP} \
81 --enable-libitm \
82 --enable-lto \
83 --disable-bootstrap \
84 --with-system-zlib \
85 ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if '${LINKER_HASH_STYLE}' else ''} \
86 --enable-linker-build-id \
87 --with-ppl=no \
88 --with-cloog=no \
89 --enable-checking=release \
90 --enable-cheaders=c_global \
91 --without-isl \
92"
93
94EXTRA_OECONF_INITIAL = "\
95 --disable-libgomp \
96 --disable-libitm \
97 --disable-libquadmath \
98 --with-system-zlib \
99 --disable-lto \
100 --disable-plugin \
101 --enable-linker-build-id \
102 --enable-decimal-float=no \
103 --without-isl \
104 --disable-libssp \
105"
106
107EXTRA_OECONF_PATHS = "\
108 --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
109 --with-sysroot=/not/exist \
110 --with-build-sysroot=${STAGING_DIR_TARGET} \
111"
112
113# Is a binutils 2.26 issue, not gcc
114CVE_STATUS[CVE-2021-37322] = "cpe-incorrect: Is a binutils 2.26 issue, not gcc"
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0001-LOCAL-Testsuite-builtins-tests-require-fpic-Signed-o.patch
index f8985752..8b9c6177 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0001-LOCAL-Testsuite-builtins-tests-require-fpic-Signed-o.patch
@@ -1,9 +1,7 @@
1From 376b0ee790231a99fe50b50e20070c104bbba0d8 Mon Sep 17 00:00:00 2001 1From 8beb2e85436c77db197ce22626c7b7037d41d595 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 11 Jan 2017 13:13:57 +0530 3Date: Wed, 11 Jan 2017 13:13:57 +0530
4Subject: [PATCH 01/53] LOCAL]: Testsuite - builtins tests require fpic 4Subject: [PATCH 01/54] LOCAL]: Testsuite - builtins tests require fpic
5Upstream-Status: Pending
6
7 Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 5 Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
8 6
9Conflicts: 7Conflicts:
@@ -14,7 +12,7 @@ Conflicts:
14 1 file changed, 8 insertions(+) 12 1 file changed, 8 insertions(+)
15 13
16diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp 14diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
17index fb47f51f90c..d9ecf045554 100644 15index fa762d33232..ce8545fc460 100644
18--- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp 16--- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
19+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp 17+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
20@@ -48,6 +48,14 @@ if { [istarget *-*-eabi*] 18@@ -48,6 +48,14 @@ if { [istarget *-*-eabi*]
@@ -33,5 +31,5 @@ index fb47f51f90c..d9ecf045554 100644
33 if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} { 31 if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} {
34 c-torture-execute [list $src \ 32 c-torture-execute [list $src \
35-- 33--
362.37.1 (Apple Git-137.1) 342.34.1
37 35
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0002-Quick-fail-g-.dg-opt-memcpy1.C-This-particular-testc.patch
index 5302b942..94970e7b 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0002-Quick-fail-g-.dg-opt-memcpy1.C-This-particular-testc.patch
@@ -1,12 +1,10 @@
1From b1aea8e71692065497ee3e9be5a9f1fccecf5685 Mon Sep 17 00:00:00 2001 1From 4a2d958fe0d54c78b7a131b9cde1c74165533aaf Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 11 Jan 2017 14:31:10 +0530 3Date: Wed, 11 Jan 2017 14:31:10 +0530
4Subject: [PATCH 02/53] [LOCAL]: Quick fail g++.dg/opt/memcpy1.C This 4Subject: [PATCH 02/54] Quick fail g++.dg/opt/memcpy1.C This particular
5 particular testcase fails with a timeout. Instead, fail it at compile-time 5 testcase fails with a timeout. Instead, fail it at compile-time for
6 for microblaze. This speeds up the testsuite without removing it from the 6 microblaze. This speeds up the testsuite without removing it from the FAIL
7 FAIL reports. 7 reports.
8
9Upstream-Status: Pending
10 8
11Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> 9Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12--- 10---
@@ -29,5 +27,5 @@ index 3862756083d..db9f990f781 100644
29 typedef uint8_t uint8; 27 typedef uint8_t uint8;
30 __extension__ typedef __SIZE_TYPE__ size_t; 28 __extension__ typedef __SIZE_TYPE__ size_t;
31-- 29--
322.37.1 (Apple Git-137.1) 302.34.1
33 31
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0003-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0003-For-dejagnu-static-testing-on-qemu-suppress-warnings.patch
index 89fe0ff6..5b4466d8 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0003-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0003-For-dejagnu-static-testing-on-qemu-suppress-warnings.patch
@@ -1,20 +1,18 @@
1From af78edb2cb91c55f54ac2d720cee9871da13b845 Mon Sep 17 00:00:00 2001 1From 0b4ec0cbfc13f5a40a20663da9c074ac81c5ec3f Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 11 Jan 2017 15:46:28 +0530 3Date: Wed, 11 Jan 2017 15:46:28 +0530
4Subject: [PATCH 03/53] [LOCAL]: For dejagnu static testing on qemu, suppress 4Subject: [PATCH 03/54] For dejagnu static testing on qemu, suppress warnings
5 warnings about multiple definitions from the test function and libc in line 5 about multiple definitions from the test function and libc in line with
6 with method used by powerpc. Dynamic linking and using a qemu binary which 6 method used by powerpc. Dynamic linking and using a qemu binary which
7 understands sysroot resolves all test failures with builtins 7 understands sysroot resolves all test failures with builtins
8 8
9Upstream-Status: Pending
10
11Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 9Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
12--- 10---
13 gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 4 ---- 11 gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 4 ----
14 1 file changed, 4 deletions(-) 12 1 file changed, 4 deletions(-)
15 13
16diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp 14diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
17index d9ecf045554..d6c2b04f286 100644 15index ce8545fc460..72fd697d855 100644
18--- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp 16--- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
19+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp 17+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
20@@ -48,14 +48,10 @@ if { [istarget *-*-eabi*] 18@@ -48,14 +48,10 @@ if { [istarget *-*-eabi*]
@@ -33,5 +31,5 @@ index d9ecf045554..d6c2b04f286 100644
33 if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} { 31 if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} {
34 c-torture-execute [list $src \ 32 c-torture-execute [list $src \
35-- 33--
362.37.1 (Apple Git-137.1) 342.34.1
37 35
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0004-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0004-Add-MicroBlaze-to-target-supports-for-atomic-buil.-..patch
index 39c9c17e..87adeaf4 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0004-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0004-Add-MicroBlaze-to-target-supports-for-atomic-buil.-..patch
@@ -1,8 +1,8 @@
1From 34b7dd28e3fe40f55ec7f6df3f000dd797d6c1cc Mon Sep 17 00:00:00 2001 1From dcb106f7cb2fb68f3117677b12df2b01f3929f7b Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 11 Jan 2017 15:50:35 +0530 3Date: Wed, 11 Jan 2017 15:50:35 +0530
4Subject: [PATCH 04/53] [Patch, testsuite]: Add MicroBlaze to target-supports 4Subject: [PATCH 04/54] Add MicroBlaze to target-supports for atomic buil. .tin
5 for atomic buil. .tin tests 5 tests
6 6
7MicroBlaze added to supported targets for atomic builtin tests. 7MicroBlaze added to supported targets for atomic builtin tests.
8 8
@@ -13,18 +13,16 @@ Changelog/testsuite
13 * gcc/testsuite/lib/target-supports.exp: Add microblaze to 13 * gcc/testsuite/lib/target-supports.exp: Add microblaze to
14 check_effective_target_sync_int_long. 14 check_effective_target_sync_int_long.
15 15
16Upstream-Status: Pending
17
18Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 16Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
19--- 17---
20 gcc/testsuite/lib/target-supports.exp | 1 + 18 gcc/testsuite/lib/target-supports.exp | 1 +
21 1 file changed, 1 insertion(+) 19 1 file changed, 1 insertion(+)
22 20
23diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp 21diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
24index 244fe2306f4..c19f251f0d2 100644 22index 40f71e9ed8b..32e29706fcd 100644
25--- a/gcc/testsuite/lib/target-supports.exp 23--- a/gcc/testsuite/lib/target-supports.exp
26+++ b/gcc/testsuite/lib/target-supports.exp 24+++ b/gcc/testsuite/lib/target-supports.exp
27@@ -8639,6 +8639,7 @@ proc check_effective_target_sync_int_long { } { 25@@ -8947,6 +8947,7 @@ proc check_effective_target_sync_int_long { } {
28 && [check_effective_target_arm_acq_rel]) 26 && [check_effective_target_arm_acq_rel])
29 || [istarget bfin*-*linux*] 27 || [istarget bfin*-*linux*]
30 || [istarget hppa*-*linux*] 28 || [istarget hppa*-*linux*]
@@ -33,5 +31,5 @@ index 244fe2306f4..c19f251f0d2 100644
33 || [istarget powerpc*-*-*] 31 || [istarget powerpc*-*-*]
34 || [istarget cris-*-*] 32 || [istarget cris-*-*]
35-- 33--
362.37.1 (Apple Git-137.1) 342.34.1
37 35
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0005-Patch-testsuite-Update-MicroBlaze-strings-test.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0005-Update-MicroBlaze-strings-test-for-new-scan-assembly.patch
index d127a03e..9a8d0a86 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0005-Patch-testsuite-Update-MicroBlaze-strings-test.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0005-Update-MicroBlaze-strings-test-for-new-scan-assembly.patch
@@ -1,8 +1,8 @@
1From 2d0b5d68aff95a95dfb4ed0b207849658502bd53 Mon Sep 17 00:00:00 2001 1From 68bc05ae258334f591c336dbed6dc907969e90fc Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 11 Jan 2017 16:20:01 +0530 3Date: Wed, 11 Jan 2017 16:20:01 +0530
4Subject: [PATCH 05/53] [Patch, testsuite]: Update MicroBlaze strings test for 4Subject: [PATCH 05/54] Update MicroBlaze strings test for new scan-assembly
5 new scan-assembly output resulting in use of $LC label 5 output resulting in use of $LC label
6 6
7ChangeLog/testsuite 7ChangeLog/testsuite
8 8
@@ -11,8 +11,6 @@ ChangeLog/testsuite
11 * gcc/testsuite/gcc.target/microblaze/others/strings1.c: Update 11 * gcc/testsuite/gcc.target/microblaze/others/strings1.c: Update
12 to include $LC label. 12 to include $LC label.
13 13
14Upstream-Status: Pending
15
16Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 14Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
17--- 15---
18 gcc/testsuite/gcc.target/microblaze/others/strings1.c | 4 ++++ 16 gcc/testsuite/gcc.target/microblaze/others/strings1.c | 4 ++++
@@ -34,5 +32,5 @@ index efaf3c660ea..347872360d3 100644
34 32
35 extern void somefunc (char *); 33 extern void somefunc (char *);
36-- 34--
372.37.1 (Apple Git-137.1) 352.34.1
38 36
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0006-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0006-Allow-MicroBlaze-.weakext-pattern-in-regex-match-Ext.patch
index 3c412471..c32a8bab 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0006-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0006-Allow-MicroBlaze-.weakext-pattern-in-regex-match-Ext.patch
@@ -1,9 +1,9 @@
1From 20b6479f240bfebb46daad06839286a7abcff56c Mon Sep 17 00:00:00 2001 1From 7b07ae9c8086973b7baa031b09889146057de8ab Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 16:14:15 +0530 3Date: Thu, 12 Jan 2017 16:14:15 +0530
4Subject: [PATCH 06/53] [Patch, testsuite]: Allow MicroBlaze .weakext pattern 4Subject: [PATCH 06/54] Allow MicroBlaze .weakext pattern in regex match Extend
5 in regex match Extend regex pattern to include optional ext at the end of 5 regex pattern to include optional ext at the end of .weak to match the
6 .weak to match the MicroBlaze weak label .weakext 6 MicroBlaze weak label .weakext
7 7
8ChangeLog/testsuite 8ChangeLog/testsuite
9 9
@@ -13,8 +13,6 @@ ChangeLog/testsuite
13 pattern to take optional ext after .weak. 13 pattern to take optional ext after .weak.
14 * gcc/testsuite/g++.dg/abi/thunk4.C: Likewise. 14 * gcc/testsuite/g++.dg/abi/thunk4.C: Likewise.
15 15
16Upstream-Status: Pending
17
18Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 16Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
19 17
20Conflicts: 18Conflicts:
@@ -65,5 +63,5 @@ index 6e8f124bc5e..d1d34fe1e4a 100644
65 63
66 struct Base 64 struct Base
67-- 65--
682.37.1 (Apple Git-137.1) 662.34.1
69 67
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0007-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0007-Add-MicroBlaze-to-check_profiling_available-Testsuit.patch
index 89d3b75a..5de0bfd8 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0007-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0007-Add-MicroBlaze-to-check_profiling_available-Testsuit.patch
@@ -1,12 +1,9 @@
1From 0efefd8ac71dd084c745402afdf07319de9774c6 Mon Sep 17 00:00:00 2001 1From 6de628ecccf3739891052a2fbaf97048384c6190 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 16:34:27 +0530 3Date: Thu, 12 Jan 2017 16:34:27 +0530
4Subject: [PATCH 07/53] [Patch, testsuite]: Add MicroBlaze to 4Subject: [PATCH 07/54] Add MicroBlaze to check_profiling_available Testsuite,
5 check_profiling_available Testsuite, add microblaze*-*-* target in 5 add microblaze*-*-* target in check_profiling_available inline with other
6 check_profiling_available inline with other archs setting 6 archs setting profiling_available_saved to 0
7 profiling_available_saved to 0
8
9Upstream-Status: Pending
10 7
11Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 8Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
12--- 9---
@@ -14,10 +11,10 @@ Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
14 1 file changed, 1 insertion(+) 11 1 file changed, 1 insertion(+)
15 12
16diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp 13diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
17index c19f251f0d2..c136c93e673 100644 14index 32e29706fcd..47233563339 100644
18--- a/gcc/testsuite/lib/target-supports.exp 15--- a/gcc/testsuite/lib/target-supports.exp
19+++ b/gcc/testsuite/lib/target-supports.exp 16+++ b/gcc/testsuite/lib/target-supports.exp
20@@ -729,6 +729,7 @@ proc check_profiling_available { test_what } { 17@@ -804,6 +804,7 @@ proc check_profiling_available { test_what } {
21 || [istarget m68k-*-elf] 18 || [istarget m68k-*-elf]
22 || [istarget m68k-*-uclinux*] 19 || [istarget m68k-*-uclinux*]
23 || [istarget mips*-*-elf*] 20 || [istarget mips*-*-elf*]
@@ -26,5 +23,5 @@ index c19f251f0d2..c136c93e673 100644
26 || [istarget mn10300-*-elf*] 23 || [istarget mn10300-*-elf*]
27 || [istarget moxie-*-elf*] 24 || [istarget moxie-*-elf*]
28-- 25--
292.37.1 (Apple Git-137.1) 262.34.1
30 27
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0008-Patch-microblaze-Fix-atomic-side-effects.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0008-Fix-atomic-side-effects.-In-atomic_compare_and_swaps.patch
index 21747726..e554e660 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0008-Patch-microblaze-Fix-atomic-side-effects.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0008-Fix-atomic-side-effects.-In-atomic_compare_and_swaps.patch
@@ -1,13 +1,10 @@
1From 42ab0f7a2e6834feed456d00b3e2ec0ae2532a41 Mon Sep 17 00:00:00 2001 1From cd3db73d253df229054863e5f920e59e60b84c45 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 16:41:43 +0530 3Date: Thu, 12 Jan 2017 16:41:43 +0530
4Subject: [PATCH 08/53] [Patch, microblaze]: Fix atomic side effects. In 4Subject: [PATCH 08/54] Fix atomic side effects. In atomic_compare_and_swapsi,
5 atomic_compare_and_swapsi, add side effects to prevent incorrect assumptions 5 add side effects to prevent incorrect assumptions during optimization.
6 during optimization. Previously, the outputs were considered unused; this 6 Previously, the outputs were considered unused; this generated assembly code
7 generated assembly code with undefined side effects after invocation of the 7 with undefined side effects after invocation of the atomic.
8 atomic.
9
10Upstream-Status: Pending
11 8
12Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> 9Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com>
13Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 10Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
@@ -20,7 +17,7 @@ Conflicts:
20 2 files changed, 16 insertions(+), 8 deletions(-) 17 2 files changed, 16 insertions(+), 8 deletions(-)
21 18
22diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 19diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
23index 0765ff930c6..ea7f74f1dff 100644 20index 671667b537c..dfd7395432b 100644
24--- a/gcc/config/microblaze/microblaze.md 21--- a/gcc/config/microblaze/microblaze.md
25+++ b/gcc/config/microblaze/microblaze.md 22+++ b/gcc/config/microblaze/microblaze.md
26@@ -43,6 +43,9 @@ 23@@ -43,6 +43,9 @@
@@ -34,7 +31,7 @@ index 0765ff930c6..ea7f74f1dff 100644
34 31
35 (define_c_enum "unspec" [ 32 (define_c_enum "unspec" [
36diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md 33diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md
37index ae8955ce691..77c3ce8ff27 100644 34index c84bac94101..587f852b3a0 100644
38--- a/gcc/config/microblaze/sync.md 35--- a/gcc/config/microblaze/sync.md
39+++ b/gcc/config/microblaze/sync.md 36+++ b/gcc/config/microblaze/sync.md
40@@ -18,14 +18,19 @@ 37@@ -18,14 +18,19 @@
@@ -66,5 +63,5 @@ index ae8955ce691..77c3ce8ff27 100644
66 "" 63 ""
67 { 64 {
68-- 65--
692.37.1 (Apple Git-137.1) 662.34.1
70 67
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0009-Patch-microblaze-Fix-atomic-boolean-return-value.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0009-Fix-atomic-boolean-return-value.-In-atomic_compare_a.patch
index 97f35569..617b10f3 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0009-Patch-microblaze-Fix-atomic-boolean-return-value.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0009-Fix-atomic-boolean-return-value.-In-atomic_compare_a.patch
@@ -1,11 +1,9 @@
1From a1b8136a157c549f0f65c14d628e694310ca0d23 Mon Sep 17 00:00:00 2001 1From 7eca0d5cf7bc603c5a359b70521861c11faf6038 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 16:45:45 +0530 3Date: Thu, 12 Jan 2017 16:45:45 +0530
4Subject: [PATCH 09/53] [Patch, microblaze]: Fix atomic boolean return value. 4Subject: [PATCH 09/54] Fix atomic boolean return value. In
5 In atomic_compare_and_swapsi, fix boolean return value. Previously, it 5 atomic_compare_and_swapsi, fix boolean return value. Previously, it contained
6 contained zero if successful and non-zero if unsuccessful. 6 zero if successful and non-zero if unsuccessful.
7
8Upstream-Status: Pending
9 7
10Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> 8Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com>
11Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 9Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
@@ -14,7 +12,7 @@ Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
14 1 file changed, 4 insertions(+), 3 deletions(-) 12 1 file changed, 4 insertions(+), 3 deletions(-)
15 13
16diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md 14diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md
17index 77c3ce8ff27..573ce4765a0 100644 15index 587f852b3a0..230699bf280 100644
18--- a/gcc/config/microblaze/sync.md 16--- a/gcc/config/microblaze/sync.md
19+++ b/gcc/config/microblaze/sync.md 17+++ b/gcc/config/microblaze/sync.md
20@@ -34,15 +34,16 @@ 18@@ -34,15 +34,16 @@
@@ -38,5 +36,5 @@ index 77c3ce8ff27..573ce4765a0 100644
38 } 36 }
39 ) 37 )
40-- 38--
412.37.1 (Apple Git-137.1) 392.34.1
42 40
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0010-Fix-the-Microblaze-crash-with-msmall-divides-flag-Co.patch
index 62bb02a9..42b9d575 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0010-Fix-the-Microblaze-crash-with-msmall-divides-flag-Co.patch
@@ -1,15 +1,12 @@
1From 1ab5b8af098d100a1d7af05cca680b3c7181549d Mon Sep 17 00:00:00 2001 1From 72cdba90d70131c092918c5d5c18eb800f0f9dfb Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 16:50:17 +0530 3Date: Thu, 12 Jan 2017 16:50:17 +0530
4Subject: [PATCH 10/53] [Patch, microblaze]: Fix the Microblaze crash with 4Subject: [PATCH 10/54] Fix the Microblaze crash with msmall-divides flag
5 msmall-divides flag Compiler is crashing when we use msmall-divides and 5 Compiler is crashing when we use msmall-divides and mxl-barrel-shift flag.
6 mxl-barrel-shift flag. This is because when use above flags 6 This is because when use above flags microblaze_expand_divide function will
7 microblaze_expand_divide function will be called for division operation. In 7 be called for division operation. In microblaze_expand_divide function we are
8 microblaze_expand_divide function we are using sub_reg but MicroBlaze doesn't 8 using sub_reg but MicroBlaze doesn't have subreg register due to this
9 have subreg register due to this compiler was crashing. Changed the logic to 9 compiler was crashing. Changed the logic to avoid sub_reg call
10 avoid sub_reg call
11
12Upstream-Status: Pending
13 10
14Signed-off-by:Nagaraju Mekala <nmekala@xilix.com> 11Signed-off-by:Nagaraju Mekala <nmekala@xilix.com>
15 12
@@ -20,10 +17,10 @@ Conflicts:
20 1 file changed, 1 insertion(+), 2 deletions(-) 17 1 file changed, 1 insertion(+), 2 deletions(-)
21 18
22diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 19diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
23index f32effecfb6..6922dd94af7 100644 20index 6df2c712cab..11e34b3fdae 100644
24--- a/gcc/config/microblaze/microblaze.cc 21--- a/gcc/config/microblaze/microblaze.cc
25+++ b/gcc/config/microblaze/microblaze.cc 22+++ b/gcc/config/microblaze/microblaze.cc
26@@ -3710,8 +3710,7 @@ microblaze_expand_divide (rtx operands[]) 23@@ -3719,8 +3719,7 @@ microblaze_expand_divide (rtx operands[])
27 mem_rtx = gen_rtx_MEM (QImode, 24 mem_rtx = gen_rtx_MEM (QImode,
28 gen_rtx_PLUS (Pmode, regt1, div_table_rtx)); 25 gen_rtx_PLUS (Pmode, regt1, div_table_rtx));
29 26
@@ -34,5 +31,5 @@ index f32effecfb6..6922dd94af7 100644
34 JUMP_LABEL (jump) = div_end_label; 31 JUMP_LABEL (jump) = div_end_label;
35 LABEL_NUSES (div_end_label) = 1; 32 LABEL_NUSES (div_end_label) = 1;
36-- 33--
372.37.1 (Apple Git-137.1) 342.34.1
38 35
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0011-Patch-microblaze-Added-ashrsi3_with_size_opt.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0011-Added-ashrsi3_with_size_opt-Added-ashrsi3_with_size_.patch
index 09ebfca6..8988e23b 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0011-Patch-microblaze-Added-ashrsi3_with_size_opt.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0011-Added-ashrsi3_with_size_opt-Added-ashrsi3_with_size_.patch
@@ -1,12 +1,10 @@
1From 7dd4ae2ad891094aa85a907b168cbdce744789e9 Mon Sep 17 00:00:00 2001 1From 41d8b3677d64bf9408925667c103a04b176050d5 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 16:52:56 +0530 3Date: Thu, 12 Jan 2017 16:52:56 +0530
4Subject: [PATCH 11/53] [Patch, microblaze]: Added ashrsi3_with_size_opt Added 4Subject: [PATCH 11/54] Added ashrsi3_with_size_opt Added ashrsi3_with_size_opt
5 ashrsi3_with_size_opt pattern to optimize the sra instructions when the -Os 5 pattern to optimize the sra instructions when the -Os optimization is used.
6 optimization is used. lshrsi3_with_size_opt is being removed as it has 6 lshrsi3_with_size_opt is being removed as it has conflicts with unsigned int
7 conflicts with unsigned int variables 7 variables
8
9Upstream-Status: Pending
10 8
11Signed-off-by:Nagaraju Mekala <nmekala@xilix.com> 9Signed-off-by:Nagaraju Mekala <nmekala@xilix.com>
12--- 10---
@@ -14,7 +12,7 @@ Signed-off-by:Nagaraju Mekala <nmekala@xilix.com>
14 1 file changed, 21 insertions(+) 12 1 file changed, 21 insertions(+)
15 13
16diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 14diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
17index ea7f74f1dff..9fbb3113f3c 100644 15index dfd7395432b..4f20b8efe33 100644
18--- a/gcc/config/microblaze/microblaze.md 16--- a/gcc/config/microblaze/microblaze.md
19+++ b/gcc/config/microblaze/microblaze.md 17+++ b/gcc/config/microblaze/microblaze.md
20@@ -1508,6 +1508,27 @@ 18@@ -1508,6 +1508,27 @@
@@ -46,5 +44,5 @@ index ea7f74f1dff..9fbb3113f3c 100644
46 [(set (match_operand:SI 0 "register_operand" "=&d") 44 [(set (match_operand:SI 0 "register_operand" "=&d")
47 (ashiftrt:SI (match_operand:SI 1 "register_operand" "d") 45 (ashiftrt:SI (match_operand:SI 1 "register_operand" "d")
48-- 46--
492.37.1 (Apple Git-137.1) 472.34.1
50 48
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0012-Patch-microblaze-Use-bralid-for-profiler-calls.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0012-Use-bralid-for-profiler-calls-Signed-off-by-Edgar-E..patch
index c26d46d4..46a8699a 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0012-Patch-microblaze-Use-bralid-for-profiler-calls.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0012-Use-bralid-for-profiler-calls-Signed-off-by-Edgar-E..patch
@@ -1,17 +1,15 @@
1From 12d7e086376916ef61e2c48639671fd0f7c8fbbf Mon Sep 17 00:00:00 2001 1From 9dc1f7291c4c7abfe254ca4e86a6ba0975a74960 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 10:57:19 +0530 3Date: Tue, 17 Jan 2017 10:57:19 +0530
4Subject: [PATCH 12/53] [Patch, microblaze]: Use bralid for profiler calls 4Subject: [PATCH 12/54] Use bralid for profiler calls Signed-off-by: Edgar E.
5Upstream-Status: Pending 5 Iglesias <edgar.iglesias@gmail.com>
6
7 Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
8 6
9--- 7---
10 gcc/config/microblaze/microblaze.h | 2 +- 8 gcc/config/microblaze/microblaze.h | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-) 9 1 file changed, 1 insertion(+), 1 deletion(-)
12 10
13diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 11diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
14index d28bc766de8..cd544f2030e 100644 12index 0398902362b..49e7fbedd5a 100644
15--- a/gcc/config/microblaze/microblaze.h 13--- a/gcc/config/microblaze/microblaze.h
16+++ b/gcc/config/microblaze/microblaze.h 14+++ b/gcc/config/microblaze/microblaze.h
17@@ -486,7 +486,7 @@ typedef struct microblaze_args 15@@ -486,7 +486,7 @@ typedef struct microblaze_args
@@ -24,5 +22,5 @@ index d28bc766de8..cd544f2030e 100644
24 } 22 }
25 23
26-- 24--
272.37.1 (Apple Git-137.1) 252.34.1
28 26
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0013-Patch-microblaze-Removed-moddi3-routinue.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0013-Removed-moddi3-routinue-Using-the-default-moddi3-fun.patch
index 8739e6ea..26c24a49 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0013-Patch-microblaze-Removed-moddi3-routinue.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0013-Removed-moddi3-routinue-Using-the-default-moddi3-fun.patch
@@ -1,10 +1,8 @@
1From cd8c9f3c43b266628d1585b74fc78f3e34a33c44 Mon Sep 17 00:00:00 2001 1From a2dbb662c573d2bf1a6a9192eb0d7f453ad20c59 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 17:36:16 +0530 3Date: Thu, 12 Jan 2017 17:36:16 +0530
4Subject: [PATCH 13/53] [Patch, microblaze]: Removed moddi3 routinue Using the 4Subject: [PATCH 13/54] Removed moddi3 routinue Using the default moddi3
5 default moddi3 function as the existing implementation has many bugs 5 function as the existing implementation has many bugs
6
7Upstream-Status: Pending
8 6
9Signed-off-by:Nagaraju <nmekala@xilix.com> 7Signed-off-by:Nagaraju <nmekala@xilix.com>
10 8
@@ -18,13 +16,13 @@ Conflicts:
18 16
19diff --git a/libgcc/config/microblaze/moddi3.S b/libgcc/config/microblaze/moddi3.S 17diff --git a/libgcc/config/microblaze/moddi3.S b/libgcc/config/microblaze/moddi3.S
20deleted file mode 100644 18deleted file mode 100644
21index 9b77865df38..00000000000 19index b3e4bf6182e..00000000000
22--- a/libgcc/config/microblaze/moddi3.S 20--- a/libgcc/config/microblaze/moddi3.S
23+++ /dev/null 21+++ /dev/null
24@@ -1,121 +0,0 @@ 22@@ -1,121 +0,0 @@
25-################################### 23-###################################
26-# 24-#
27-# Copyright (C) 2009-2022 Free Software Foundation, Inc. 25-# Copyright (C) 2009-2023 Free Software Foundation, Inc.
28-# 26-#
29-# Contributed by Michael Eager <eager@eagercon.com>. 27-# Contributed by Michael Eager <eager@eagercon.com>.
30-# 28-#
@@ -158,5 +156,5 @@ index 96959f0292b..8d954a49575 100644
158 $(srcdir)/config/microblaze/muldi3_hard.S \ 156 $(srcdir)/config/microblaze/muldi3_hard.S \
159 $(srcdir)/config/microblaze/mulsi3.S \ 157 $(srcdir)/config/microblaze/mulsi3.S \
160-- 158--
1612.37.1 (Apple Git-137.1) 1592.34.1
162 160
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0014-Patch-microblaze-Add-INIT_PRIORITY-support-Added.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0014-Add-INIT_PRIORITY-support-Added-TARGET_ASM_CONSTRUCT.patch
index 472c543c..9e4348ad 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0014-Patch-microblaze-Add-INIT_PRIORITY-support-Added.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0014-Add-INIT_PRIORITY-support-Added-TARGET_ASM_CONSTRUCT.patch
@@ -1,8 +1,8 @@
1From 30aa7cef2dd076637155384fba539838ddaf0163 Mon Sep 17 00:00:00 2001 1From 40dd974a6cd608567f1746a934c9743b80ca1e3f Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Mon, 12 Sep 2022 20:20:00 +0530 3Date: Mon, 12 Sep 2022 20:20:00 +0530
4Subject: [PATCH 14/53] [Patch, microblaze]: Add INIT_PRIORITY support Added 4Subject: [PATCH 14/54] Add INIT_PRIORITY support Added TARGET_ASM_CONSTRUCTOR
5 TARGET_ASM_CONSTRUCTOR and TARGET_ASM_DESTRUCTOR macros. 5 and TARGET_ASM_DESTRUCTOR macros.
6 6
7These macros allows users to control the order of initialization 7These macros allows users to control the order of initialization
8of objects defined at namespace scope with the init_priority 8of objects defined at namespace scope with the init_priority
@@ -10,19 +10,15 @@ attribute by specifying a relative priority, a constant integral
10expression currently bounded between 101 and 65535 inclusive. 10expression currently bounded between 101 and 65535 inclusive.
11 11
12Lower numbers indicate a higher priority. 12Lower numbers indicate a higher priority.
13Upstream-Status: Pending
14
15Signed-off-by: Mark Hatle <mark.hatle@amd.com>
16
17--- 13---
18 gcc/config/microblaze/microblaze.cc | 53 +++++++++++++++++++++++++++++ 14 gcc/config/microblaze/microblaze.cc | 53 +++++++++++++++++++++++++++++
19 1 file changed, 53 insertions(+) 15 1 file changed, 53 insertions(+)
20 16
21diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 17diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
22index 6922dd94af7..4b0621db168 100644 18index 11e34b3fdae..3fb402b87d4 100644
23--- a/gcc/config/microblaze/microblaze.cc 19--- a/gcc/config/microblaze/microblaze.cc
24+++ b/gcc/config/microblaze/microblaze.cc 20+++ b/gcc/config/microblaze/microblaze.cc
25@@ -2635,6 +2635,53 @@ print_operand_address (FILE * file, rtx addr) 21@@ -2640,6 +2640,53 @@ print_operand_address (FILE * file, rtx addr)
26 } 22 }
27 } 23 }
28 24
@@ -76,7 +72,7 @@ index 6922dd94af7..4b0621db168 100644
76 /* Emit either a label, .comm, or .lcomm directive, and mark that the symbol 72 /* Emit either a label, .comm, or .lcomm directive, and mark that the symbol
77 is used, so that we don't emit an .extern for it in 73 is used, so that we don't emit an .extern for it in
78 microblaze_asm_file_end. */ 74 microblaze_asm_file_end. */
79@@ -3976,6 +4023,12 @@ microblaze_starting_frame_offset (void) 75@@ -3985,6 +4032,12 @@ microblaze_starting_frame_offset (void)
80 #undef TARGET_ATTRIBUTE_TABLE 76 #undef TARGET_ATTRIBUTE_TABLE
81 #define TARGET_ATTRIBUTE_TABLE microblaze_attribute_table 77 #define TARGET_ATTRIBUTE_TABLE microblaze_attribute_table
82 78
@@ -90,5 +86,5 @@ index 6922dd94af7..4b0621db168 100644
90 #define TARGET_IN_SMALL_DATA_P microblaze_elf_in_small_data_p 86 #define TARGET_IN_SMALL_DATA_P microblaze_elf_in_small_data_p
91 87
92-- 88--
932.37.1 (Apple Git-137.1) 892.34.1
94 90
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0015-Patch-microblaze-Add-optimized-lshrsi3.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0015-Add-optimized-lshrsi3-When-barrel-shifter-is-not-pre.patch
index 7ce5ebc0..fac95b7b 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0015-Patch-microblaze-Add-optimized-lshrsi3.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0015-Add-optimized-lshrsi3-When-barrel-shifter-is-not-pre.patch
@@ -1,9 +1,9 @@
1From b9bb669d9404bd04676f09c793310e1b7f228674 Mon Sep 17 00:00:00 2001 1From d0f1a493d130e06816df4d11f31421a8691761e0 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 15:23:57 +0530 3Date: Tue, 17 Jan 2017 15:23:57 +0530
4Subject: [PATCH 15/53] [Patch, microblaze]: Add optimized lshrsi3 When barrel 4Subject: [PATCH 15/54] Add optimized lshrsi3 When barrel shifter is not
5 shifter is not present, the immediate value is greater than #5 and 5 present, the immediate value is greater than #5 and optimization is -OS, the
6 optimization is -OS, the compiler will generate shift operation using loop. 6 compiler will generate shift operation using loop.
7 7
8Changelog 8Changelog
9 9
@@ -17,8 +17,6 @@ ChangeLog/testsuite
17 17
18 * gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c: New test. 18 * gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c: New test.
19 19
20Upstream-Status: Pending
21
22Signed-off-by:Nagaraju <nmekala@xilix.com> 20Signed-off-by:Nagaraju <nmekala@xilix.com>
23Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 21Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
24--- 22---
@@ -28,7 +26,7 @@ Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
28 create mode 100644 gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c 26 create mode 100644 gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c
29 27
30diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 28diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
31index 9fbb3113f3c..52308cce0cb 100644 29index 4f20b8efe33..5d65ad84449 100644
32--- a/gcc/config/microblaze/microblaze.md 30--- a/gcc/config/microblaze/microblaze.md
33+++ b/gcc/config/microblaze/microblaze.md 31+++ b/gcc/config/microblaze/microblaze.md
34@@ -1618,6 +1618,27 @@ 32@@ -1618,6 +1618,27 @@
@@ -79,5 +77,5 @@ index 00000000000..32a3be7c76a
79+/* { dg-final { scan-assembler "bneid\tr18,.-4" } } */ 77+/* { dg-final { scan-assembler "bneid\tr18,.-4" } } */
80+/* { dg-final { scan-assembler "\srl\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r(\[0-9]\|\[1-2]\[0-9]\|3\[0-1])" } } */ 78+/* { dg-final { scan-assembler "\srl\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r(\[0-9]\|\[1-2]\[0-9]\|3\[0-1])" } } */
81-- 79--
822.37.1 (Apple Git-137.1) 802.34.1
83 81
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0016-Patch-microblaze-Add-cbranchsi4_reg.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0016-Add-cbranchsi4_reg-This-patch-optimizes-the-generati.patch
index dc645c30..298765dc 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0016-Patch-microblaze-Add-cbranchsi4_reg.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0016-Add-cbranchsi4_reg-This-patch-optimizes-the-generati.patch
@@ -1,12 +1,9 @@
1From 08d7bb4062024f3e34fbb17d695f8fa2c9e1b305 Mon Sep 17 00:00:00 2001 1From e94d406c9fa0d7b99532bd8cf4b2a4580cdb02b7 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 17:04:37 +0530 3Date: Tue, 17 Jan 2017 17:04:37 +0530
4Subject: [PATCH 16/53] [Patch, microblaze]: Add cbranchsi4_reg This patch 4Subject: [PATCH 16/54] Add cbranchsi4_reg This patch optimizes the generation
5 optimizes the generation of pcmpne/pcmpeq instruction if the compare 5 of pcmpne/pcmpeq instruction if the compare instruction has no immediate
6 instruction has no immediate values.For the immediate values the xor 6 values.For the immediate values the xor instruction is generated
7 instruction is generated
8
9Upstream-Status: Pending
10 7
11Signed-off-by: Nagaraju Mekala <nmekala@xilix.com> 8Signed-off-by: Nagaraju Mekala <nmekala@xilix.com>
12Signed-off-by: Ajit Agarwal <ajitkum@xilinx.com> 9Signed-off-by: Ajit Agarwal <ajitkum@xilinx.com>
@@ -32,7 +29,7 @@ Conflicts:
32 7 files changed, 18 insertions(+), 18 deletions(-) 29 7 files changed, 18 insertions(+), 18 deletions(-)
33 30
34diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h 31diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h
35index d67355697b5..848cd509003 100644 32index 31a6515176b..41557af0f3c 100644
36--- a/gcc/config/microblaze/microblaze-protos.h 33--- a/gcc/config/microblaze/microblaze-protos.h
37+++ b/gcc/config/microblaze/microblaze-protos.h 34+++ b/gcc/config/microblaze/microblaze-protos.h
38@@ -33,7 +33,7 @@ extern int microblaze_expand_shift (rtx *); 35@@ -33,7 +33,7 @@ extern int microblaze_expand_shift (rtx *);
@@ -145,5 +142,5 @@ index 1d6ba807b12..532c035adfd 100644
145 142
146 } 143 }
147-- 144--
1482.37.1 (Apple Git-137.1) 1452.34.1
149 146
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0017-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0017-Inline-Expansion-of-fsqrt-builtin.-The-changes-are-m.patch
index b0d33516..91ca87fc 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0017-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0017-Inline-Expansion-of-fsqrt-builtin.-The-changes-are-m.patch
@@ -1,19 +1,19 @@
1From 1593e5a9839b7cade95e9f55ba3cff66d64d0e84 Mon Sep 17 00:00:00 2001 1From 0760cd661f6c09cda8327288f79314319a0b9b14 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 17:11:04 +0530 3Date: Tue, 17 Jan 2017 17:11:04 +0530
4Subject: [PATCH 17/53] [Patch,microblaze]: Inline Expansion of fsqrt builtin. 4Subject: [PATCH 17/54] Inline Expansion of fsqrt builtin. The changes are made
5 The changes are made in the patch for the inline expansion of the fsqrt 5 in the patch for the inline expansion of the fsqrt builtin with fqrt
6 builtin with fqrt instruction. The sqrt math function takes double as 6 instruction. The sqrt math function takes double as argument and return
7 argument and return double as argument. The pattern is selected while 7 double as argument. The pattern is selected while expanding the unary op
8 expanding the unary op through expand_unop which passes DFmode and the DFmode 8 through expand_unop which passes DFmode and the DFmode pattern was not there
9 pattern was not there returning zero. Thus the sqrt math function is not 9 returning zero. Thus the sqrt math function is not inlined and expanded. The
10 inlined and expanded. The pattern with DFmode argument is added. Also the 10 pattern with DFmode argument is added. Also the source and destination
11 source and destination argument is not same the DF through two different 11 argument is not same the DF through two different consecutive registers with
12 consecutive registers with lower 32 bit is the argument passed to sqrt and 12 lower 32 bit is the argument passed to sqrt and the higher 32 bit is zero. If
13 the higher 32 bit is zero. If the source and destinations are different the 13 the source and destinations are different the DFmode 64 bits registers is not
14 DFmode 64 bits registers is not set properly giving the problem in runtime. 14 set properly giving the problem in runtime. Such changes are taken care in
15 Such changes are taken care in the implementation of the pattern for DFmode 15 the implementation of the pattern for DFmode for inline expansion of the
16 for inline expansion of the sqrt. 16 sqrt.
17 17
18ChangeLog: 18ChangeLog:
192015-06-16 Ajit Agarwal <ajitkum@xilinx.com> 192015-06-16 Ajit Agarwal <ajitkum@xilinx.com>
@@ -22,8 +22,6 @@ ChangeLog:
22 * config/microblaze/microblaze.md (sqrtdf2): New 22 * config/microblaze/microblaze.md (sqrtdf2): New
23 pattern. 23 pattern.
24 24
25Upstream-Status: Pending
26
27Signed-off-by:Ajit Agarwal ajitkum@xilinx.com 25Signed-off-by:Ajit Agarwal ajitkum@xilinx.com
28 Nagaraju Mekala nmekala@xilinx.com 26 Nagaraju Mekala nmekala@xilinx.com
29--- 27---
@@ -31,7 +29,7 @@ Signed-off-by:Ajit Agarwal ajitkum@xilinx.com
31 1 file changed, 14 insertions(+) 29 1 file changed, 14 insertions(+)
32 30
33diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 31diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
34index 52308cce0cb..0e5ef4d7649 100644 32index 5d65ad84449..0597ed8d75a 100644
35--- a/gcc/config/microblaze/microblaze.md 33--- a/gcc/config/microblaze/microblaze.md
36+++ b/gcc/config/microblaze/microblaze.md 34+++ b/gcc/config/microblaze/microblaze.md
37@@ -451,6 +451,20 @@ 35@@ -451,6 +451,20 @@
@@ -56,5 +54,5 @@ index 52308cce0cb..0e5ef4d7649 100644
56 [(set (match_operand:SI 0 "register_operand" "=d") 54 [(set (match_operand:SI 0 "register_operand" "=d")
57 (fix:SI (match_operand:SF 1 "register_operand" "d")))] 55 (fix:SI (match_operand:SF 1 "register_operand" "d")))]
58-- 56--
592.37.1 (Apple Git-137.1) 572.34.1
60 58
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0018-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0018-microblaze.md-Improve-adddi3-and-subdi3-insn-definit.patch
index 94235be6..f388e9b5 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0018-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0018-microblaze.md-Improve-adddi3-and-subdi3-insn-definit.patch
@@ -1,9 +1,9 @@
1From 9002b7d4c295bef95a3fc28c05f86dde5087dde1 Mon Sep 17 00:00:00 2001 1From 0a7299e82a8f463e9e7cd6297c5bdc0aac3a0ec4 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 18:07:24 +0530 3Date: Tue, 17 Jan 2017 18:07:24 +0530
4Subject: [PATCH 18/53] [PATCH] microblaze.md: Improve 'adddi3' and 'subdi3' 4Subject: [PATCH 18/54] microblaze.md: Improve 'adddi3' and 'subdi3' insn
5 insn definitions Change adddi3 to handle DI immediates as the second operand, 5 definitions Change adddi3 to handle DI immediates as the second operand, this
6 this requires modification to the output template however reduces the need to 6 requires modification to the output template however reduces the need to
7 specify seperate templates for 16-bit positive/negative immediate operands. 7 specify seperate templates for 16-bit positive/negative immediate operands.
8 The use of 32-bit immediates for the addi and addic instructions is handled 8 The use of 32-bit immediates for the addi and addic instructions is handled
9 by the assembler, which will emit the imm instructions when required. This 9 by the assembler, which will emit the imm instructions when required. This
@@ -17,15 +17,13 @@ implement purely with instructions as microblaze does not provide an
17instruction to perform a forward arithmetic subtraction (it only 17instruction to perform a forward arithmetic subtraction (it only
18provides reverse 'rD = IMM - rA'). 18provides reverse 'rD = IMM - rA').
19 19
20Upstream-Status: Pending
21
22Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> 20Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
23--- 21---
24 gcc/config/microblaze/microblaze.md | 13 ++++++------- 22 gcc/config/microblaze/microblaze.md | 13 ++++++-------
25 1 file changed, 6 insertions(+), 7 deletions(-) 23 1 file changed, 6 insertions(+), 7 deletions(-)
26 24
27diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 25diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
28index 0e5ef4d7649..effb9774c32 100644 26index 0597ed8d75a..498926a4a75 100644
29--- a/gcc/config/microblaze/microblaze.md 27--- a/gcc/config/microblaze/microblaze.md
30+++ b/gcc/config/microblaze/microblaze.md 28+++ b/gcc/config/microblaze/microblaze.md
31@@ -502,17 +502,16 @@ 29@@ -502,17 +502,16 @@
@@ -61,5 +59,5 @@ index 0e5ef4d7649..effb9774c32 100644
61 "rsub\t%L0,%L2,%L1\;rsubc\t%M0,%M2,%M1" 59 "rsub\t%L0,%L2,%L1\;rsubc\t%M0,%M2,%M1"
62 [(set_attr "type" "darith") 60 [(set_attr "type" "darith")
63-- 61--
642.37.1 (Apple Git-137.1) 622.34.1
65 63
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0019-Update-ashlsi3-movsf-patterns-This-patch-removes-the.patch
index e955938e..0f388f70 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0019-Update-ashlsi3-movsf-patterns-This-patch-removes-the.patch
@@ -1,10 +1,10 @@
1From ef94a8b2110f5a3becefb00c1f7c0c3adac6fcac Mon Sep 17 00:00:00 2001 1From a969ab3f04de077eca6d928dd651e3c6b042367d Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 18:18:41 +0530 3Date: Tue, 17 Jan 2017 18:18:41 +0530
4Subject: [PATCH 19/53] [Patch, microblaze]: Update ashlsi3 & movsf patterns 4Subject: [PATCH 19/54] Update ashlsi3 & movsf patterns This patch removes the
5 This patch removes the use of HOST_WIDE_INT_PRINT_HEX macro in print_operand 5 use of HOST_WIDE_INT_PRINT_HEX macro in print_operand of
6 of ashlsi3_with_mul_nodelay,ashlsi3_with_mul_delay and movsf_internal 6 ashlsi3_with_mul_nodelay,ashlsi3_with_mul_delay and movsf_internal patterns
7 patterns beacuse HOST_WIDE_INT_PRINT_HEX is generating 64-bit value which our 7 beacuse HOST_WIDE_INT_PRINT_HEX is generating 64-bit value which our
8 instruction doesn't support so using gen_int_mode function 8 instruction doesn't support so using gen_int_mode function
9 9
10Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 10Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
@@ -24,20 +24,16 @@ ChangeLog:
24 24
25Conflicts: 25Conflicts:
26 gcc/config/microblaze/microblaze.c 26 gcc/config/microblaze/microblaze.c
27Upstream-Status: Pending
28
29Signed-off-by: Mark Hatle <mark.hatle@amd.com>
30
31--- 27---
32 gcc/config/microblaze/microblaze.cc | 2 +- 28 gcc/config/microblaze/microblaze.cc | 2 +-
33 gcc/config/microblaze/microblaze.md | 10 ++++++++-- 29 gcc/config/microblaze/microblaze.md | 10 ++++++++--
34 2 files changed, 9 insertions(+), 3 deletions(-) 30 2 files changed, 9 insertions(+), 3 deletions(-)
35 31
36diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 32diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
37index 4b0621db168..c23061c4e4a 100644 33index 3fb402b87d4..ff64e0ca342 100644
38--- a/gcc/config/microblaze/microblaze.cc 34--- a/gcc/config/microblaze/microblaze.cc
39+++ b/gcc/config/microblaze/microblaze.cc 35+++ b/gcc/config/microblaze/microblaze.cc
40@@ -2469,7 +2469,7 @@ print_operand (FILE * file, rtx op, int letter) 36@@ -2474,7 +2474,7 @@ print_operand (FILE * file, rtx op, int letter)
41 unsigned long value_long; 37 unsigned long value_long;
42 REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), 38 REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op),
43 value_long); 39 value_long);
@@ -47,7 +43,7 @@ index 4b0621db168..c23061c4e4a 100644
47 else 43 else
48 { 44 {
49diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 45diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
50index effb9774c32..a4d7ea29219 100644 46index 498926a4a75..0448101de8a 100644
51--- a/gcc/config/microblaze/microblaze.md 47--- a/gcc/config/microblaze/microblaze.md
52+++ b/gcc/config/microblaze/microblaze.md 48+++ b/gcc/config/microblaze/microblaze.md
53@@ -1368,7 +1368,10 @@ 49@@ -1368,7 +1368,10 @@
@@ -75,5 +71,5 @@ index effb9774c32..a4d7ea29219 100644
75 [(set_attr "type" "no_delay_arith") 71 [(set_attr "type" "no_delay_arith")
76 (set_attr "mode" "SI") 72 (set_attr "mode" "SI")
77-- 73--
782.37.1 (Apple Git-137.1) 742.34.1
79 75
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0020-Patch-microblaze-8-stage-pipeline-for-microblaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0020-8-stage-pipeline-for-microblaze-This-patch-adds-the-.patch
index 2d384b78..002e60be 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0020-Patch-microblaze-8-stage-pipeline-for-microblaze.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0020-8-stage-pipeline-for-microblaze-This-patch-adds-the-.patch
@@ -1,15 +1,11 @@
1From 65574bdca9006fda7654e33a0081eeecfcd9976b Mon Sep 17 00:00:00 2001 1From 21daca8e01515b2e73463adbf9488b63bb0ccf54 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Mon, 12 Sep 2022 21:05:51 +0530 3Date: Mon, 12 Sep 2022 21:05:51 +0530
4Subject: [PATCH 20/53] [Patch, microblaze]: 8-stage pipeline for microblaze 4Subject: [PATCH 20/54] 8-stage pipeline for microblaze This patch adds the
5 This patch adds the support for the 8-stage pipeline. The new 8-stage 5 support for the 8-stage pipeline. The new 8-stage pipeline reduces the
6 pipeline reduces the latencies of float & integer division drastically 6 latencies of float & integer division drastically
7 7
8Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 8Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
9Upstream-Status: Pending
10
11Signed-off-by: Mark Hatle <mark.hatle@amd.com>
12
13--- 9---
14 gcc/config/microblaze/microblaze.cc | 11 ++++ 10 gcc/config/microblaze/microblaze.cc | 11 ++++
15 gcc/config/microblaze/microblaze.h | 3 +- 11 gcc/config/microblaze/microblaze.h | 3 +-
@@ -18,10 +14,10 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com>
18 4 files changed, 94 insertions(+), 3 deletions(-) 14 4 files changed, 94 insertions(+), 3 deletions(-)
19 15
20diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 16diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
21index c23061c4e4a..bd394c411b8 100644 17index ff64e0ca342..a58a5b2a1b0 100644
22--- a/gcc/config/microblaze/microblaze.cc 18--- a/gcc/config/microblaze/microblaze.cc
23+++ b/gcc/config/microblaze/microblaze.cc 19+++ b/gcc/config/microblaze/microblaze.cc
24@@ -1841,6 +1841,17 @@ microblaze_option_override (void) 20@@ -1846,6 +1846,17 @@ microblaze_option_override (void)
25 "%<-mcpu=v8.30.a%>"); 21 "%<-mcpu=v8.30.a%>");
26 TARGET_REORDER = 0; 22 TARGET_REORDER = 0;
27 } 23 }
@@ -40,7 +36,7 @@ index c23061c4e4a..bd394c411b8 100644
40 if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL) 36 if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL)
41 error ("%<-mxl-multiply-high%> requires %<-mno-xl-soft-mul%>"); 37 error ("%<-mxl-multiply-high%> requires %<-mno-xl-soft-mul%>");
42diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 38diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
43index cd544f2030e..640ae6ea9a3 100644 39index 49e7fbedd5a..e4faa9c681f 100644
44--- a/gcc/config/microblaze/microblaze.h 40--- a/gcc/config/microblaze/microblaze.h
45+++ b/gcc/config/microblaze/microblaze.h 41+++ b/gcc/config/microblaze/microblaze.h
46@@ -27,7 +27,8 @@ 42@@ -27,7 +27,8 @@
@@ -54,7 +50,7 @@ index cd544f2030e..640ae6ea9a3 100644
54 50
55 #define MICROBLAZE_MASK_NO_UNSAFE_DELAY 0x00000001 51 #define MICROBLAZE_MASK_NO_UNSAFE_DELAY 0x00000001
56diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 52diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
57index a4d7ea29219..9e9dfb1ccb0 100644 53index 0448101de8a..7a01b28d8f0 100644
58--- a/gcc/config/microblaze/microblaze.md 54--- a/gcc/config/microblaze/microblaze.md
59+++ b/gcc/config/microblaze/microblaze.md 55+++ b/gcc/config/microblaze/microblaze.md
60@@ -35,6 +35,7 @@ 56@@ -35,6 +35,7 @@
@@ -165,7 +161,7 @@ index a4d7ea29219..9e9dfb1ccb0 100644
165 (set_attr "length" "4")]) 161 (set_attr "length" "4")])
166 162
167diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt 163diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt
168index 9f47e67cf2a..cc009363f87 100644 164index dbf6390ef4b..37aaaf9ffda 100644
169--- a/gcc/config/microblaze/microblaze.opt 165--- a/gcc/config/microblaze/microblaze.opt
170+++ b/gcc/config/microblaze/microblaze.opt 166+++ b/gcc/config/microblaze/microblaze.opt
171@@ -133,3 +133,7 @@ Data referenced by offset from start of text instead of GOT (with -fPIC/-fPIE). 167@@ -133,3 +133,7 @@ Data referenced by offset from start of text instead of GOT (with -fPIC/-fPIE).
@@ -177,5 +173,5 @@ index 9f47e67cf2a..cc009363f87 100644
177+Target Mask(AREA_OPTIMIZED_2) 173+Target Mask(AREA_OPTIMIZED_2)
178+Use 8 stage pipeline (frequency optimization) 174+Use 8 stage pipeline (frequency optimization)
179-- 175--
1802.37.1 (Apple Git-137.1) 1762.34.1
181 177
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0021-PATCH-21-53-Patch-microblaze-Correct-the-const-high-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0021-Correct-the-const-high-double-immediate-value-with-t.patch
index 1b8d924c..2e8182d1 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0021-PATCH-21-53-Patch-microblaze-Correct-the-const-high-.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0021-Correct-the-const-high-double-immediate-value-with-t.patch
@@ -1,18 +1,14 @@
1From 1d56bfb436b008422b4a7d4d4e3180667130c840 Mon Sep 17 00:00:00 2001 1From 1cda2f5772650aa65853e6a3e9d8162498c2f469 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 13 Sep 2022 11:49:11 +0530 3Date: Tue, 13 Sep 2022 11:49:11 +0530
4Subject: [PATCH 21/53] [PATCH 21/53] [Patch, microblaze]: Correct the const 4Subject: [PATCH 21/54] Correct the const high double immediate value with this
5 high double immediate value with this patch the loading of the DI mode 5 patch the loading of the DI mode immediate values will be using
6 immediate values will be using REAL_VALUE_FROM_CONST_DOUBLE and 6 REAL_VALUE_FROM_CONST_DOUBLE and REAL_VALUE_TO_TARGET_DOUBLE functions, as
7 REAL_VALUE_TO_TARGET_DOUBLE functions, as CONST_DOUBLE_HIGH was returning 7 CONST_DOUBLE_HIGH was returning the sign extension value even of the unsigned
8 the sign extension value even of the unsigned long long constants also 8 long long constants also
9 9
10Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 10Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
11 Ajit Agarwal <ajitkum@xilinx.com> 11 Ajit Agarwal <ajitkum@xilinx.com>
12Upstream-Status: Pending
13
14Signed-off-by: Mark Hatle <mark.hatle@amd.com>
15
16--- 12---
17 gcc/config/microblaze/microblaze.cc | 6 ++++-- 13 gcc/config/microblaze/microblaze.cc | 6 ++++--
18 gcc/testsuite/gcc.target/microblaze/others/long.c | 9 +++++++++ 14 gcc/testsuite/gcc.target/microblaze/others/long.c | 9 +++++++++
@@ -20,10 +16,10 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com>
20 create mode 100644 gcc/testsuite/gcc.target/microblaze/others/long.c 16 create mode 100644 gcc/testsuite/gcc.target/microblaze/others/long.c
21 17
22diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 18diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
23index bd394c411b8..7c648cda1b2 100644 19index a58a5b2a1b0..af5c2371740 100644
24--- a/gcc/config/microblaze/microblaze.cc 20--- a/gcc/config/microblaze/microblaze.cc
25+++ b/gcc/config/microblaze/microblaze.cc 21+++ b/gcc/config/microblaze/microblaze.cc
26@@ -2453,14 +2453,16 @@ print_operand (FILE * file, rtx op, int letter) 22@@ -2458,14 +2458,16 @@ print_operand (FILE * file, rtx op, int letter)
27 else if (letter == 'h' || letter == 'j') 23 else if (letter == 'h' || letter == 'j')
28 { 24 {
29 long val[2]; 25 long val[2];
@@ -58,5 +54,5 @@ index 00000000000..b6b55d5ad65
58+/* { dg-final { scan-assembler "addik\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r0,0x00000000" } } */ 54+/* { dg-final { scan-assembler "addik\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r0,0x00000000" } } */
59+/* { dg-final { scan-assembler "addik\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r0,0xf0000000" } } */ 55+/* { dg-final { scan-assembler "addik\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r0,0xf0000000" } } */
60-- 56--
612.37.1 (Apple Git-137.1) 572.34.1
62 58
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0022-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0022-Fix-internal-compiler-error-with-msmall-divides-This.patch
index a5917947..599bd71e 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0022-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0022-Fix-internal-compiler-error-with-msmall-divides-This.patch
@@ -1,27 +1,23 @@
1From cd60ea1bd88ac47856ac66266a0771478ac73bad Mon Sep 17 00:00:00 2001 1From a88796930d8ef1b97056217ffdcc9f86326cdc98 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 13 Sep 2022 11:58:14 +0530 3Date: Tue, 13 Sep 2022 11:58:14 +0530
4Subject: [PATCH 22/53] [Fix, microblaze]: Fix internal compiler error with 4Subject: [PATCH 22/54] Fix internal compiler error with msmall-divides This
5 msmall-divides This patch will fix the internal error 5 patch will fix the internal error microblaze_expand_divide function which
6 microblaze_expand_divide function which come of rtx PLUS where the 6 come of rtx PLUS where the mem_rtx is of type SI and the operand is of type
7 mem_rtx is of type SI and the operand is of type QImode. This patch 7 QImode. This patch modifies the mem_rtx as QImode and Plus as QImode to fix
8 modifies the mem_rtx as QImode and Plus as QImode to fix the error. 8 the error.
9 9
10 Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 10 Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
11 Ajit Agarwal <ajitkum@xilinx.com> 11 Ajit Agarwal <ajitkum@xilinx.com>
12Upstream-Status: Pending
13
14Signed-off-by: Mark Hatle <mark.hatle@amd.com>
15
16--- 12---
17 gcc/config/microblaze/microblaze.cc | 2 +- 13 gcc/config/microblaze/microblaze.cc | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-) 14 1 file changed, 1 insertion(+), 1 deletion(-)
19 15
20diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 16diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
21index 7c648cda1b2..907c0afa9b8 100644 17index af5c2371740..4967d6a0133 100644
22--- a/gcc/config/microblaze/microblaze.cc 18--- a/gcc/config/microblaze/microblaze.cc
23+++ b/gcc/config/microblaze/microblaze.cc 19+++ b/gcc/config/microblaze/microblaze.cc
24@@ -3768,7 +3768,7 @@ microblaze_expand_divide (rtx operands[]) 20@@ -3777,7 +3777,7 @@ microblaze_expand_divide (rtx operands[])
25 emit_insn (gen_ashlsi3_bshift (regt1, operands[1], GEN_INT(4))); 21 emit_insn (gen_ashlsi3_bshift (regt1, operands[1], GEN_INT(4)));
26 emit_insn (gen_addsi3 (regt1, regt1, operands[2])); 22 emit_insn (gen_addsi3 (regt1, regt1, operands[2]));
27 mem_rtx = gen_rtx_MEM (QImode, 23 mem_rtx = gen_rtx_MEM (QImode,
@@ -31,5 +27,5 @@ index 7c648cda1b2..907c0afa9b8 100644
31 insn = emit_insn (gen_zero_extendqisi2(operands[0],mem_rtx)); 27 insn = emit_insn (gen_zero_extendqisi2(operands[0],mem_rtx));
32 jump = emit_jump_insn_after (gen_jump (div_end_label), insn); 28 jump = emit_jump_insn_after (gen_jump (div_end_label), insn);
33-- 29--
342.37.1 (Apple Git-137.1) 302.34.1
35 31
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0023-patch-microblaze-Fix-the-calculation-of-high-word-in.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0023-Fix-the-calculation-of-high-word-in-a-long-long-64-b.patch
index ae05e791..65f283ad 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0023-patch-microblaze-Fix-the-calculation-of-high-word-in.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0023-Fix-the-calculation-of-high-word-in-a-long-long-64-b.patch
@@ -1,8 +1,7 @@
1From b98cddb206ce84994425ede4b116365977768e37 Mon Sep 17 00:00:00 2001 1From f9871617fe69a105ebc4aa4838c682bfe40e4f2c Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 13 Sep 2022 12:03:08 +0530 3Date: Tue, 13 Sep 2022 12:03:08 +0530
4Subject: [PATCH 23/53] [patch,microblaze]: Fix the calculation of high word in 4Subject: [PATCH 23/54] Fix the calculation of high word in a long long 64-bit
5 a long long 64-bit
6 5
7 This patch will change the calculation of high word in a long long 64-bit. 6 This patch will change the calculation of high word in a long long 64-bit.
8 Earlier to this patch the high word of long long word (0xF0000000ULL) is 7 Earlier to this patch the high word of long long word (0xF0000000ULL) is
@@ -14,19 +13,15 @@ Subject: [PATCH 23/53] [patch,microblaze]: Fix the calculation of high word in
14 13
15 Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 14 Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
16 Ajit Agarwal <ajitkum@xilinx.com> 15 Ajit Agarwal <ajitkum@xilinx.com>
17Upstream-Status: Pending
18
19Signed-off-by: Mark Hatle <mark.hatle@amd.com>
20
21--- 16---
22 gcc/config/microblaze/microblaze.cc | 3 --- 17 gcc/config/microblaze/microblaze.cc | 3 ---
23 1 file changed, 3 deletions(-) 18 1 file changed, 3 deletions(-)
24 19
25diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 20diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
26index 907c0afa9b8..f75eaff4b49 100644 21index 4967d6a0133..2d516724acc 100644
27--- a/gcc/config/microblaze/microblaze.cc 22--- a/gcc/config/microblaze/microblaze.cc
28+++ b/gcc/config/microblaze/microblaze.cc 23+++ b/gcc/config/microblaze/microblaze.cc
29@@ -2469,9 +2469,6 @@ print_operand (FILE * file, rtx op, int letter) 24@@ -2474,9 +2474,6 @@ print_operand (FILE * file, rtx op, int letter)
30 { 25 {
31 val[0] = (INTVAL (op) & 0xffffffff00000000LL) >> 32; 26 val[0] = (INTVAL (op) & 0xffffffff00000000LL) >> 32;
32 val[1] = INTVAL (op) & 0x00000000ffffffffLL; 27 val[1] = INTVAL (op) & 0x00000000ffffffffLL;
@@ -37,5 +32,5 @@ index 907c0afa9b8..f75eaff4b49 100644
37 fprintf (file, "0x%8.8lx", (letter == 'h') ? val[0] : val[1]); 32 fprintf (file, "0x%8.8lx", (letter == 'h') ? val[0] : val[1]);
38 } 33 }
39-- 34--
402.37.1 (Apple Git-137.1) 352.34.1
41 36
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0024-Patch-MicroBlaze-this-patch-has-1.Fixed-the-bug-in.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0024-this-patch-has-1.Fixed-the-bug-in-version-calculatio.patch
index 444c9397..0356657b 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0024-Patch-MicroBlaze-this-patch-has-1.Fixed-the-bug-in.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0024-this-patch-has-1.Fixed-the-bug-in-version-calculatio.patch
@@ -1,14 +1,10 @@
1From 89269c9b8d2047ebbc13e98c45e94746edc63de6 Mon Sep 17 00:00:00 2001 1From a8991be91d79cf0bd17b7d303a10ec5edd7408c6 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 13 Sep 2022 12:23:54 +0530 3Date: Tue, 13 Sep 2022 12:23:54 +0530
4Subject: [PATCH 24/53] [Patch,MicroBlaze] : this patch has 1.Fixed the bug in 4Subject: [PATCH 24/54] this patch has 1.Fixed the bug in version calculation.
5 version calculation. 2.Add new bitfield instructions. 5 2.Add new bitfield instructions.
6 6
7Signed-off-by :Mahesh Bodapati <mbodapat@xilinx.com> 7Signed-off-by :Mahesh Bodapati <mbodapat@xilinx.com>
8Upstream-Status: Pending
9
10Signed-off-by: Mark Hatle <mark.hatle@amd.com>
11
12--- 8---
13 gcc/config/microblaze/microblaze.cc | 154 ++++++++++++++-------------- 9 gcc/config/microblaze/microblaze.cc | 154 ++++++++++++++--------------
14 gcc/config/microblaze/microblaze.h | 2 + 10 gcc/config/microblaze/microblaze.h | 2 +
@@ -16,7 +12,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com>
16 3 files changed, 147 insertions(+), 78 deletions(-) 12 3 files changed, 147 insertions(+), 78 deletions(-)
17 13
18diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 14diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
19index f75eaff4b49..3abfc834ff2 100644 15index 2d516724acc..e28ab593c3e 100644
20--- a/gcc/config/microblaze/microblaze.cc 16--- a/gcc/config/microblaze/microblaze.cc
21+++ b/gcc/config/microblaze/microblaze.cc 17+++ b/gcc/config/microblaze/microblaze.cc
22@@ -165,6 +165,9 @@ int microblaze_no_unsafe_delay; 18@@ -165,6 +165,9 @@ int microblaze_no_unsafe_delay;
@@ -93,7 +89,7 @@ index f75eaff4b49..3abfc834ff2 100644
93 /* Return truth value if a CONST_DOUBLE is ok to be a legitimate constant. */ 89 /* Return truth value if a CONST_DOUBLE is ok to be a legitimate constant. */
94 static bool 90 static bool
95 microblaze_const_double_ok (rtx op, machine_mode mode) 91 microblaze_const_double_ok (rtx op, machine_mode mode)
96@@ -1339,8 +1399,7 @@ microblaze_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED, 92@@ -1344,8 +1404,7 @@ microblaze_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED,
97 { 93 {
98 if (TARGET_BARREL_SHIFT) 94 if (TARGET_BARREL_SHIFT)
99 { 95 {
@@ -103,7 +99,7 @@ index f75eaff4b49..3abfc834ff2 100644
103 *total = COSTS_N_INSNS (1); 99 *total = COSTS_N_INSNS (1);
104 else 100 else
105 *total = COSTS_N_INSNS (2); 101 *total = COSTS_N_INSNS (2);
106@@ -1401,8 +1460,7 @@ microblaze_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED, 102@@ -1406,8 +1465,7 @@ microblaze_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED,
107 } 103 }
108 else if (!TARGET_SOFT_MUL) 104 else if (!TARGET_SOFT_MUL)
109 { 105 {
@@ -113,7 +109,7 @@ index f75eaff4b49..3abfc834ff2 100644
113 *total = COSTS_N_INSNS (1); 109 *total = COSTS_N_INSNS (1);
114 else 110 else
115 *total = COSTS_N_INSNS (3); 111 *total = COSTS_N_INSNS (3);
116@@ -1675,72 +1733,13 @@ function_arg_partial_bytes (cumulative_args_t cum_v, 112@@ -1680,72 +1738,13 @@ function_arg_partial_bytes (cumulative_args_t cum_v,
117 return 0; 113 return 0;
118 } 114 }
119 115
@@ -187,7 +183,7 @@ index f75eaff4b49..3abfc834ff2 100644
187 183
188 microblaze_section_threshold = (OPTION_SET_P (g_switch_value) 184 microblaze_section_threshold = (OPTION_SET_P (g_switch_value)
189 ? g_switch_value 185 ? g_switch_value
190@@ -1761,13 +1760,13 @@ microblaze_option_override (void) 186@@ -1766,13 +1765,13 @@ microblaze_option_override (void)
191 /* Check the MicroBlaze CPU version for any special action to be done. */ 187 /* Check the MicroBlaze CPU version for any special action to be done. */
192 if (microblaze_select_cpu == NULL) 188 if (microblaze_select_cpu == NULL)
193 microblaze_select_cpu = MICROBLAZE_DEFAULT_CPU; 189 microblaze_select_cpu = MICROBLAZE_DEFAULT_CPU;
@@ -204,7 +200,7 @@ index f75eaff4b49..3abfc834ff2 100644
204 if (ver < 0) 200 if (ver < 0)
205 { 201 {
206 /* No hardware exceptions in earlier versions. So no worries. */ 202 /* No hardware exceptions in earlier versions. So no worries. */
207@@ -1778,8 +1777,7 @@ microblaze_option_override (void) 203@@ -1783,8 +1782,7 @@ microblaze_option_override (void)
208 microblaze_pipe = MICROBLAZE_PIPE_3; 204 microblaze_pipe = MICROBLAZE_PIPE_3;
209 } 205 }
210 else if (ver == 0 206 else if (ver == 0
@@ -214,7 +210,7 @@ index f75eaff4b49..3abfc834ff2 100644
214 { 210 {
215 #if 0 211 #if 0
216 microblaze_select_flags |= (MICROBLAZE_MASK_NO_UNSAFE_DELAY); 212 microblaze_select_flags |= (MICROBLAZE_MASK_NO_UNSAFE_DELAY);
217@@ -1796,11 +1794,9 @@ microblaze_option_override (void) 213@@ -1801,11 +1799,9 @@ microblaze_option_override (void)
218 #endif 214 #endif
219 microblaze_no_unsafe_delay = 0; 215 microblaze_no_unsafe_delay = 0;
220 microblaze_pipe = MICROBLAZE_PIPE_5; 216 microblaze_pipe = MICROBLAZE_PIPE_5;
@@ -229,7 +225,7 @@ index f75eaff4b49..3abfc834ff2 100644
229 { 225 {
230 /* Pattern compares are to be turned on by default only when 226 /* Pattern compares are to be turned on by default only when
231 compiling for MB v5.00.'z'. */ 227 compiling for MB v5.00.'z'. */
232@@ -1808,7 +1804,7 @@ microblaze_option_override (void) 228@@ -1813,7 +1809,7 @@ microblaze_option_override (void)
233 } 229 }
234 } 230 }
235 231
@@ -238,7 +234,7 @@ index f75eaff4b49..3abfc834ff2 100644
238 if (ver < 0) 234 if (ver < 0)
239 { 235 {
240 if (TARGET_MULTIPLY_HIGH) 236 if (TARGET_MULTIPLY_HIGH)
241@@ -1817,7 +1813,7 @@ microblaze_option_override (void) 237@@ -1822,7 +1818,7 @@ microblaze_option_override (void)
242 "%<-mcpu=v6.00.a%> or greater"); 238 "%<-mcpu=v6.00.a%> or greater");
243 } 239 }
244 240
@@ -247,7 +243,7 @@ index f75eaff4b49..3abfc834ff2 100644
247 microblaze_has_clz = 1; 243 microblaze_has_clz = 1;
248 if (ver < 0) 244 if (ver < 0)
249 { 245 {
250@@ -1826,7 +1822,7 @@ microblaze_option_override (void) 246@@ -1831,7 +1827,7 @@ microblaze_option_override (void)
251 } 247 }
252 248
253 /* TARGET_REORDER defaults to 2 if -mxl-reorder not specified. */ 249 /* TARGET_REORDER defaults to 2 if -mxl-reorder not specified. */
@@ -256,7 +252,7 @@ index f75eaff4b49..3abfc834ff2 100644
256 if (ver < 0) 252 if (ver < 0)
257 { 253 {
258 if (TARGET_REORDER == 1) 254 if (TARGET_REORDER == 1)
259@@ -1841,7 +1837,7 @@ microblaze_option_override (void) 255@@ -1846,7 +1842,7 @@ microblaze_option_override (void)
260 "%<-mcpu=v8.30.a%>"); 256 "%<-mcpu=v8.30.a%>");
261 TARGET_REORDER = 0; 257 TARGET_REORDER = 0;
262 } 258 }
@@ -265,7 +261,7 @@ index f75eaff4b49..3abfc834ff2 100644
265 if (ver < 0) 261 if (ver < 0)
266 { 262 {
267 if (TARGET_AREA_OPTIMIZED_2) 263 if (TARGET_AREA_OPTIMIZED_2)
268@@ -1851,6 +1847,8 @@ microblaze_option_override (void) 264@@ -1856,6 +1852,8 @@ microblaze_option_override (void)
269 { 265 {
270 if (TARGET_AREA_OPTIMIZED_2) 266 if (TARGET_AREA_OPTIMIZED_2)
271 microblaze_pipe = MICROBLAZE_PIPE_8; 267 microblaze_pipe = MICROBLAZE_PIPE_8;
@@ -275,10 +271,10 @@ index f75eaff4b49..3abfc834ff2 100644
275 271
276 if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL) 272 if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL)
277diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 273diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
278index 640ae6ea9a3..67015058198 100644 274index e4faa9c681f..94d96bf6b5d 100644
279--- a/gcc/config/microblaze/microblaze.h 275--- a/gcc/config/microblaze/microblaze.h
280+++ b/gcc/config/microblaze/microblaze.h 276+++ b/gcc/config/microblaze/microblaze.h
281@@ -44,6 +44,7 @@ extern int microblaze_dbx_regno[]; 277@@ -44,6 +44,7 @@ extern int microblaze_debugger_regno[];
282 278
283 extern int microblaze_no_unsafe_delay; 279 extern int microblaze_no_unsafe_delay;
284 extern int microblaze_has_clz; 280 extern int microblaze_has_clz;
@@ -295,7 +291,7 @@ index 640ae6ea9a3..67015058198 100644
295 #define TARGET_SUPPORTS_PIC 1 291 #define TARGET_SUPPORTS_PIC 1
296 292
297diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 293diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
298index 9e9dfb1ccb0..dede4d068d3 100644 294index 7a01b28d8f0..a76287ab4fd 100644
299--- a/gcc/config/microblaze/microblaze.md 295--- a/gcc/config/microblaze/microblaze.md
300+++ b/gcc/config/microblaze/microblaze.md 296+++ b/gcc/config/microblaze/microblaze.md
301@@ -2491,4 +2491,73 @@ 297@@ -2491,4 +2491,73 @@
@@ -373,5 +369,5 @@ index 9e9dfb1ccb0..dede4d068d3 100644
373+ 369+
374 (include "sync.md") 370 (include "sync.md")
375-- 371--
3762.37.1 (Apple Git-137.1) 3722.34.1
377 373
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0025-Fixing-the-issue-with-the-builtin_alloc.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0025-Fixing-the-issue-with-the-builtin_alloc.-register-r1.patch
index 2800dee7..cd286818 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0025-Fixing-the-issue-with-the-builtin_alloc.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0025-Fixing-the-issue-with-the-builtin_alloc.-register-r1.patch
@@ -1,21 +1,17 @@
1From 101f47dedd82fc09bcefd5db986e6d6b0a1761ad Mon Sep 17 00:00:00 2001 1From 85273a514d0ab3b243b947633ab46705a0d946bc Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Thu, 23 Feb 2017 17:09:04 +0530 3Date: Thu, 23 Feb 2017 17:09:04 +0530
4Subject: [PATCH 25/53] Fixing the issue with the builtin_alloc. register r18 4Subject: [PATCH 25/54] Fixing the issue with the builtin_alloc. register r18
5 was not properly handling the stack pattern which was resolved by using free 5 was not properly handling the stack pattern which was resolved by using free
6 available register 6 available register
7 7
8signed-off-by:nagaraju mekala <nmekala@xilinx.com> 8signed-off-by:nagaraju mekala <nmekala@xilinx.com>
9Upstream-Status: Pending
10
11Signed-off-by: Mark Hatle <mark.hatle@amd.com>
12
13--- 9---
14 gcc/config/microblaze/microblaze.md | 8 ++++---- 10 gcc/config/microblaze/microblaze.md | 8 ++++----
15 1 file changed, 4 insertions(+), 4 deletions(-) 11 1 file changed, 4 insertions(+), 4 deletions(-)
16 12
17diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 13diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
18index dede4d068d3..c6d8a87e9d1 100644 14index a76287ab4fd..12270f135cf 100644
19--- a/gcc/config/microblaze/microblaze.md 15--- a/gcc/config/microblaze/microblaze.md
20+++ b/gcc/config/microblaze/microblaze.md 16+++ b/gcc/config/microblaze/microblaze.md
21@@ -2075,10 +2075,10 @@ 17@@ -2075,10 +2075,10 @@
@@ -44,5 +40,5 @@ index dede4d068d3..c6d8a87e9d1 100644
44 } 40 }
45 ) 41 )
46-- 42--
472.37.1 (Apple Git-137.1) 432.34.1
48 44
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0026-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0026-Removed-fsqrt-generation-for-double-values.patch
index a1e4fb36..02cc5a1e 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0026-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0026-Removed-fsqrt-generation-for-double-values.patch
@@ -1,19 +1,14 @@
1From b3e51ca34dc4048445b178253051ad4bbdfc5ec4 Mon Sep 17 00:00:00 2001 1From aba85eba7bc5cc19edafe54379fb1f1794dc3844 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Mon, 4 Jun 2018 10:10:18 +0530 3Date: Mon, 4 Jun 2018 10:10:18 +0530
4Subject: [PATCH 26/53] [Patch,Microblaze] : Removed fsqrt generation for 4Subject: [PATCH 26/54] Removed fsqrt generation for double values.
5 double values.
6
7Upstream-Status: Pending
8
9Signed-off-by: Mark Hatle <mark.hatle@amd.com>
10 5
11--- 6---
12 gcc/config/microblaze/microblaze.md | 14 -------------- 7 gcc/config/microblaze/microblaze.md | 14 --------------
13 1 file changed, 14 deletions(-) 8 1 file changed, 14 deletions(-)
14 9
15diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 10diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
16index c6d8a87e9d1..f23a85c7ac7 100644 11index 12270f135cf..b05f7da30b4 100644
17--- a/gcc/config/microblaze/microblaze.md 12--- a/gcc/config/microblaze/microblaze.md
18+++ b/gcc/config/microblaze/microblaze.md 13+++ b/gcc/config/microblaze/microblaze.md
19@@ -526,20 +526,6 @@ 14@@ -526,20 +526,6 @@
@@ -38,5 +33,5 @@ index c6d8a87e9d1..f23a85c7ac7 100644
38 [(set (match_operand:SI 0 "register_operand" "=d") 33 [(set (match_operand:SI 0 "register_operand" "=d")
39 (fix:SI (match_operand:SF 1 "register_operand" "d")))] 34 (fix:SI (match_operand:SF 1 "register_operand" "d")))]
40-- 35--
412.37.1 (Apple Git-137.1) 362.34.1
42 37
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0027-Intial-commit-of-64-bit-Microblaze.patch
index a9222e54..c998d5eb 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0027-Intial-commit-of-64-bit-Microblaze.patch
@@ -1,14 +1,10 @@
1From cf9ab9693d02212e1a49465e55d759a01acc507a Mon Sep 17 00:00:00 2001 1From dd3eee641d2bf28216bf02f324cf8b81d4a61e43 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 13 Sep 2022 13:56:52 +0530 3Date: Tue, 13 Sep 2022 13:56:52 +0530
4Subject: [PATCH 27/53] [Patch,MicroBlaze]: Intial commit of 64-bit Microblaze 4Subject: [PATCH 27/54] Intial commit of 64-bit Microblaze
5 5
6 Conflicts: 6 Conflicts:
7 gcc/config/microblaze/microblaze.md 7 gcc/config/microblaze/microblaze.md
8Upstream-Status: Pending
9
10Signed-off-by: Mark Hatle <mark.hatle@amd.com>
11
12--- 8---
13 gcc/config/microblaze/constraints.md | 6 + 9 gcc/config/microblaze/constraints.md | 6 +
14 gcc/config/microblaze/microblaze-protos.h | 1 + 10 gcc/config/microblaze/microblaze-protos.h | 1 +
@@ -20,7 +16,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com>
20 7 files changed, 456 insertions(+), 30 deletions(-) 16 7 files changed, 456 insertions(+), 30 deletions(-)
21 17
22diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md 18diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md
23index a8934d305ee..2133650147e 100644 19index aae4be73ae3..26742d34980 100644
24--- a/gcc/config/microblaze/constraints.md 20--- a/gcc/config/microblaze/constraints.md
25+++ b/gcc/config/microblaze/constraints.md 21+++ b/gcc/config/microblaze/constraints.md
26@@ -52,6 +52,12 @@ 22@@ -52,6 +52,12 @@
@@ -37,7 +33,7 @@ index a8934d305ee..2133650147e 100644
37 33
38 (define_constraint "G" 34 (define_constraint "G"
39diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h 35diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h
40index 848cd509003..7f575c2adec 100644 36index 41557af0f3c..0e9f783c4a4 100644
41--- a/gcc/config/microblaze/microblaze-protos.h 37--- a/gcc/config/microblaze/microblaze-protos.h
42+++ b/gcc/config/microblaze/microblaze-protos.h 38+++ b/gcc/config/microblaze/microblaze-protos.h
43@@ -36,6 +36,7 @@ extern void microblaze_expand_divide (rtx *); 39@@ -36,6 +36,7 @@ extern void microblaze_expand_divide (rtx *);
@@ -49,10 +45,10 @@ index 848cd509003..7f575c2adec 100644
49 extern void print_operand (FILE *, rtx, int); 45 extern void print_operand (FILE *, rtx, int);
50 extern void print_operand_address (FILE *, rtx); 46 extern void print_operand_address (FILE *, rtx);
51diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 47diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
52index 3abfc834ff2..1ac889041b8 100644 48index e28ab593c3e..7975bc182f2 100644
53--- a/gcc/config/microblaze/microblaze.cc 49--- a/gcc/config/microblaze/microblaze.cc
54+++ b/gcc/config/microblaze/microblaze.cc 50+++ b/gcc/config/microblaze/microblaze.cc
55@@ -3433,11 +3433,11 @@ microblaze_expand_move (machine_mode mode, rtx operands[]) 51@@ -3438,11 +3438,11 @@ microblaze_expand_move (machine_mode mode, rtx operands[])
56 op0 = operands[0]; 52 op0 = operands[0];
57 op1 = operands[1]; 53 op1 = operands[1];
58 54
@@ -67,7 +63,7 @@ index 3abfc834ff2..1ac889041b8 100644
67 emit_move_insn (op0, temp); 63 emit_move_insn (op0, temp);
68 return true; 64 return true;
69 } 65 }
70@@ -3502,12 +3502,12 @@ microblaze_expand_move (machine_mode mode, rtx operands[]) 66@@ -3511,12 +3511,12 @@ microblaze_expand_move (machine_mode mode, rtx operands[])
71 && (flag_pic == 2 || microblaze_tls_symbol_p (p0) 67 && (flag_pic == 2 || microblaze_tls_symbol_p (p0)
72 || !SMALL_INT (p1))))) 68 || !SMALL_INT (p1)))))
73 { 69 {
@@ -82,7 +78,7 @@ index 3abfc834ff2..1ac889041b8 100644
82 return true; 78 return true;
83 } 79 }
84 } 80 }
85@@ -3638,7 +3638,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) 81@@ -3647,7 +3647,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[])
86 rtx cmp_op0 = operands[1]; 82 rtx cmp_op0 = operands[1];
87 rtx cmp_op1 = operands[2]; 83 rtx cmp_op1 = operands[2];
88 rtx label1 = operands[3]; 84 rtx label1 = operands[3];
@@ -91,7 +87,7 @@ index 3abfc834ff2..1ac889041b8 100644
91 rtx condition; 87 rtx condition;
92 88
93 gcc_assert ((GET_CODE (cmp_op0) == REG) || (GET_CODE (cmp_op0) == SUBREG)); 89 gcc_assert ((GET_CODE (cmp_op0) == REG) || (GET_CODE (cmp_op0) == SUBREG));
94@@ -3647,23 +3647,36 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) 90@@ -3656,23 +3656,36 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[])
95 if (cmp_op1 == const0_rtx) 91 if (cmp_op1 == const0_rtx)
96 { 92 {
97 comp_reg = cmp_op0; 93 comp_reg = cmp_op0;
@@ -134,7 +130,7 @@ index 3abfc834ff2..1ac889041b8 100644
134 } 130 }
135 } 131 }
136 132
137@@ -3674,7 +3687,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) 133@@ -3683,7 +3696,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[])
138 rtx cmp_op0 = operands[1]; 134 rtx cmp_op0 = operands[1];
139 rtx cmp_op1 = operands[2]; 135 rtx cmp_op1 = operands[2];
140 rtx label1 = operands[3]; 136 rtx label1 = operands[3];
@@ -143,7 +139,7 @@ index 3abfc834ff2..1ac889041b8 100644
143 rtx condition; 139 rtx condition;
144 140
145 gcc_assert ((GET_CODE (cmp_op0) == REG) 141 gcc_assert ((GET_CODE (cmp_op0) == REG)
146@@ -3685,30 +3698,63 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) 142@@ -3694,30 +3707,63 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[])
147 { 143 {
148 comp_reg = cmp_op0; 144 comp_reg = cmp_op0;
149 condition = gen_rtx_fmt_ee (signed_condition (code), 145 condition = gen_rtx_fmt_ee (signed_condition (code),
@@ -219,7 +215,7 @@ index 3abfc834ff2..1ac889041b8 100644
219 } 215 }
220 } 216 }
221 217
222@@ -3725,6 +3771,19 @@ microblaze_expand_conditional_branch_sf (rtx operands[]) 218@@ -3734,6 +3780,19 @@ microblaze_expand_conditional_branch_sf (rtx operands[])
223 emit_jump_insn (gen_condjump (condition, operands[3])); 219 emit_jump_insn (gen_condjump (condition, operands[3]));
224 } 220 }
225 221
@@ -240,7 +236,7 @@ index 3abfc834ff2..1ac889041b8 100644
240 236
241 static bool 237 static bool
242diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 238diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
243index 67015058198..885abc6e5a1 100644 239index 94d96bf6b5d..f35f7075ce3 100644
244--- a/gcc/config/microblaze/microblaze.h 240--- a/gcc/config/microblaze/microblaze.h
245+++ b/gcc/config/microblaze/microblaze.h 241+++ b/gcc/config/microblaze/microblaze.h
246@@ -102,6 +102,7 @@ extern enum pipeline_type microblaze_pipe; 242@@ -102,6 +102,7 @@ extern enum pipeline_type microblaze_pipe;
@@ -269,7 +265,7 @@ index 67015058198..885abc6e5a1 100644
269 #define FLOAT_TYPE_SIZE 32 265 #define FLOAT_TYPE_SIZE 32
270 #define DOUBLE_TYPE_SIZE 64 266 #define DOUBLE_TYPE_SIZE 64
271diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 267diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
272index f23a85c7ac7..40711fe224b 100644 268index b05f7da30b4..3f572fe2351 100644
273--- a/gcc/config/microblaze/microblaze.md 269--- a/gcc/config/microblaze/microblaze.md
274+++ b/gcc/config/microblaze/microblaze.md 270+++ b/gcc/config/microblaze/microblaze.md
275@@ -497,7 +497,6 @@ 271@@ -497,7 +497,6 @@
@@ -751,7 +747,7 @@ index f23a85c7ac7..40711fe224b 100644
751 ;; Unconditional branches 747 ;; Unconditional branches
752 ;;---------------------------------------------------------------- 748 ;;----------------------------------------------------------------
753diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt 749diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt
754index cc009363f87..10910dbb83f 100644 750index 37aaaf9ffda..96615a6d2c4 100644
755--- a/gcc/config/microblaze/microblaze.opt 751--- a/gcc/config/microblaze/microblaze.opt
756+++ b/gcc/config/microblaze/microblaze.opt 752+++ b/gcc/config/microblaze/microblaze.opt
757@@ -136,4 +136,9 @@ Target 753@@ -136,4 +136,9 @@ Target
@@ -784,5 +780,5 @@ index 7e2fc5dcef8..4c25cfe15e7 100644
784 # Extra files 780 # Extra files
785 microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.cc \ 781 microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.cc \
786-- 782--
7872.37.1 (Apple Git-137.1) 7832.34.1
788 784
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0028-Intial-commit-for-64bit-MB-sources.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0028-Intial-commit-for-64bit-MB-sources.-Need-to-cleanup-.patch
index c36e246a..58bb6fd8 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0028-Intial-commit-for-64bit-MB-sources.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0028-Intial-commit-for-64bit-MB-sources.-Need-to-cleanup-.patch
@@ -1,12 +1,8 @@
1From da40b160857d0b6a56b6f6c9c81d61dabb5255db Mon Sep 17 00:00:00 2001 1From fcec4be11de1c646bdcd6dcfc3844b7deb42898e Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 13 Sep 2022 14:38:48 +0530 3Date: Tue, 13 Sep 2022 14:38:48 +0530
4Subject: [PATCH 28/53] Intial commit for 64bit-MB sources. Need to cleanup 4Subject: [PATCH 28/54] Intial commit for 64bit-MB sources. Need to cleanup the
5 the code later. 5 code later.
6
7Upstream-Status: Pending
8
9Signed-off-by: Mark Hatle <mark.hatle@amd.com>
10 6
11--- 7---
12 gcc/config/microblaze/constraints.md | 2 +- 8 gcc/config/microblaze/constraints.md | 2 +-
@@ -33,7 +29,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com>
33 create mode 100644 libgcc/config/microblaze/umoddi3.S 29 create mode 100644 libgcc/config/microblaze/umoddi3.S
34 30
35diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md 31diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md
36index 2133650147e..0ced155340d 100644 32index 26742d34980..7bb1e0b4c8d 100644
37--- a/gcc/config/microblaze/constraints.md 33--- a/gcc/config/microblaze/constraints.md
38+++ b/gcc/config/microblaze/constraints.md 34+++ b/gcc/config/microblaze/constraints.md
39@@ -55,7 +55,7 @@ 35@@ -55,7 +55,7 @@
@@ -46,7 +42,7 @@ index 2133650147e..0ced155340d 100644
46 42
47 ;; Define floating point constraints 43 ;; Define floating point constraints
48diff --git a/gcc/config/microblaze/microblaze-c.cc b/gcc/config/microblaze/microblaze-c.cc 44diff --git a/gcc/config/microblaze/microblaze-c.cc b/gcc/config/microblaze/microblaze-c.cc
49index caabe99b993..ef8d2430565 100644 45index 065351ad218..af73de0709c 100644
50--- a/gcc/config/microblaze/microblaze-c.cc 46--- a/gcc/config/microblaze/microblaze-c.cc
51+++ b/gcc/config/microblaze/microblaze-c.cc 47+++ b/gcc/config/microblaze/microblaze-c.cc
52@@ -100,4 +100,10 @@ microblaze_cpp_define (cpp_reader *pfile) 48@@ -100,4 +100,10 @@ microblaze_cpp_define (cpp_reader *pfile)
@@ -61,7 +57,7 @@ index caabe99b993..ef8d2430565 100644
61+ } 57+ }
62 } 58 }
63diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 59diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
64index 1ac889041b8..9d3628c6816 100644 60index 7975bc182f2..46bbf8a21e7 100644
65--- a/gcc/config/microblaze/microblaze.cc 61--- a/gcc/config/microblaze/microblaze.cc
66+++ b/gcc/config/microblaze/microblaze.cc 62+++ b/gcc/config/microblaze/microblaze.cc
67@@ -384,10 +384,10 @@ simple_memory_operand (rtx op, machine_mode mode ATTRIBUTE_UNUSED) 63@@ -384,10 +384,10 @@ simple_memory_operand (rtx op, machine_mode mode ATTRIBUTE_UNUSED)
@@ -104,7 +100,7 @@ index 1ac889041b8..9d3628c6816 100644
104 info->type = ADDRESS_GOTOFF; 100 info->type = ADDRESS_GOTOFF;
105 } 101 }
106 else if (XINT (x, 1) == UNSPEC_PLT) 102 else if (XINT (x, 1) == UNSPEC_PLT)
107@@ -1303,8 +1303,16 @@ microblaze_block_move_loop (rtx dest, rtx src, HOST_WIDE_INT length) 103@@ -1308,8 +1308,16 @@ microblaze_block_move_loop (rtx dest, rtx src, HOST_WIDE_INT length)
108 emit_move_insn (dest_reg, plus_constant (Pmode, dest_reg, MAX_MOVE_BYTES)); 104 emit_move_insn (dest_reg, plus_constant (Pmode, dest_reg, MAX_MOVE_BYTES));
109 105
110 /* Emit the test & branch. */ 106 /* Emit the test & branch. */
@@ -122,7 +118,7 @@ index 1ac889041b8..9d3628c6816 100644
122 118
123 /* Mop up any left-over bytes. */ 119 /* Mop up any left-over bytes. */
124 if (leftover) 120 if (leftover)
125@@ -1634,14 +1642,20 @@ microblaze_function_arg_advance (cumulative_args_t cum_v, 121@@ -1639,14 +1647,20 @@ microblaze_function_arg_advance (cumulative_args_t cum_v,
126 break; 122 break;
127 123
128 case E_DFmode: 124 case E_DFmode:
@@ -145,7 +141,7 @@ index 1ac889041b8..9d3628c6816 100644
145 break; 141 break;
146 142
147 case E_QImode: 143 case E_QImode:
148@@ -2156,7 +2170,7 @@ compute_frame_size (HOST_WIDE_INT size) 144@@ -2161,7 +2175,7 @@ compute_frame_size (HOST_WIDE_INT size)
149 145
150 if (regno != MB_ABI_SUB_RETURN_ADDR_REGNUM) 146 if (regno != MB_ABI_SUB_RETURN_ADDR_REGNUM)
151 /* Don't account for link register. It is accounted specially below. */ 147 /* Don't account for link register. It is accounted specially below. */
@@ -154,7 +150,7 @@ index 1ac889041b8..9d3628c6816 100644
154 150
155 mask |= (1L << (regno - GP_REG_FIRST)); 151 mask |= (1L << (regno - GP_REG_FIRST));
156 } 152 }
157@@ -2425,7 +2439,7 @@ print_operand (FILE * file, rtx op, int letter) 153@@ -2430,7 +2444,7 @@ print_operand (FILE * file, rtx op, int letter)
158 154
159 if ((letter == 'M' && !WORDS_BIG_ENDIAN) 155 if ((letter == 'M' && !WORDS_BIG_ENDIAN)
160 || (letter == 'L' && WORDS_BIG_ENDIAN) || letter == 'D') 156 || (letter == 'L' && WORDS_BIG_ENDIAN) || letter == 'D')
@@ -163,7 +159,7 @@ index 1ac889041b8..9d3628c6816 100644
163 159
164 fprintf (file, "%s", reg_names[regnum]); 160 fprintf (file, "%s", reg_names[regnum]);
165 } 161 }
166@@ -2451,6 +2465,7 @@ print_operand (FILE * file, rtx op, int letter) 162@@ -2456,6 +2470,7 @@ print_operand (FILE * file, rtx op, int letter)
167 else if (letter == 'h' || letter == 'j') 163 else if (letter == 'h' || letter == 'j')
168 { 164 {
169 long val[2]; 165 long val[2];
@@ -171,7 +167,7 @@ index 1ac889041b8..9d3628c6816 100644
171 long l[2]; 167 long l[2];
172 if (code == CONST_DOUBLE) 168 if (code == CONST_DOUBLE)
173 { 169 {
174@@ -2463,12 +2478,12 @@ print_operand (FILE * file, rtx op, int letter) 170@@ -2468,12 +2483,12 @@ print_operand (FILE * file, rtx op, int letter)
175 val[0] = l[WORDS_BIG_ENDIAN != 0]; 171 val[0] = l[WORDS_BIG_ENDIAN != 0];
176 } 172 }
177 } 173 }
@@ -188,7 +184,7 @@ index 1ac889041b8..9d3628c6816 100644
188 } 184 }
189 else if (code == CONST_DOUBLE) 185 else if (code == CONST_DOUBLE)
190 { 186 {
191@@ -2662,7 +2677,10 @@ microblaze_asm_constructor (rtx symbol ATTRIBUTE_UNUSED, int priority) 187@@ -2667,7 +2682,10 @@ microblaze_asm_constructor (rtx symbol ATTRIBUTE_UNUSED, int priority)
192 188
193 switch_to_section (get_section (section, 0, NULL)); 189 switch_to_section (get_section (section, 0, NULL));
194 assemble_align (POINTER_SIZE); 190 assemble_align (POINTER_SIZE);
@@ -200,7 +196,7 @@ index 1ac889041b8..9d3628c6816 100644
200 output_addr_const (asm_out_file, symbol); 196 output_addr_const (asm_out_file, symbol);
201 fputs ("\n", asm_out_file); 197 fputs ("\n", asm_out_file);
202 } 198 }
203@@ -2685,7 +2703,10 @@ microblaze_asm_destructor (rtx symbol, int priority) 199@@ -2690,7 +2708,10 @@ microblaze_asm_destructor (rtx symbol, int priority)
204 200
205 switch_to_section (get_section (section, 0, NULL)); 201 switch_to_section (get_section (section, 0, NULL));
206 assemble_align (POINTER_SIZE); 202 assemble_align (POINTER_SIZE);
@@ -212,7 +208,7 @@ index 1ac889041b8..9d3628c6816 100644
212 output_addr_const (asm_out_file, symbol); 208 output_addr_const (asm_out_file, symbol);
213 fputs ("\n", asm_out_file); 209 fputs ("\n", asm_out_file);
214 } 210 }
215@@ -2751,7 +2772,7 @@ save_restore_insns (int prologue) 211@@ -2756,7 +2777,7 @@ save_restore_insns (int prologue)
216 /* For interrupt_handlers, need to save/restore the MSR. */ 212 /* For interrupt_handlers, need to save/restore the MSR. */
217 if (microblaze_is_interrupt_variant ()) 213 if (microblaze_is_interrupt_variant ())
218 { 214 {
@@ -221,7 +217,7 @@ index 1ac889041b8..9d3628c6816 100644
221 gen_rtx_PLUS (Pmode, base_reg_rtx, 217 gen_rtx_PLUS (Pmode, base_reg_rtx,
222 GEN_INT (current_frame_info. 218 GEN_INT (current_frame_info.
223 gp_offset - 219 gp_offset -
224@@ -2759,8 +2780,8 @@ save_restore_insns (int prologue) 220@@ -2764,8 +2785,8 @@ save_restore_insns (int prologue)
225 221
226 /* Do not optimize in flow analysis. */ 222 /* Do not optimize in flow analysis. */
227 MEM_VOLATILE_P (isr_mem_rtx) = 1; 223 MEM_VOLATILE_P (isr_mem_rtx) = 1;
@@ -232,7 +228,7 @@ index 1ac889041b8..9d3628c6816 100644
232 } 228 }
233 229
234 if (microblaze_is_interrupt_variant () && !prologue) 230 if (microblaze_is_interrupt_variant () && !prologue)
235@@ -2768,8 +2789,8 @@ save_restore_insns (int prologue) 231@@ -2773,8 +2794,8 @@ save_restore_insns (int prologue)
236 emit_move_insn (isr_reg_rtx, isr_mem_rtx); 232 emit_move_insn (isr_reg_rtx, isr_mem_rtx);
237 emit_move_insn (isr_msr_rtx, isr_reg_rtx); 233 emit_move_insn (isr_msr_rtx, isr_reg_rtx);
238 /* Do not optimize in flow analysis. */ 234 /* Do not optimize in flow analysis. */
@@ -243,7 +239,7 @@ index 1ac889041b8..9d3628c6816 100644
243 } 239 }
244 240
245 for (regno = GP_REG_FIRST; regno <= GP_REG_LAST; regno++) 241 for (regno = GP_REG_FIRST; regno <= GP_REG_LAST; regno++)
246@@ -2780,9 +2801,9 @@ save_restore_insns (int prologue) 242@@ -2785,9 +2806,9 @@ save_restore_insns (int prologue)
247 /* Don't handle here. Already handled as the first register. */ 243 /* Don't handle here. Already handled as the first register. */
248 continue; 244 continue;
249 245
@@ -255,7 +251,7 @@ index 1ac889041b8..9d3628c6816 100644
255 if (microblaze_is_interrupt_variant () || save_volatiles) 251 if (microblaze_is_interrupt_variant () || save_volatiles)
256 /* Do not optimize in flow analysis. */ 252 /* Do not optimize in flow analysis. */
257 MEM_VOLATILE_P (mem_rtx) = 1; 253 MEM_VOLATILE_P (mem_rtx) = 1;
258@@ -2797,7 +2818,7 @@ save_restore_insns (int prologue) 254@@ -2802,7 +2823,7 @@ save_restore_insns (int prologue)
259 insn = emit_move_insn (reg_rtx, mem_rtx); 255 insn = emit_move_insn (reg_rtx, mem_rtx);
260 } 256 }
261 257
@@ -264,7 +260,7 @@ index 1ac889041b8..9d3628c6816 100644
264 } 260 }
265 } 261 }
266 262
267@@ -2807,8 +2828,8 @@ save_restore_insns (int prologue) 263@@ -2812,8 +2833,8 @@ save_restore_insns (int prologue)
268 emit_move_insn (isr_mem_rtx, isr_reg_rtx); 264 emit_move_insn (isr_mem_rtx, isr_reg_rtx);
269 265
270 /* Do not optimize in flow analysis. */ 266 /* Do not optimize in flow analysis. */
@@ -275,7 +271,7 @@ index 1ac889041b8..9d3628c6816 100644
275 } 271 }
276 272
277 /* Done saving and restoring */ 273 /* Done saving and restoring */
278@@ -2898,7 +2919,10 @@ microblaze_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor) 274@@ -2903,7 +2924,10 @@ microblaze_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor)
279 275
280 switch_to_section (s); 276 switch_to_section (s);
281 assemble_align (POINTER_SIZE); 277 assemble_align (POINTER_SIZE);
@@ -287,7 +283,7 @@ index 1ac889041b8..9d3628c6816 100644
287 output_addr_const (asm_out_file, symbol); 283 output_addr_const (asm_out_file, symbol);
288 fputs ("\n", asm_out_file); 284 fputs ("\n", asm_out_file);
289 } 285 }
290@@ -3042,10 +3066,10 @@ microblaze_expand_prologue (void) 286@@ -3047,10 +3071,10 @@ microblaze_expand_prologue (void)
291 { 287 {
292 if (offset != 0) 288 if (offset != 0)
293 ptr = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (offset)); 289 ptr = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (offset));
@@ -301,7 +297,7 @@ index 1ac889041b8..9d3628c6816 100644
301 } 297 }
302 } 298 }
303 299
304@@ -3054,15 +3078,23 @@ microblaze_expand_prologue (void) 300@@ -3059,15 +3083,23 @@ microblaze_expand_prologue (void)
305 rtx fsiz_rtx = GEN_INT (fsiz); 301 rtx fsiz_rtx = GEN_INT (fsiz);
306 302
307 rtx_insn *insn = NULL; 303 rtx_insn *insn = NULL;
@@ -327,7 +323,7 @@ index 1ac889041b8..9d3628c6816 100644
327 gen_rtx_PLUS (Pmode, stack_pointer_rtx, 323 gen_rtx_PLUS (Pmode, stack_pointer_rtx,
328 const0_rtx)); 324 const0_rtx));
329 325
330@@ -3070,7 +3102,7 @@ microblaze_expand_prologue (void) 326@@ -3075,7 +3107,7 @@ microblaze_expand_prologue (void)
331 /* Do not optimize in flow analysis. */ 327 /* Do not optimize in flow analysis. */
332 MEM_VOLATILE_P (mem_rtx) = 1; 328 MEM_VOLATILE_P (mem_rtx) = 1;
333 329
@@ -336,7 +332,7 @@ index 1ac889041b8..9d3628c6816 100644
336 insn = emit_move_insn (mem_rtx, reg_rtx); 332 insn = emit_move_insn (mem_rtx, reg_rtx);
337 RTX_FRAME_RELATED_P (insn) = 1; 333 RTX_FRAME_RELATED_P (insn) = 1;
338 } 334 }
339@@ -3180,12 +3212,12 @@ microblaze_expand_epilogue (void) 335@@ -3185,12 +3217,12 @@ microblaze_expand_epilogue (void)
340 if (!crtl->is_leaf || interrupt_handler) 336 if (!crtl->is_leaf || interrupt_handler)
341 { 337 {
342 mem_rtx = 338 mem_rtx =
@@ -351,7 +347,7 @@ index 1ac889041b8..9d3628c6816 100644
351 emit_move_insn (reg_rtx, mem_rtx); 347 emit_move_insn (reg_rtx, mem_rtx);
352 } 348 }
353 349
354@@ -3201,15 +3233,25 @@ microblaze_expand_epilogue (void) 350@@ -3206,15 +3238,25 @@ microblaze_expand_epilogue (void)
355 /* _restore_ registers for epilogue. */ 351 /* _restore_ registers for epilogue. */
356 save_restore_insns (0); 352 save_restore_insns (0);
357 emit_insn (gen_blockage ()); 353 emit_insn (gen_blockage ());
@@ -381,7 +377,7 @@ index 1ac889041b8..9d3628c6816 100644
381 emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST + 377 emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST +
382 MB_ABI_SUB_RETURN_ADDR_REGNUM))); 378 MB_ABI_SUB_RETURN_ADDR_REGNUM)));
383 } 379 }
384@@ -3376,9 +3418,14 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, 380@@ -3381,9 +3423,14 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
385 else 381 else
386 this_rtx = gen_rtx_REG (Pmode, MB_ABI_FIRST_ARG_REGNUM); 382 this_rtx = gen_rtx_REG (Pmode, MB_ABI_FIRST_ARG_REGNUM);
387 383
@@ -398,7 +394,7 @@ index 1ac889041b8..9d3628c6816 100644
398 394
399 /* Apply the offset from the vtable, if required. */ 395 /* Apply the offset from the vtable, if required. */
400 if (vcall_offset) 396 if (vcall_offset)
401@@ -3391,7 +3438,10 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, 397@@ -3396,7 +3443,10 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
402 rtx loc = gen_rtx_PLUS (Pmode, temp1, vcall_offset_rtx); 398 rtx loc = gen_rtx_PLUS (Pmode, temp1, vcall_offset_rtx);
403 emit_move_insn (temp1, gen_rtx_MEM (Pmode, loc)); 399 emit_move_insn (temp1, gen_rtx_MEM (Pmode, loc));
404 400
@@ -410,7 +406,7 @@ index 1ac889041b8..9d3628c6816 100644
410 } 406 }
411 407
412 /* Generate a tail call to the target function. */ 408 /* Generate a tail call to the target function. */
413@@ -3622,9 +3672,9 @@ microblaze_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) 409@@ -3631,9 +3681,9 @@ microblaze_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
414 emit_block_move (m_tramp, assemble_trampoline_template (), 410 emit_block_move (m_tramp, assemble_trampoline_template (),
415 GEN_INT (6*UNITS_PER_WORD), BLOCK_OP_NORMAL); 411 GEN_INT (6*UNITS_PER_WORD), BLOCK_OP_NORMAL);
416 412
@@ -422,7 +418,7 @@ index 1ac889041b8..9d3628c6816 100644
422 emit_move_insn (mem, fnaddr); 418 emit_move_insn (mem, fnaddr);
423 } 419 }
424 420
425@@ -3648,7 +3698,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) 421@@ -3657,7 +3707,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[])
426 { 422 {
427 comp_reg = cmp_op0; 423 comp_reg = cmp_op0;
428 condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx); 424 condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx);
@@ -431,7 +427,7 @@ index 1ac889041b8..9d3628c6816 100644
431 emit_jump_insn (gen_condjump (condition, label1)); 427 emit_jump_insn (gen_condjump (condition, label1));
432 else 428 else
433 emit_jump_insn (gen_long_condjump (condition, label1)); 429 emit_jump_insn (gen_long_condjump (condition, label1));
434@@ -3767,7 +3817,7 @@ microblaze_expand_conditional_branch_sf (rtx operands[]) 430@@ -3776,7 +3826,7 @@ microblaze_expand_conditional_branch_sf (rtx operands[])
435 rtx comp_reg = gen_reg_rtx (SImode); 431 rtx comp_reg = gen_reg_rtx (SImode);
436 432
437 emit_insn (gen_cstoresf4 (comp_reg, operands[0], cmp_op0, cmp_op1)); 433 emit_insn (gen_cstoresf4 (comp_reg, operands[0], cmp_op0, cmp_op1));
@@ -440,7 +436,7 @@ index 1ac889041b8..9d3628c6816 100644
440 emit_jump_insn (gen_condjump (condition, operands[3])); 436 emit_jump_insn (gen_condjump (condition, operands[3]));
441 } 437 }
442 438
443@@ -3777,10 +3827,10 @@ microblaze_expand_conditional_branch_df (rtx operands[]) 439@@ -3786,10 +3836,10 @@ microblaze_expand_conditional_branch_df (rtx operands[])
444 rtx condition; 440 rtx condition;
445 rtx cmp_op0 = XEXP (operands[0], 0); 441 rtx cmp_op0 = XEXP (operands[0], 0);
446 rtx cmp_op1 = XEXP (operands[0], 1); 442 rtx cmp_op1 = XEXP (operands[0], 1);
@@ -453,7 +449,7 @@ index 1ac889041b8..9d3628c6816 100644
453 emit_jump_insn (gen_long_condjump (condition, operands[3])); 449 emit_jump_insn (gen_long_condjump (condition, operands[3]));
454 } 450 }
455 451
456@@ -3801,8 +3851,8 @@ microblaze_expand_divide (rtx operands[]) 452@@ -3810,8 +3860,8 @@ microblaze_expand_divide (rtx operands[])
457 { 453 {
458 /* Table lookup software divides. Works for all (nr/dr) where (0 <= nr,dr <= 15). */ 454 /* Table lookup software divides. Works for all (nr/dr) where (0 <= nr,dr <= 15). */
459 455
@@ -464,7 +460,7 @@ index 1ac889041b8..9d3628c6816 100644
464 rtx regqi = gen_reg_rtx (QImode); 460 rtx regqi = gen_reg_rtx (QImode);
465 rtx_code_label *div_label = gen_label_rtx (); 461 rtx_code_label *div_label = gen_label_rtx ();
466 rtx_code_label *div_end_label = gen_label_rtx (); 462 rtx_code_label *div_end_label = gen_label_rtx ();
467@@ -3810,17 +3860,31 @@ microblaze_expand_divide (rtx operands[]) 463@@ -3819,17 +3869,31 @@ microblaze_expand_divide (rtx operands[])
468 rtx mem_rtx; 464 rtx mem_rtx;
469 rtx ret; 465 rtx ret;
470 rtx_insn *jump, *cjump, *insn; 466 rtx_insn *jump, *cjump, *insn;
@@ -503,7 +499,7 @@ index 1ac889041b8..9d3628c6816 100644
503 mem_rtx = gen_rtx_MEM (QImode, 499 mem_rtx = gen_rtx_MEM (QImode,
504 gen_rtx_PLUS (QImode, regt1, div_table_rtx)); 500 gen_rtx_PLUS (QImode, regt1, div_table_rtx));
505 501
506@@ -3967,7 +4031,7 @@ insert_wic_for_ilb_runout (rtx_insn *first) 502@@ -3976,7 +4040,7 @@ insert_wic_for_ilb_runout (rtx_insn *first)
507 { 503 {
508 insn = 504 insn =
509 emit_insn_before (gen_iprefetch 505 emit_insn_before (gen_iprefetch
@@ -512,7 +508,7 @@ index 1ac889041b8..9d3628c6816 100644
512 before_4); 508 before_4);
513 recog_memoized (insn); 509 recog_memoized (insn);
514 INSN_LOCATION (insn) = INSN_LOCATION (before_4); 510 INSN_LOCATION (insn) = INSN_LOCATION (before_4);
515@@ -3977,7 +4041,27 @@ insert_wic_for_ilb_runout (rtx_insn *first) 511@@ -3986,7 +4050,27 @@ insert_wic_for_ilb_runout (rtx_insn *first)
516 } 512 }
517 } 513 }
518 } 514 }
@@ -541,7 +537,7 @@ index 1ac889041b8..9d3628c6816 100644
541 /* Insert instruction prefetch instruction at the fall 537 /* Insert instruction prefetch instruction at the fall
542 through path of the function call. */ 538 through path of the function call. */
543 539
544@@ -4130,6 +4214,17 @@ microblaze_starting_frame_offset (void) 540@@ -4139,6 +4223,17 @@ microblaze_starting_frame_offset (void)
545 #undef TARGET_LRA_P 541 #undef TARGET_LRA_P
546 #define TARGET_LRA_P hook_bool_void_false 542 #define TARGET_LRA_P hook_bool_void_false
547 543
@@ -559,7 +555,7 @@ index 1ac889041b8..9d3628c6816 100644
559 #undef TARGET_FRAME_POINTER_REQUIRED 555 #undef TARGET_FRAME_POINTER_REQUIRED
560 #define TARGET_FRAME_POINTER_REQUIRED microblaze_frame_pointer_required 556 #define TARGET_FRAME_POINTER_REQUIRED microblaze_frame_pointer_required
561 557
562@@ -4139,6 +4234,9 @@ microblaze_starting_frame_offset (void) 558@@ -4148,6 +4243,9 @@ microblaze_starting_frame_offset (void)
563 #undef TARGET_TRAMPOLINE_INIT 559 #undef TARGET_TRAMPOLINE_INIT
564 #define TARGET_TRAMPOLINE_INIT microblaze_trampoline_init 560 #define TARGET_TRAMPOLINE_INIT microblaze_trampoline_init
565 561
@@ -570,7 +566,7 @@ index 1ac889041b8..9d3628c6816 100644
570 #define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote 566 #define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote
571 567
572diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 568diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
573index 885abc6e5a1..5f30b8ac195 100644 569index f35f7075ce3..3aee003de0d 100644
574--- a/gcc/config/microblaze/microblaze.h 570--- a/gcc/config/microblaze/microblaze.h
575+++ b/gcc/config/microblaze/microblaze.h 571+++ b/gcc/config/microblaze/microblaze.h
576@@ -173,7 +173,6 @@ extern enum pipeline_type microblaze_pipe; 572@@ -173,7 +173,6 @@ extern enum pipeline_type microblaze_pipe;
@@ -739,7 +735,7 @@ index 885abc6e5a1..5f30b8ac195 100644
739 /* Default to -G 8 */ 735 /* Default to -G 8 */
740 #ifndef MICROBLAZE_DEFAULT_GVALUE 736 #ifndef MICROBLAZE_DEFAULT_GVALUE
741diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 737diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
742index 40711fe224b..c99150ff0da 100644 738index 3f572fe2351..97da9aad6fd 100644
743--- a/gcc/config/microblaze/microblaze.md 739--- a/gcc/config/microblaze/microblaze.md
744+++ b/gcc/config/microblaze/microblaze.md 740+++ b/gcc/config/microblaze/microblaze.md
745@@ -26,6 +26,7 @@ 741@@ -26,6 +26,7 @@
@@ -1799,7 +1795,7 @@ index 4c25cfe15e7..965132b3513 100644
1799 MULTILIB_EXCEPTIONS += mxl-multiply-high/m64 1795 MULTILIB_EXCEPTIONS += mxl-multiply-high/m64
1800 MULTILIB_EXCEPTIONS += *mxl-multiply-high/mlittle-endian/m64 1796 MULTILIB_EXCEPTIONS += *mxl-multiply-high/mlittle-endian/m64
1801diff --git a/libgcc/config/microblaze/crti.S b/libgcc/config/microblaze/crti.S 1797diff --git a/libgcc/config/microblaze/crti.S b/libgcc/config/microblaze/crti.S
1802index cbbe32d5f6a..ec797e1bf17 100644 1798index 0f24adb750d..1a89a0a2ffa 100644
1803--- a/libgcc/config/microblaze/crti.S 1799--- a/libgcc/config/microblaze/crti.S
1804+++ b/libgcc/config/microblaze/crti.S 1800+++ b/libgcc/config/microblaze/crti.S
1805@@ -40,7 +40,7 @@ 1801@@ -40,7 +40,7 @@
@@ -1819,7 +1815,7 @@ index cbbe32d5f6a..ec797e1bf17 100644
1819+ addik r1, r1, -16 1815+ addik r1, r1, -16
1820 sw r15, r0, r1 1816 sw r15, r0, r1
1821diff --git a/libgcc/config/microblaze/crtn.S b/libgcc/config/microblaze/crtn.S 1817diff --git a/libgcc/config/microblaze/crtn.S b/libgcc/config/microblaze/crtn.S
1822index cb8d8ef2bfa..977b43b9436 100644 1818index d38d7ab9f98..29a004973ae 100644
1823--- a/libgcc/config/microblaze/crtn.S 1819--- a/libgcc/config/microblaze/crtn.S
1824+++ b/libgcc/config/microblaze/crtn.S 1820+++ b/libgcc/config/microblaze/crtn.S
1825@@ -33,9 +33,9 @@ 1821@@ -33,9 +33,9 @@
@@ -2442,5 +2438,5 @@ index 00000000000..7f5cd23f9a1
2442+ .size __umoddi3, . - __umoddi3 2438+ .size __umoddi3, . - __umoddi3
2443+#endif 2439+#endif
2444-- 2440--
24452.37.1 (Apple Git-137.1) 24412.34.1
2446 2442
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0029-Patch-MicroBlaze-re-arrangement-of-the-compare-branc.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0029-re-arrangement-of-the-compare-branches.patch
index 0a275c0b..448e850f 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0029-Patch-MicroBlaze-re-arrangement-of-the-compare-branc.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0029-re-arrangement-of-the-compare-branches.patch
@@ -1,12 +1,7 @@
1From 10d5e7d6cad5e7349b88b7469eb5ae20d87eb908 Mon Sep 17 00:00:00 2001 1From 870bfd716fcddeb72660f3176fb2a68aaa5ecc0e Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 13 Sep 2022 14:45:15 +0530 3Date: Tue, 13 Sep 2022 14:45:15 +0530
4Subject: [PATCH 29/53] [Patch,MicroBlaze] : re-arrangement of the compare 4Subject: [PATCH 29/54] re-arrangement of the compare branches
5 branches
6
7Upstream-Status: Pending
8
9Signed-off-by: Mark Hatle <mark.hatle@amd.com>
10 5
11--- 6---
12 gcc/config/microblaze/microblaze.cc | 28 ++---- 7 gcc/config/microblaze/microblaze.cc | 28 ++----
@@ -14,10 +9,10 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com>
14 2 files changed, 73 insertions(+), 96 deletions(-) 9 2 files changed, 73 insertions(+), 96 deletions(-)
15 10
16diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 11diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
17index 9d3628c6816..4792e3ba370 100644 12index 46bbf8a21e7..de3c95a005e 100644
18--- a/gcc/config/microblaze/microblaze.cc 13--- a/gcc/config/microblaze/microblaze.cc
19+++ b/gcc/config/microblaze/microblaze.cc 14+++ b/gcc/config/microblaze/microblaze.cc
20@@ -3698,11 +3698,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) 15@@ -3707,11 +3707,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[])
21 { 16 {
22 comp_reg = cmp_op0; 17 comp_reg = cmp_op0;
23 condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx); 18 condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx);
@@ -30,7 +25,7 @@ index 9d3628c6816..4792e3ba370 100644
30 } 25 }
31 26
32 else if (code == EQ || code == NE) 27 else if (code == EQ || code == NE)
33@@ -3713,10 +3709,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) 28@@ -3722,10 +3718,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[])
34 else 29 else
35 emit_insn (gen_xordi3 (comp_reg, cmp_op0, cmp_op1)); 30 emit_insn (gen_xordi3 (comp_reg, cmp_op0, cmp_op1));
36 condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx); 31 condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx);
@@ -42,7 +37,7 @@ index 9d3628c6816..4792e3ba370 100644
42 } 37 }
43 else 38 else
44 { 39 {
45@@ -3749,10 +3742,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) 40@@ -3758,10 +3751,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[])
46 comp_reg = cmp_op0; 41 comp_reg = cmp_op0;
47 condition = gen_rtx_fmt_ee (signed_condition (code), 42 condition = gen_rtx_fmt_ee (signed_condition (code),
48 mode, comp_reg, const0_rtx); 43 mode, comp_reg, const0_rtx);
@@ -54,7 +49,7 @@ index 9d3628c6816..4792e3ba370 100644
54 } 49 }
55 else if (code == EQ) 50 else if (code == EQ)
56 { 51 {
57@@ -3767,10 +3757,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) 52@@ -3776,10 +3766,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[])
58 cmp_op1)); 53 cmp_op1));
59 } 54 }
60 condition = gen_rtx_EQ (mode, comp_reg, const0_rtx); 55 condition = gen_rtx_EQ (mode, comp_reg, const0_rtx);
@@ -66,7 +61,7 @@ index 9d3628c6816..4792e3ba370 100644
66 61
67 } 62 }
68 else if (code == NE) 63 else if (code == NE)
69@@ -3786,10 +3773,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) 64@@ -3795,10 +3782,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[])
70 cmp_op1)); 65 cmp_op1));
71 } 66 }
72 condition = gen_rtx_NE (mode, comp_reg, const0_rtx); 67 condition = gen_rtx_NE (mode, comp_reg, const0_rtx);
@@ -78,7 +73,7 @@ index 9d3628c6816..4792e3ba370 100644
78 } 73 }
79 else 74 else
80 { 75 {
81@@ -3831,7 +3815,7 @@ microblaze_expand_conditional_branch_df (rtx operands[]) 76@@ -3840,7 +3824,7 @@ microblaze_expand_conditional_branch_df (rtx operands[])
82 77
83 emit_insn (gen_cstoredf4 (comp_reg, operands[0], cmp_op0, cmp_op1)); 78 emit_insn (gen_cstoredf4 (comp_reg, operands[0], cmp_op0, cmp_op1));
84 condition = gen_rtx_NE (Pmode, comp_reg, const0_rtx); 79 condition = gen_rtx_NE (Pmode, comp_reg, const0_rtx);
@@ -88,7 +83,7 @@ index 9d3628c6816..4792e3ba370 100644
88 83
89 /* Implement TARGET_FRAME_POINTER_REQUIRED. */ 84 /* Implement TARGET_FRAME_POINTER_REQUIRED. */
90diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 85diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
91index c99150ff0da..566c53ba228 100644 86index 97da9aad6fd..31bf04e4abd 100644
92--- a/gcc/config/microblaze/microblaze.md 87--- a/gcc/config/microblaze/microblaze.md
93+++ b/gcc/config/microblaze/microblaze.md 88+++ b/gcc/config/microblaze/microblaze.md
94@@ -2268,7 +2268,27 @@ else 89@@ -2268,7 +2268,27 @@ else
@@ -269,5 +264,5 @@ index c99150ff0da..566c53ba228 100644
269 ;; Unconditional branches 264 ;; Unconditional branches
270 ;;---------------------------------------------------------------- 265 ;;----------------------------------------------------------------
271-- 266--
2722.37.1 (Apple Git-137.1) 2672.34.1
273 268
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0030-Patch-Microblaze-previous-commit-broke-the-handling-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0030-previous-commit-broke-the-handling-of-SI-Branch-comp.patch
index bda4e7da..92951b08 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0030-Patch-Microblaze-previous-commit-broke-the-handling-.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0030-previous-commit-broke-the-handling-of-SI-Branch-comp.patch
@@ -1,19 +1,15 @@
1From af910dd71faec99838e421dd76fd5231e34bee3e Mon Sep 17 00:00:00 2001 1From e4713a382c1e6729cd3228284def9fa59da70028 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 8 Aug 2018 17:37:26 +0530 3Date: Wed, 8 Aug 2018 17:37:26 +0530
4Subject: [PATCH 30/53] [Patch,Microblaze] : previous commit broke the 4Subject: [PATCH 30/54] previous commit broke the handling of SI Branch compare
5 handling of SI Branch compare for Microblaze 32-bit.. 5 for Microblaze 32-bit..
6
7Upstream-Status: Pending
8
9Signed-off-by: Mark Hatle <mark.hatle@amd.com>
10 6
11--- 7---
12 gcc/config/microblaze/microblaze.md | 4 ++-- 8 gcc/config/microblaze/microblaze.md | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-) 9 1 file changed, 2 insertions(+), 2 deletions(-)
14 10
15diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
16index 566c53ba228..e54888550f6 100644 12index 31bf04e4abd..e37a7704195 100644
17--- a/gcc/config/microblaze/microblaze.md 13--- a/gcc/config/microblaze/microblaze.md
18+++ b/gcc/config/microblaze/microblaze.md 14+++ b/gcc/config/microblaze/microblaze.md
19@@ -2224,8 +2224,8 @@ else 15@@ -2224,8 +2224,8 @@ else
@@ -28,5 +24,5 @@ index 566c53ba228..e54888550f6 100644
28 (pc)))] 24 (pc)))]
29 "" 25 ""
30-- 26--
312.37.1 (Apple Git-137.1) 272.34.1
32 28
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0031-Patch-Microblaze-Support-of-multilibs-with-m64.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0031-Support-of-multilibs-with-m64.patch
index a9a7a03d..40009bf0 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0031-Patch-Microblaze-Support-of-multilibs-with-m64.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0031-Support-of-multilibs-with-m64.patch
@@ -1,16 +1,12 @@
1From 6921698fc0acf40cb036cf71649762e7a21bf604 Mon Sep 17 00:00:00 2001 1From 0673e986a5c06cba6507e0361ebdb9cf309f6a4c Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 11 Sep 2018 13:43:48 +0530 3Date: Tue, 11 Sep 2018 13:43:48 +0530
4Subject: [PATCH 31/53] [Patch, Microblaze] : Support of multilibs with m64 ... 4Subject: [PATCH 31/54] Support of multilibs with m64 ...
5 5
6Conflicts: 6Conflicts:
7 gcc/config/microblaze/microblaze-c.c 7 gcc/config/microblaze/microblaze-c.c
8 8
9signed-off-by : Mahesh Bodapati <mbodapat@xilinx.com> 9signed-off-by : Mahesh Bodapati <mbodapat@xilinx.com>
10Upstream-Status: Pending
11
12Signed-off-by: Mark Hatle <mark.hatle@amd.com>
13
14--- 10---
15 gcc/config/microblaze/microblaze-c.cc | 1 + 11 gcc/config/microblaze/microblaze-c.cc | 1 +
16 gcc/config/microblaze/t-microblaze | 15 ++++++--------- 12 gcc/config/microblaze/t-microblaze | 15 ++++++---------
@@ -18,7 +14,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com>
18 3 files changed, 10 insertions(+), 17 deletions(-) 14 3 files changed, 10 insertions(+), 17 deletions(-)
19 15
20diff --git a/gcc/config/microblaze/microblaze-c.cc b/gcc/config/microblaze/microblaze-c.cc 16diff --git a/gcc/config/microblaze/microblaze-c.cc b/gcc/config/microblaze/microblaze-c.cc
21index ef8d2430565..4e83a84b112 100644 17index af73de0709c..c7cb139d25a 100644
22--- a/gcc/config/microblaze/microblaze-c.cc 18--- a/gcc/config/microblaze/microblaze-c.cc
23+++ b/gcc/config/microblaze/microblaze-c.cc 19+++ b/gcc/config/microblaze/microblaze-c.cc
24@@ -102,6 +102,7 @@ microblaze_cpp_define (cpp_reader *pfile) 20@@ -102,6 +102,7 @@ microblaze_cpp_define (cpp_reader *pfile)
@@ -77,5 +73,5 @@ index 35021b24b7d..8d954a49575 100644
77- $(srcdir)/config/microblaze/divsi3_table.c \ 73- $(srcdir)/config/microblaze/divsi3_table.c \
78+ $(srcdir)/config/microblaze/divsi3_table.c 74+ $(srcdir)/config/microblaze/divsi3_table.c
79-- 75--
802.37.1 (Apple Git-137.1) 762.34.1
81 77
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0032-Patch-MicroBlaze-Fixed-issues-like.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0032-Fixed-issues-like-1-Interrupt-alignment-issue-2-Sign.patch
index cb62c5a7..df7ef8da 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0032-Patch-MicroBlaze-Fixed-issues-like.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0032-Fixed-issues-like-1-Interrupt-alignment-issue-2-Sign.patch
@@ -1,12 +1,8 @@
1From 7f827e73dff27c764e5f475613e3e06ae546103f Mon Sep 17 00:00:00 2001 1From 63e3adfb493e225c55536e72cfbf8be70977cdc8 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 13 Sep 2022 15:24:25 +0530 3Date: Tue, 13 Sep 2022 15:24:25 +0530
4Subject: [PATCH 32/53] [Patch,MicroBlaze]: Fixed issues like: 1 Interrupt 4Subject: [PATCH 32/54] Fixed issues like: 1 Interrupt alignment issue 2 Sign
5 alignment issue 2 Sign extension issue 5 extension issue
6
7Upstream-Status: Pending
8
9Signed-off-by: Mark Hatle <mark.hatle@amd.com>
10 6
11--- 7---
12 gcc/config/microblaze/microblaze.cc | 16 ++++++++++------ 8 gcc/config/microblaze/microblaze.cc | 16 ++++++++++------
@@ -14,10 +10,10 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com>
14 2 files changed, 11 insertions(+), 7 deletions(-) 10 2 files changed, 11 insertions(+), 7 deletions(-)
15 11
16diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 12diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
17index 4792e3ba370..f1da145232a 100644 13index de3c95a005e..6fbecb43e4a 100644
18--- a/gcc/config/microblaze/microblaze.cc 14--- a/gcc/config/microblaze/microblaze.cc
19+++ b/gcc/config/microblaze/microblaze.cc 15+++ b/gcc/config/microblaze/microblaze.cc
20@@ -2178,9 +2178,14 @@ compute_frame_size (HOST_WIDE_INT size) 16@@ -2183,9 +2183,14 @@ compute_frame_size (HOST_WIDE_INT size)
21 17
22 total_size += gp_reg_size; 18 total_size += gp_reg_size;
23 19
@@ -34,7 +30,7 @@ index 4792e3ba370..f1da145232a 100644
34 30
35 /* No space to be allocated for link register in leaf functions with no other 31 /* No space to be allocated for link register in leaf functions with no other
36 stack requirements. */ 32 stack requirements. */
37@@ -2465,7 +2470,6 @@ print_operand (FILE * file, rtx op, int letter) 33@@ -2470,7 +2475,6 @@ print_operand (FILE * file, rtx op, int letter)
38 else if (letter == 'h' || letter == 'j') 34 else if (letter == 'h' || letter == 'j')
39 { 35 {
40 long val[2]; 36 long val[2];
@@ -42,7 +38,7 @@ index 4792e3ba370..f1da145232a 100644
42 long l[2]; 38 long l[2];
43 if (code == CONST_DOUBLE) 39 if (code == CONST_DOUBLE)
44 { 40 {
45@@ -2480,10 +2484,10 @@ print_operand (FILE * file, rtx op, int letter) 41@@ -2485,10 +2489,10 @@ print_operand (FILE * file, rtx op, int letter)
46 } 42 }
47 else if (code == CONST_INT || code == CONST)// || code == SYMBOL_REF ||code == LABEL_REF) 43 else if (code == CONST_INT || code == CONST)// || code == SYMBOL_REF ||code == LABEL_REF)
48 { 44 {
@@ -57,7 +53,7 @@ index 4792e3ba370..f1da145232a 100644
57 else if (code == CONST_DOUBLE) 53 else if (code == CONST_DOUBLE)
58 { 54 {
59diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 55diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
60index e54888550f6..4e5d21a1f4c 100644 56index e37a7704195..72c2a9a38cd 100644
61--- a/gcc/config/microblaze/microblaze.md 57--- a/gcc/config/microblaze/microblaze.md
62+++ b/gcc/config/microblaze/microblaze.md 58+++ b/gcc/config/microblaze/microblaze.md
63@@ -1096,7 +1096,7 @@ 59@@ -1096,7 +1096,7 @@
@@ -70,5 +66,5 @@ index e54888550f6..4e5d21a1f4c 100644
70 } 66 }
71 } 67 }
72-- 68--
732.37.1 (Apple Git-137.1) 692.34.1
74 70
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0033-Patch-MicroBlaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0033-fixed-below-issues-Floating-point-print-issues-in-64.patch
index 9760695c..cf1076ea 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0033-Patch-MicroBlaze.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0033-fixed-below-issues-Floating-point-print-issues-in-64.patch
@@ -1,16 +1,11 @@
1From 0a86428a345ed359f788a72a0e185053b598e908 Mon Sep 17 00:00:00 2001 1From 58d4d2ca4fdf90d9d21e7813a599b3491f52e34d Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 13 Sep 2022 15:28:58 +0530 3Date: Tue, 13 Sep 2022 15:28:58 +0530
4Subject: [PATCH 33/53] [Patch,MicroBlaze]: fixed below issues: - Floating 4Subject: [PATCH 33/54] fixed below issues: - Floating point print issues in
5 point print issues in 64bit mode - Dejagnu Jump related issues - 5 64bit mode - Dejagnu Jump related issues - Added dbl instruction
6 Added dbl instruction
7 6
8 Conflicts: 7 Conflicts:
9 gcc/config/microblaze/microblaze.md 8 gcc/config/microblaze/microblaze.md
10Upstream-Status: Pending
11
12Signed-off-by: Mark Hatle <mark.hatle@amd.com>
13
14--- 9---
15 gcc/config/microblaze/microblaze.cc | 12 +++- 10 gcc/config/microblaze/microblaze.cc | 12 +++-
16 gcc/config/microblaze/microblaze.h | 7 +++ 11 gcc/config/microblaze/microblaze.h | 7 +++
@@ -20,10 +15,10 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com>
20 5 files changed, 125 insertions(+), 17 deletions(-) 15 5 files changed, 125 insertions(+), 17 deletions(-)
21 16
22diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 17diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
23index f1da145232a..7a08390a027 100644 18index 6fbecb43e4a..965a041ea8c 100644
24--- a/gcc/config/microblaze/microblaze.cc 19--- a/gcc/config/microblaze/microblaze.cc
25+++ b/gcc/config/microblaze/microblaze.cc 20+++ b/gcc/config/microblaze/microblaze.cc
26@@ -2474,7 +2474,12 @@ print_operand (FILE * file, rtx op, int letter) 21@@ -2479,7 +2479,12 @@ print_operand (FILE * file, rtx op, int letter)
27 if (code == CONST_DOUBLE) 22 if (code == CONST_DOUBLE)
28 { 23 {
29 if (GET_MODE (op) == DFmode) 24 if (GET_MODE (op) == DFmode)
@@ -37,7 +32,7 @@ index f1da145232a..7a08390a027 100644
37 else 32 else
38 { 33 {
39 REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), l); 34 REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), l);
40@@ -3877,7 +3882,10 @@ microblaze_expand_divide (rtx operands[]) 35@@ -3886,7 +3891,10 @@ microblaze_expand_divide (rtx operands[])
41 gen_rtx_PLUS (QImode, regt1, div_table_rtx)); 36 gen_rtx_PLUS (QImode, regt1, div_table_rtx));
42 37
43 insn = emit_insn (gen_zero_extendqisi2(operands[0],mem_rtx)); 38 insn = emit_insn (gen_zero_extendqisi2(operands[0],mem_rtx));
@@ -50,7 +45,7 @@ index f1da145232a..7a08390a027 100644
50 LABEL_NUSES (div_end_label) = 1; 45 LABEL_NUSES (div_end_label) = 1;
51 emit_barrier (); 46 emit_barrier ();
52diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 47diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
53index 5f30b8ac195..ac4ea43a706 100644 48index 3aee003de0d..145368db8b8 100644
54--- a/gcc/config/microblaze/microblaze.h 49--- a/gcc/config/microblaze/microblaze.h
55+++ b/gcc/config/microblaze/microblaze.h 50+++ b/gcc/config/microblaze/microblaze.h
56@@ -888,10 +888,17 @@ do { \ 51@@ -888,10 +888,17 @@ do { \
@@ -72,7 +67,7 @@ index 5f30b8ac195..ac4ea43a706 100644
72 /* We need to group -lm as well, since some Newlib math functions 67 /* We need to group -lm as well, since some Newlib math functions
73 reference __errno! */ 68 reference __errno! */
74diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 69diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
75index 4e5d21a1f4c..5a950b49591 100644 70index 72c2a9a38cd..b3d265d9941 100644
76--- a/gcc/config/microblaze/microblaze.md 71--- a/gcc/config/microblaze/microblaze.md
77+++ b/gcc/config/microblaze/microblaze.md 72+++ b/gcc/config/microblaze/microblaze.md
78@@ -527,6 +527,15 @@ 73@@ -527,6 +527,15 @@
@@ -233,7 +228,7 @@ index 4e5d21a1f4c..5a950b49591 100644
233 "" 228 ""
234 "mfs\t%0,rpc\n\taddik\t%0,%0,_GLOBAL_OFFSET_TABLE_+8" 229 "mfs\t%0,rpc\n\taddik\t%0,%0,_GLOBAL_OFFSET_TABLE_+8"
235diff --git a/libgcc/config/microblaze/crti.S b/libgcc/config/microblaze/crti.S 230diff --git a/libgcc/config/microblaze/crti.S b/libgcc/config/microblaze/crti.S
236index ec797e1bf17..15ebe68c277 100644 231index 1a89a0a2ffa..7cf5664880b 100644
237--- a/libgcc/config/microblaze/crti.S 232--- a/libgcc/config/microblaze/crti.S
238+++ b/libgcc/config/microblaze/crti.S 233+++ b/libgcc/config/microblaze/crti.S
239@@ -33,11 +33,32 @@ 234@@ -33,11 +33,32 @@
@@ -276,7 +271,7 @@ index ec797e1bf17..15ebe68c277 100644
276 sw r15, r0, r1 271 sw r15, r0, r1
277+#endif 272+#endif
278diff --git a/libgcc/config/microblaze/crtn.S b/libgcc/config/microblaze/crtn.S 273diff --git a/libgcc/config/microblaze/crtn.S b/libgcc/config/microblaze/crtn.S
279index 977b43b9436..9de3d4de13c 100644 274index 29a004973ae..9697b247b6c 100644
280--- a/libgcc/config/microblaze/crtn.S 275--- a/libgcc/config/microblaze/crtn.S
281+++ b/libgcc/config/microblaze/crtn.S 276+++ b/libgcc/config/microblaze/crtn.S
282@@ -29,7 +29,19 @@ 277@@ -29,7 +29,19 @@
@@ -305,5 +300,5 @@ index 977b43b9436..9de3d4de13c 100644
305 addik r1, r1, 16 300 addik r1, r1, 16
306+#endif 301+#endif
307-- 302--
3082.37.1 (Apple Git-137.1) 3032.34.1
309 304
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0034-Added-double-arith-instructions.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0034-Added-double-arith-instructions-Fixed-prologue-stack.patch
index 3f07dfa1..ab50b599 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0034-Added-double-arith-instructions.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0034-Added-double-arith-instructions-Fixed-prologue-stack.patch
@@ -1,20 +1,16 @@
1From 80c16e39bdf8643184c353e34f146dc8601c2c1e Mon Sep 17 00:00:00 2001 1From 924a756b5c9edc5d626f68323f67ced2800c75ff Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Tue, 9 Oct 2018 10:07:08 +0530 3Date: Tue, 9 Oct 2018 10:07:08 +0530
4Subject: [PATCH 34/53] -Added double arith instructions -Fixed prologue stack 4Subject: [PATCH 34/54] -Added double arith instructions -Fixed prologue stack
5 pointer decrement issue 5 pointer decrement issue
6 6
7Upstream-Status: Pending
8
9Signed-off-by: Mark Hatle <mark.hatle@amd.com>
10
11--- 7---
12 gcc/config/microblaze/microblaze.md | 78 +++++++++++++++++++++++++---- 8 gcc/config/microblaze/microblaze.md | 78 +++++++++++++++++++++++++----
13 gcc/config/microblaze/t-microblaze | 7 +++ 9 gcc/config/microblaze/t-microblaze | 7 +++
14 2 files changed, 76 insertions(+), 9 deletions(-) 10 2 files changed, 76 insertions(+), 9 deletions(-)
15 11
16diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 12diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
17index 5a950b49591..5506aee7be5 100644 13index b3d265d9941..0f769f320b2 100644
18--- a/gcc/config/microblaze/microblaze.md 14--- a/gcc/config/microblaze/microblaze.md
19+++ b/gcc/config/microblaze/microblaze.md 15+++ b/gcc/config/microblaze/microblaze.md
20@@ -527,6 +527,66 @@ 16@@ -527,6 +527,66 @@
@@ -135,5 +131,5 @@ index 47b869b9303..3522afd4831 100644
135 MULTILIB_EXCEPTIONS += *mlittle-endian/mxl-multiply-high mxl-multiply-high 131 MULTILIB_EXCEPTIONS += *mlittle-endian/mxl-multiply-high mxl-multiply-high
136 MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mlittle-endian/mxl-multiply-high 132 MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mlittle-endian/mxl-multiply-high
137-- 133--
1382.37.1 (Apple Git-137.1) 1342.34.1
139 135
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch
index 3ff6a2d0..589ca998 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch
@@ -1,19 +1,15 @@
1From 455216291580ca22767433eec11941c5f2471892 Mon Sep 17 00:00:00 2001 1From 3ebc7f9a11d66843982544cd0f88f35cc4defb83 Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Fri, 12 Oct 2018 16:07:36 +0530 3Date: Fri, 12 Oct 2018 16:07:36 +0530
4Subject: [PATCH 35/53] Fixed the issue in the delay slot with swap 4Subject: [PATCH 35/54] Fixed the issue in the delay slot with swap
5 instructions 5 instructions
6 6
7Upstream-Status: Pending
8
9Signed-off-by: Mark Hatle <mark.hatle@amd.com>
10
11--- 7---
12 gcc/config/microblaze/microblaze.md | 6 ++++++ 8 gcc/config/microblaze/microblaze.md | 6 ++++++
13 1 file changed, 6 insertions(+) 9 1 file changed, 6 insertions(+)
14 10
15diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
16index 5506aee7be5..4a372f8fd3f 100644 12index 0f769f320b2..6ada55ac2bc 100644
17--- a/gcc/config/microblaze/microblaze.md 13--- a/gcc/config/microblaze/microblaze.md
18+++ b/gcc/config/microblaze/microblaze.md 14+++ b/gcc/config/microblaze/microblaze.md
19@@ -443,6 +443,9 @@ 15@@ -443,6 +443,9 @@
@@ -37,5 +33,5 @@ index 5506aee7be5..4a372f8fd3f 100644
37 33
38 ;;---------------------------------------------------------------- 34 ;;----------------------------------------------------------------
39-- 35--
402.37.1 (Apple Git-137.1) 362.34.1
41 37
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch
index 90ddf3eb..8431cb16 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch
@@ -1,13 +1,9 @@
1From b8c468f1bd467213083b59b54af100ee0c6dea9e Mon Sep 17 00:00:00 2001 1From 9ea2aee3599d2f1fc9d67c7a72cd7c826272a2fa Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Sat, 13 Oct 2018 21:12:43 +0530 3Date: Sat, 13 Oct 2018 21:12:43 +0530
4Subject: [PATCH 36/53] Fixed the load store issue with the 32bit arith 4Subject: [PATCH 36/54] Fixed the load store issue with the 32bit arith
5 libraries 5 libraries
6 6
7Upstream-Status: Pending
8
9Signed-off-by: Mark Hatle <mark.hatle@amd.com>
10
11--- 7---
12 libgcc/config/microblaze/divsi3.S | 25 ++++++++++++++++++++++++- 8 libgcc/config/microblaze/divsi3.S | 25 ++++++++++++++++++++++++-
13 libgcc/config/microblaze/modsi3.S | 26 +++++++++++++++++++++++++- 9 libgcc/config/microblaze/modsi3.S | 26 +++++++++++++++++++++++++-
@@ -17,7 +13,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com>
17 5 files changed, 98 insertions(+), 4 deletions(-) 13 5 files changed, 98 insertions(+), 4 deletions(-)
18 14
19diff --git a/libgcc/config/microblaze/divsi3.S b/libgcc/config/microblaze/divsi3.S 15diff --git a/libgcc/config/microblaze/divsi3.S b/libgcc/config/microblaze/divsi3.S
20index 14829ec6701..b464deed481 100644 16index a449fedd53e..9f04f59104e 100644
21--- a/libgcc/config/microblaze/divsi3.S 17--- a/libgcc/config/microblaze/divsi3.S
22+++ b/libgcc/config/microblaze/divsi3.S 18+++ b/libgcc/config/microblaze/divsi3.S
23@@ -41,6 +41,17 @@ 19@@ -41,6 +41,17 @@
@@ -74,7 +70,7 @@ index 14829ec6701..b464deed481 100644
74 .size __divsi3, . - __divsi3 70 .size __divsi3, . - __divsi3
75 71
76diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S 72diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S
77index b8f2e37809d..e0fbd91e766 100644 73index 282fabfd966..d2f9dc770e4 100644
78--- a/libgcc/config/microblaze/modsi3.S 74--- a/libgcc/config/microblaze/modsi3.S
79+++ b/libgcc/config/microblaze/modsi3.S 75+++ b/libgcc/config/microblaze/modsi3.S
80@@ -41,6 +41,17 @@ 76@@ -41,6 +41,17 @@
@@ -132,7 +128,7 @@ index b8f2e37809d..e0fbd91e766 100644
132 .size __modsi3, . - __modsi3 128 .size __modsi3, . - __modsi3
133 129
134diff --git a/libgcc/config/microblaze/mulsi3.S b/libgcc/config/microblaze/mulsi3.S 130diff --git a/libgcc/config/microblaze/mulsi3.S b/libgcc/config/microblaze/mulsi3.S
135index f48fcf8270c..657668ef826 100644 131index 3da55416964..437e2bc309e 100644
136--- a/libgcc/config/microblaze/mulsi3.S 132--- a/libgcc/config/microblaze/mulsi3.S
137+++ b/libgcc/config/microblaze/mulsi3.S 133+++ b/libgcc/config/microblaze/mulsi3.S
138@@ -41,6 +41,9 @@ 134@@ -41,6 +41,9 @@
@@ -146,7 +142,7 @@ index f48fcf8270c..657668ef826 100644
146 .frame r1,0,r15 142 .frame r1,0,r15
147 add r3,r0,r0 143 add r3,r0,r0
148diff --git a/libgcc/config/microblaze/udivsi3.S b/libgcc/config/microblaze/udivsi3.S 144diff --git a/libgcc/config/microblaze/udivsi3.S b/libgcc/config/microblaze/udivsi3.S
149index 2c321f94b09..fc6a4b5a248 100644 145index 7f3fe99eb12..496dd6794bf 100644
150--- a/libgcc/config/microblaze/udivsi3.S 146--- a/libgcc/config/microblaze/udivsi3.S
151+++ b/libgcc/config/microblaze/udivsi3.S 147+++ b/libgcc/config/microblaze/udivsi3.S
152@@ -41,6 +41,16 @@ 148@@ -41,6 +41,16 @@
@@ -201,7 +197,7 @@ index 2c321f94b09..fc6a4b5a248 100644
201 .end __udivsi3 197 .end __udivsi3
202 .size __udivsi3, . - __udivsi3 198 .size __udivsi3, . - __udivsi3
203diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S 199diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S
204index fbe942dc5f2..b68ba7a5ea6 100644 200index 6c7f2b3c917..fffc784b4cb 100644
205--- a/libgcc/config/microblaze/umodsi3.S 201--- a/libgcc/config/microblaze/umodsi3.S
206+++ b/libgcc/config/microblaze/umodsi3.S 202+++ b/libgcc/config/microblaze/umodsi3.S
207@@ -41,6 +41,16 @@ 203@@ -41,6 +41,16 @@
@@ -256,5 +252,5 @@ index fbe942dc5f2..b68ba7a5ea6 100644
256 .end __umodsi3 252 .end __umodsi3
257 .size __umodsi3, . - __umodsi3 253 .size __umodsi3, . - __umodsi3
258-- 254--
2592.37.1 (Apple Git-137.1) 2552.34.1
260 256
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch
index 191c7627..8b0fa208 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch
@@ -1,18 +1,14 @@
1From 2bc476e64f1bacc27874c152340c004c17bfd942 Mon Sep 17 00:00:00 2001 1From d2c971646ce103fa17cc32474cb942268bc59258 Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Mon, 15 Oct 2018 12:00:10 +0530 3Date: Mon, 15 Oct 2018 12:00:10 +0530
4Subject: [PATCH 37/53] extending the Dwarf support to 64bit Microblaze 4Subject: [PATCH 37/54] extending the Dwarf support to 64bit Microblaze
5
6Upstream-Status: Pending
7
8Signed-off-by: Mark Hatle <mark.hatle@amd.com>
9 5
10--- 6---
11 gcc/config/microblaze/microblaze.h | 2 +- 7 gcc/config/microblaze/microblaze.h | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-) 8 1 file changed, 1 insertion(+), 1 deletion(-)
13 9
14diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 10diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
15index ac4ea43a706..56dfc2a3824 100644 11index 145368db8b8..4258dcde0d1 100644
16--- a/gcc/config/microblaze/microblaze.h 12--- a/gcc/config/microblaze/microblaze.h
17+++ b/gcc/config/microblaze/microblaze.h 13+++ b/gcc/config/microblaze/microblaze.h
18@@ -207,7 +207,7 @@ extern enum pipeline_type microblaze_pipe; 14@@ -207,7 +207,7 @@ extern enum pipeline_type microblaze_pipe;
@@ -25,5 +21,5 @@ index ac4ea43a706..56dfc2a3824 100644
25 /* Target machine storage layout */ 21 /* Target machine storage layout */
26 22
27-- 23--
282.37.1 (Apple Git-137.1) 242.34.1
29 25
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0038-fixing-the-typo-errors-in-umodsi3-file.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0038-fixing-the-typo-errors-in-umodsi3-file.patch
index 8697be58..d7b78895 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0038-fixing-the-typo-errors-in-umodsi3-file.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0038-fixing-the-typo-errors-in-umodsi3-file.patch
@@ -1,18 +1,14 @@
1From 1e0eaa1330f24d4989af6326ce1af4f613ea0d89 Mon Sep 17 00:00:00 2001 1From 0c0b4fb378d9035f0c5f847321b543a5c2ff70e2 Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Tue, 16 Oct 2018 07:55:46 +0530 3Date: Tue, 16 Oct 2018 07:55:46 +0530
4Subject: [PATCH 38/53] fixing the typo errors in umodsi3 file 4Subject: [PATCH 38/54] fixing the typo errors in umodsi3 file
5
6Upstream-Status: Pending
7
8Signed-off-by: Mark Hatle <mark.hatle@amd.com>
9 5
10--- 6---
11 libgcc/config/microblaze/umodsi3.S | 6 +++--- 7 libgcc/config/microblaze/umodsi3.S | 6 +++---
12 1 file changed, 3 insertions(+), 3 deletions(-) 8 1 file changed, 3 insertions(+), 3 deletions(-)
13 9
14diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S 10diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S
15index b68ba7a5ea6..03be6df1fc6 100644 11index fffc784b4cb..a706017c634 100644
16--- a/libgcc/config/microblaze/umodsi3.S 12--- a/libgcc/config/microblaze/umodsi3.S
17+++ b/libgcc/config/microblaze/umodsi3.S 13+++ b/libgcc/config/microblaze/umodsi3.S
18@@ -47,9 +47,9 @@ __umodsi3: 14@@ -47,9 +47,9 @@ __umodsi3:
@@ -29,5 +25,5 @@ index b68ba7a5ea6..03be6df1fc6 100644
29 __umodsi3: 25 __umodsi3:
30 .frame r1,0,r15 26 .frame r1,0,r15
31-- 27--
322.37.1 (Apple Git-137.1) 282.34.1
33 29
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0039-fixing-the-32bit-LTO-related-issue9-1014024.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0039-fixing-the-32bit-LTO-related-issue9-1014024.patch
index 032cab4d..27b6efd1 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0039-fixing-the-32bit-LTO-related-issue9-1014024.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0039-fixing-the-32bit-LTO-related-issue9-1014024.patch
@@ -1,18 +1,14 @@
1From 7dbdc5ba78c9237b0a367ca61f448cf3a0277ea6 Mon Sep 17 00:00:00 2001 1From 8dfc5e76a3b0388bb5c88c5c0072256f3062f3c8 Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Wed, 17 Oct 2018 16:56:14 +0530 3Date: Wed, 17 Oct 2018 16:56:14 +0530
4Subject: [PATCH 39/53] fixing the 32bit LTO related issue9(1014024) 4Subject: [PATCH 39/54] fixing the 32bit LTO related issue9(1014024)
5
6Upstream-Status: Pending
7
8Signed-off-by: Mark Hatle <mark.hatle@amd.com>
9 5
10--- 6---
11 gcc/config/microblaze/microblaze.h | 24 ++++++++++++++---------- 7 gcc/config/microblaze/microblaze.h | 24 ++++++++++++++----------
12 1 file changed, 14 insertions(+), 10 deletions(-) 8 1 file changed, 14 insertions(+), 10 deletions(-)
13 9
14diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 10diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
15index 56dfc2a3824..c48b6de0d58 100644 11index 4258dcde0d1..4d6babfe9c4 100644
16--- a/gcc/config/microblaze/microblaze.h 12--- a/gcc/config/microblaze/microblaze.h
17+++ b/gcc/config/microblaze/microblaze.h 13+++ b/gcc/config/microblaze/microblaze.h
18@@ -265,12 +265,14 @@ extern enum pipeline_type microblaze_pipe; 14@@ -265,12 +265,14 @@ extern enum pipeline_type microblaze_pipe;
@@ -68,5 +64,5 @@ index 56dfc2a3824..c48b6de0d58 100644
68 #define REGNO_OK_FOR_BASE_P(regno) microblaze_regno_ok_for_base_p ((regno), 1) 64 #define REGNO_OK_FOR_BASE_P(regno) microblaze_regno_ok_for_base_p ((regno), 1)
69 65
70-- 66--
712.37.1 (Apple Git-137.1) 672.34.1
72 68
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch
index 1ed53957..35251ff8 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch
@@ -1,19 +1,15 @@
1From a21a41a0c574b807c7e7edaa7051a0f7395d8142 Mon Sep 17 00:00:00 2001 1From 411324e0340a32b4a84094b38e5d74f38cf391bc Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Fri, 19 Oct 2018 14:26:25 +0530 3Date: Fri, 19 Oct 2018 14:26:25 +0530
4Subject: [PATCH 40/53] Fixed the missing stack adjustment in prologue of 4Subject: [PATCH 40/54] Fixed the missing stack adjustment in prologue of
5 modsi3 function 5 modsi3 function
6 6
7Upstream-Status: Pending
8
9Signed-off-by: Mark Hatle <mark.hatle@amd.com>
10
11--- 7---
12 libgcc/config/microblaze/modsi3.S | 1 + 8 libgcc/config/microblaze/modsi3.S | 1 +
13 1 file changed, 1 insertion(+) 9 1 file changed, 1 insertion(+)
14 10
15diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S 11diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S
16index e0fbd91e766..3ec17685e51 100644 12index d2f9dc770e4..f8684db721e 100644
17--- a/libgcc/config/microblaze/modsi3.S 13--- a/libgcc/config/microblaze/modsi3.S
18+++ b/libgcc/config/microblaze/modsi3.S 14+++ b/libgcc/config/microblaze/modsi3.S
19@@ -119,6 +119,7 @@ $LaRETURN_HERE: 15@@ -119,6 +119,7 @@ $LaRETURN_HERE:
@@ -25,5 +21,5 @@ index e0fbd91e766..3ec17685e51 100644
25 .end __modsi3 21 .end __modsi3
26 .size __modsi3, . - __modsi3 22 .size __modsi3, . - __modsi3
27-- 23--
282.37.1 (Apple Git-137.1) 242.34.1
29 25
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0041-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0041-corrected-SPN-for-dlong-instruction-mapping.patch
index e6335e8e..bb797a4a 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0041-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0041-corrected-SPN-for-dlong-instruction-mapping.patch
@@ -1,19 +1,14 @@
1From 5f799ea01bae0573a44f3fefa825861e99f4e30a Mon Sep 17 00:00:00 2001 1From b03e3a75a37213823c062bb72e4f6f470c516222 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 24 Oct 2018 18:31:04 +0530 3Date: Wed, 24 Oct 2018 18:31:04 +0530
4Subject: [PATCH 41/53] [Patch,Microblaze] : corrected SPN for dlong 4Subject: [PATCH 41/54] corrected SPN for dlong instruction mapping.
5 instruction mapping.
6
7Upstream-Status: Pending
8
9Signed-off-by: Mark Hatle <mark.hatle@amd.com>
10 5
11--- 6---
12 gcc/config/microblaze/microblaze.md | 4 ++-- 7 gcc/config/microblaze/microblaze.md | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-) 8 1 file changed, 2 insertions(+), 2 deletions(-)
14 9
15diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 10diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
16index 4a372f8fd3f..5a964e70d1f 100644 11index 6ada55ac2bc..36b050670b8 100644
17--- a/gcc/config/microblaze/microblaze.md 12--- a/gcc/config/microblaze/microblaze.md
18+++ b/gcc/config/microblaze/microblaze.md 13+++ b/gcc/config/microblaze/microblaze.md
19@@ -602,9 +602,9 @@ 14@@ -602,9 +602,9 @@
@@ -29,5 +24,5 @@ index 4a372f8fd3f..5a964e70d1f 100644
29 "dlong\t%0,%1" 24 "dlong\t%0,%1"
30 [(set_attr "type" "fcvt") 25 [(set_attr "type" "fcvt")
31-- 26--
322.37.1 (Apple Git-137.1) 272.34.1
33 28
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0042-fixing-the-long-long-long-mingw-toolchain-issue.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0042-fixing-the-long-long-long-mingw-toolchain-issue.patch
index f4013b9e..cbafaafc 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0042-fixing-the-long-long-long-mingw-toolchain-issue.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0042-fixing-the-long-long-long-mingw-toolchain-issue.patch
@@ -1,11 +1,7 @@
1From 9c37b9690ec2c6290095209c039725f235537379 Mon Sep 17 00:00:00 2001 1From b926d05a0cdd32d9821a48f62eef49c5b1025f73 Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Thu, 29 Nov 2018 17:55:08 +0530 3Date: Thu, 29 Nov 2018 17:55:08 +0530
4Subject: [PATCH 42/53] fixing the long & long long mingw toolchain issue 4Subject: [PATCH 42/54] fixing the long & long long mingw toolchain issue
5
6Upstream-Status: Pending
7
8Signed-off-by: Mark Hatle <mark.hatle@amd.com>
9 5
10--- 6---
11 gcc/config/microblaze/constraints.md | 2 +- 7 gcc/config/microblaze/constraints.md | 2 +-
@@ -13,7 +9,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com>
13 2 files changed, 5 insertions(+), 5 deletions(-) 9 2 files changed, 5 insertions(+), 5 deletions(-)
14 10
15diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md 11diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md
16index 0ced155340d..3f9805dfe0a 100644 12index 7bb1e0b4c8d..fa605831bfe 100644
17--- a/gcc/config/microblaze/constraints.md 13--- a/gcc/config/microblaze/constraints.md
18+++ b/gcc/config/microblaze/constraints.md 14+++ b/gcc/config/microblaze/constraints.md
19@@ -55,7 +55,7 @@ 15@@ -55,7 +55,7 @@
@@ -26,7 +22,7 @@ index 0ced155340d..3f9805dfe0a 100644
26 22
27 ;; Define floating point constraints 23 ;; Define floating point constraints
28diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 24diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
29index 5a964e70d1f..f509bd5e665 100644 25index 36b050670b8..e123bf3a7d1 100644
30--- a/gcc/config/microblaze/microblaze.md 26--- a/gcc/config/microblaze/microblaze.md
31+++ b/gcc/config/microblaze/microblaze.md 27+++ b/gcc/config/microblaze/microblaze.md
32@@ -648,8 +648,8 @@ 28@@ -648,8 +648,8 @@
@@ -59,5 +55,5 @@ index 5a964e70d1f..f509bd5e665 100644
59 else 55 else
60 return "addlik\t%0,r0,%1"; 56 return "addlik\t%0,r0,%1";
61-- 57--
622.37.1 (Apple Git-137.1) 582.34.1
63 59
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch
index 7f3c8373..af8c684f 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch
@@ -1,18 +1,14 @@
1From 0ed24f5a2e6e47f5d13896793ab2c6ea89e8c8e6 Mon Sep 17 00:00:00 2001 1From 854371934116e5197d627cebaf274f431205b914 Mon Sep 17 00:00:00 2001
2From: Nagaraju <nmekala@xilinx.com> 2From: Nagaraju <nmekala@xilinx.com>
3Date: Thu, 14 Mar 2019 18:11:04 +0530 3Date: Thu, 14 Mar 2019 18:11:04 +0530
4Subject: [PATCH 43/53] Fix the MB-64 bug of handling QI objects 4Subject: [PATCH 43/54] Fix the MB-64 bug of handling QI objects
5
6Upstream-Status: Pending
7
8Signed-off-by: Mark Hatle <mark.hatle@amd.com>
9 5
10--- 6---
11 gcc/config/microblaze/microblaze.md | 14 +++++++------- 7 gcc/config/microblaze/microblaze.md | 14 +++++++-------
12 1 file changed, 7 insertions(+), 7 deletions(-) 8 1 file changed, 7 insertions(+), 7 deletions(-)
13 9
14diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 10diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
15index f509bd5e665..27436c0f660 100644 11index e123bf3a7d1..0f81b0ed58c 100644
16--- a/gcc/config/microblaze/microblaze.md 12--- a/gcc/config/microblaze/microblaze.md
17+++ b/gcc/config/microblaze/microblaze.md 13+++ b/gcc/config/microblaze/microblaze.md
18@@ -2345,11 +2345,11 @@ else 14@@ -2345,11 +2345,11 @@ else
@@ -47,5 +43,5 @@ index f509bd5e665..27436c0f660 100644
47 "TARGET_MB_64" 43 "TARGET_MB_64"
48 { 44 {
49-- 45--
502.37.1 (Apple Git-137.1) 462.34.1
51 47
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0044-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0044-We-will-check-the-possibility-of-peephole2-optimizat.patch
index 14eb812a..277e5be2 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0044-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0044-We-will-check-the-possibility-of-peephole2-optimizat.patch
@@ -1,19 +1,15 @@
1From e8286e00f939486dde52e9475bc9cca0aa025a42 Mon Sep 17 00:00:00 2001 1From 5527cec8136440a1edea87b2bb6dafa8e78d07b0 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Fri, 29 Mar 2019 12:08:39 +0530 3Date: Fri, 29 Mar 2019 12:08:39 +0530
4Subject: [PATCH 44/53] [Patch,Microblaze] : We will check the possibility of 4Subject: [PATCH 44/54] We will check the possibility of peephole2
5 peephole2 optimization,if we can then we will fix the compiler issue. 5 optimization,if we can then we will fix the compiler issue.
6
7Upstream-Status: Pending
8
9Signed-off-by: Mark Hatle <mark.hatle@amd.com>
10 6
11--- 7---
12 gcc/config/microblaze/microblaze.md | 63 +++++++++++++++++------------ 8 gcc/config/microblaze/microblaze.md | 63 +++++++++++++++++------------
13 1 file changed, 38 insertions(+), 25 deletions(-) 9 1 file changed, 38 insertions(+), 25 deletions(-)
14 10
15diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
16index 27436c0f660..4b9acddb1f1 100644 12index 0f81b0ed58c..f661ba1c241 100644
17--- a/gcc/config/microblaze/microblaze.md 13--- a/gcc/config/microblaze/microblaze.md
18+++ b/gcc/config/microblaze/microblaze.md 14+++ b/gcc/config/microblaze/microblaze.md
19@@ -882,31 +882,44 @@ 15@@ -882,31 +882,44 @@
@@ -87,5 +83,5 @@ index 27436c0f660..4b9acddb1f1 100644
87 ;;---------------------------------------------------------------- 83 ;;----------------------------------------------------------------
88 ;; Negation and one's complement 84 ;; Negation and one's complement
89-- 85--
902.37.1 (Apple Git-137.1) 862.34.1
91 87
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0045-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0045-fixed-typos-in-mul-div-and-mod-assembly-files.patch
index 54135b0f..4760926f 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0045-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0045-fixed-typos-in-mul-div-and-mod-assembly-files.patch
@@ -1,12 +1,7 @@
1From 29c33e35373d7dc52e43162dce38a3ec0e350db3 Mon Sep 17 00:00:00 2001 1From 3c6f051ce41f06eab29932859be52ed864bef52f Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 17 Apr 2019 12:36:16 +0530 3Date: Wed, 17 Apr 2019 12:36:16 +0530
4Subject: [PATCH 45/53] [Patch,MicroBlaze]: fixed typos in mul,div and mod 4Subject: [PATCH 45/54] fixed typos in mul,div and mod assembly files.
5 assembly files.
6
7Upstream-Status: Pending
8
9Signed-off-by: Mark Hatle <mark.hatle@amd.com>
10 5
11--- 6---
12 libgcc/config/microblaze/divsi3.S | 47 ++++++++++++++++++++---- 7 libgcc/config/microblaze/divsi3.S | 47 ++++++++++++++++++++----
@@ -17,7 +12,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com>
17 5 files changed, 212 insertions(+), 20 deletions(-) 12 5 files changed, 212 insertions(+), 20 deletions(-)
18 13
19diff --git a/libgcc/config/microblaze/divsi3.S b/libgcc/config/microblaze/divsi3.S 14diff --git a/libgcc/config/microblaze/divsi3.S b/libgcc/config/microblaze/divsi3.S
20index b464deed481..ceeed6be1f4 100644 15index 9f04f59104e..e1dfccbf257 100644
21--- a/libgcc/config/microblaze/divsi3.S 16--- a/libgcc/config/microblaze/divsi3.S
22+++ b/libgcc/config/microblaze/divsi3.S 17+++ b/libgcc/config/microblaze/divsi3.S
23@@ -46,7 +46,7 @@ 18@@ -46,7 +46,7 @@
@@ -111,7 +106,7 @@ index b464deed481..ceeed6be1f4 100644
111 $LaDiv_By_Zero: 106 $LaDiv_By_Zero:
112 $LaResult_Is_Zero: 107 $LaResult_Is_Zero:
113diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S 108diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S
114index 3ec17685e51..637b06c09a3 100644 109index f8684db721e..3bf9b10ec3e 100644
115--- a/libgcc/config/microblaze/modsi3.S 110--- a/libgcc/config/microblaze/modsi3.S
116+++ b/libgcc/config/microblaze/modsi3.S 111+++ b/libgcc/config/microblaze/modsi3.S
117@@ -62,40 +62,72 @@ __modsi3: 112@@ -62,40 +62,72 @@ __modsi3:
@@ -200,7 +195,7 @@ index 3ec17685e51..637b06c09a3 100644
200 nop 195 nop
201 #else 196 #else
202diff --git a/libgcc/config/microblaze/mulsi3.S b/libgcc/config/microblaze/mulsi3.S 197diff --git a/libgcc/config/microblaze/mulsi3.S b/libgcc/config/microblaze/mulsi3.S
203index 657668ef826..6be75dc95e8 100644 198index 437e2bc309e..bc9ff9cdc89 100644
204--- a/libgcc/config/microblaze/mulsi3.S 199--- a/libgcc/config/microblaze/mulsi3.S
205+++ b/libgcc/config/microblaze/mulsi3.S 200+++ b/libgcc/config/microblaze/mulsi3.S
206@@ -43,7 +43,37 @@ 201@@ -43,7 +43,37 @@
@@ -250,7 +245,7 @@ index 657668ef826..6be75dc95e8 100644
250 .end __mulsi3 245 .end __mulsi3
251 .size __mulsi3, . - __mulsi3 246 .size __mulsi3, . - __mulsi3
252diff --git a/libgcc/config/microblaze/udivsi3.S b/libgcc/config/microblaze/udivsi3.S 247diff --git a/libgcc/config/microblaze/udivsi3.S b/libgcc/config/microblaze/udivsi3.S
253index fc6a4b5a248..f8ce88bd8b7 100644 248index 496dd6794bf..486bc8f0819 100644
254--- a/libgcc/config/microblaze/udivsi3.S 249--- a/libgcc/config/microblaze/udivsi3.S
255+++ b/libgcc/config/microblaze/udivsi3.S 250+++ b/libgcc/config/microblaze/udivsi3.S
256@@ -59,52 +59,96 @@ __udivsi3: 251@@ -59,52 +59,96 @@ __udivsi3:
@@ -364,7 +359,7 @@ index fc6a4b5a248..f8ce88bd8b7 100644
364 NOP 359 NOP
365 #else 360 #else
366diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S 361diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S
367index 03be6df1fc6..3be3658f7a2 100644 362index a706017c634..1d8e2921745 100644
368--- a/libgcc/config/microblaze/umodsi3.S 363--- a/libgcc/config/microblaze/umodsi3.S
369+++ b/libgcc/config/microblaze/umodsi3.S 364+++ b/libgcc/config/microblaze/umodsi3.S
370@@ -46,7 +46,7 @@ 365@@ -46,7 +46,7 @@
@@ -466,5 +461,5 @@ index 03be6df1fc6..3be3658f7a2 100644
466 $LaRETURN_HERE: 461 $LaRETURN_HERE:
467 # Restore values of CSRs and that of r3 and the divisor and the dividend 462 # Restore values of CSRs and that of r3 and the divisor and the dividend
468-- 463--
4692.37.1 (Apple Git-137.1) 4642.34.1
470 465
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0046-Patch-microblaze-MB-64-removal-of-barrel-shift-instr.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0046-MB-64-removal-of-barrel-shift-instructions-from-defa.patch
index def10321..5f45d03f 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0046-Patch-microblaze-MB-64-removal-of-barrel-shift-instr.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0046-MB-64-removal-of-barrel-shift-instructions-from-defa.patch
@@ -1,27 +1,22 @@
1From 39589348962a2e0453ad49118b6bc3dd8a7b1bb5 Mon Sep 17 00:00:00 2001 1From 0776495e85a15c1ad84fd90736059902bb3ea152 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 13 Sep 2022 15:59:12 +0530 3Date: Tue, 13 Sep 2022 15:59:12 +0530
4Subject: [PATCH 46/53] [Patch, microblaze]: MB-64 removal of barrel-shift 4Subject: [PATCH 46/54] MB-64 removal of barrel-shift instructions from default
5 instructions from default By default MB-64 is generatting 5 By default MB-64 is generatting barrel-shift instructions. It has been
6 barrel-shift instructions. It has been removed from default. 6 removed from default. Barrel-shift instructions will be generated only if
7 Barrel-shift instructions will be generated only if barrel-shifter is 7 barrel-shifter is enabled. Similarly to double instructions as well.
8 enabled. Similarly to double instructions as well.
9 8
10 Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 9 Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
11Upstream-Status: Pending
12
13Signed-off-by: Mark Hatle <mark.hatle@amd.com>
14
15--- 10---
16 gcc/config/microblaze/microblaze.cc | 2 +- 11 gcc/config/microblaze/microblaze.cc | 2 +-
17 gcc/config/microblaze/microblaze.md | 269 ++++++++++++++++++++++++++-- 12 gcc/config/microblaze/microblaze.md | 269 ++++++++++++++++++++++++++--
18 2 files changed, 252 insertions(+), 19 deletions(-) 13 2 files changed, 252 insertions(+), 19 deletions(-)
19 14
20diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 15diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
21index 7a08390a027..3ee3996a38d 100644 16index 965a041ea8c..f949a8863d3 100644
22--- a/gcc/config/microblaze/microblaze.cc 17--- a/gcc/config/microblaze/microblaze.cc
23+++ b/gcc/config/microblaze/microblaze.cc 18+++ b/gcc/config/microblaze/microblaze.cc
24@@ -3871,7 +3871,7 @@ microblaze_expand_divide (rtx operands[]) 19@@ -3880,7 +3880,7 @@ microblaze_expand_divide (rtx operands[])
25 emit_insn (gen_rtx_CLOBBER (Pmode, reg18)); 20 emit_insn (gen_rtx_CLOBBER (Pmode, reg18));
26 21
27 if (TARGET_MB_64) { 22 if (TARGET_MB_64) {
@@ -31,7 +26,7 @@ index 7a08390a027..3ee3996a38d 100644
31 } 26 }
32 else { 27 else {
33diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 28diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
34index 4b9acddb1f1..3695e9e101d 100644 29index f661ba1c241..9bc9512db8e 100644
35--- a/gcc/config/microblaze/microblaze.md 30--- a/gcc/config/microblaze/microblaze.md
36+++ b/gcc/config/microblaze/microblaze.md 31+++ b/gcc/config/microblaze/microblaze.md
37@@ -547,7 +547,7 @@ 32@@ -547,7 +547,7 @@
@@ -477,5 +472,5 @@ index 4b9acddb1f1..3695e9e101d 100644
477 [(set_attr "type" "arith") 472 [(set_attr "type" "arith")
478 (set_attr "mode" "DI") 473 (set_attr "mode" "DI")
479-- 474--
4802.37.1 (Apple Git-137.1) 4752.34.1
481 476
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0047-Added-new-MB-64-single-register-arithmetic-instructi.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0047-Added-new-MB-64-single-register-arithmetic-instructi.patch
index 318abe7b..0272fd3c 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0047-Added-new-MB-64-single-register-arithmetic-instructi.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0047-Added-new-MB-64-single-register-arithmetic-instructi.patch
@@ -1,18 +1,14 @@
1From e32334b0f8a4c9532975001ffab33e86469ea4e1 Mon Sep 17 00:00:00 2001 1From 003f60fa4eedddd15de6e9f633bffec1a887fe45 Mon Sep 17 00:00:00 2001
2From: Nagaraju <nmekala@xilinx.com> 2From: Nagaraju <nmekala@xilinx.com>
3Date: Fri, 23 Aug 2019 16:16:53 +0530 3Date: Fri, 23 Aug 2019 16:16:53 +0530
4Subject: [PATCH 47/53] Added new MB-64 single register arithmetic instructions 4Subject: [PATCH 47/54] Added new MB-64 single register arithmetic instructions
5
6Upstream-Status: Pending
7
8Signed-off-by: Mark Hatle <mark.hatle@amd.com>
9 5
10--- 6---
11 gcc/config/microblaze/microblaze.md | 56 +++++++++++++++++++++++++++++ 7 gcc/config/microblaze/microblaze.md | 56 +++++++++++++++++++++++++++++
12 1 file changed, 56 insertions(+) 8 1 file changed, 56 insertions(+)
13 9
14diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 10diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
15index 3695e9e101d..85c1ab45994 100644 11index 9bc9512db8e..9172f1bc209 100644
16--- a/gcc/config/microblaze/microblaze.md 12--- a/gcc/config/microblaze/microblaze.md
17+++ b/gcc/config/microblaze/microblaze.md 13+++ b/gcc/config/microblaze/microblaze.md
18@@ -654,6 +654,18 @@ 14@@ -654,6 +654,18 @@
@@ -107,5 +103,5 @@ index 3695e9e101d..85c1ab45994 100644
107 [(set (match_operand:DI 0 "register_operand" "=d,d") 103 [(set (match_operand:DI 0 "register_operand" "=d,d")
108 (xor:DI (match_operand:DI 1 "arith_operand" "%d,d") 104 (xor:DI (match_operand:DI 1 "arith_operand" "%d,d")
109-- 105--
1102.37.1 (Apple Git-137.1) 1062.34.1
111 107
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0048-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0048-Added-support-for-64-bit-Immediate-values.patch
index 09514a7d..0be495a8 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0048-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0048-Added-support-for-64-bit-Immediate-values.patch
@@ -1,12 +1,7 @@
1From f5f262b196de197b7e9ece8cc08c8715f953857f Mon Sep 17 00:00:00 2001 1From 8d20c82d95e22a42551b446c087d9e06958a3580 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Mon, 26 Aug 2019 15:55:22 +0530 3Date: Mon, 26 Aug 2019 15:55:22 +0530
4Subject: [PATCH 48/53] [Patch,MicroBlaze] : Added support for 64 bit Immediate 4Subject: [PATCH 48/54] Added support for 64 bit Immediate values.
5 values.
6
7Upstream-Status: Pending
8
9Signed-off-by: Mark Hatle <mark.hatle@amd.com>
10 5
11--- 6---
12 gcc/config/microblaze/constraints.md | 4 ++-- 7 gcc/config/microblaze/constraints.md | 4 ++--
@@ -14,7 +9,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com>
14 2 files changed, 3 insertions(+), 4 deletions(-) 9 2 files changed, 3 insertions(+), 4 deletions(-)
15 10
16diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md 11diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md
17index 3f9805dfe0a..91653f36f52 100644 12index fa605831bfe..40cd88a870c 100644
18--- a/gcc/config/microblaze/constraints.md 13--- a/gcc/config/microblaze/constraints.md
19+++ b/gcc/config/microblaze/constraints.md 14+++ b/gcc/config/microblaze/constraints.md
20@@ -53,9 +53,9 @@ 15@@ -53,9 +53,9 @@
@@ -30,7 +25,7 @@ index 3f9805dfe0a..91653f36f52 100644
30 25
31 ;; Define floating point constraints 26 ;; Define floating point constraints
32diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 27diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
33index 85c1ab45994..0ac6e1480e6 100644 28index 9172f1bc209..f41474feca6 100644
34--- a/gcc/config/microblaze/microblaze.md 29--- a/gcc/config/microblaze/microblaze.md
35+++ b/gcc/config/microblaze/microblaze.md 30+++ b/gcc/config/microblaze/microblaze.md
36@@ -1332,8 +1332,7 @@ 31@@ -1332,8 +1332,7 @@
@@ -44,5 +39,5 @@ index 85c1ab45994..0ac6e1480e6 100644
44 addlk\t%0,r0,r0\t 39 addlk\t%0,r0,r0\t
45 addlik\t%0,r0,%1\t #N1 %X1 40 addlik\t%0,r0,%1\t #N1 %X1
46-- 41--
472.37.1 (Apple Git-137.1) 422.34.1
48 43
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0049-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0049-Fix-Compiler-crash-with-freg-struct-return-This-patc.patch
index 6258e799..ca813796 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0049-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0049-Fix-Compiler-crash-with-freg-struct-return-This-patc.patch
@@ -1,26 +1,22 @@
1From d45405d05a1f9079f7db86ba60dcd30d358613d4 Mon Sep 17 00:00:00 2001 1From 8107e0be46e5bdbfc353648ce5129afde5275ea9 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 13 Sep 2022 16:06:10 +0530 3Date: Tue, 13 Sep 2022 16:06:10 +0530
4Subject: [PATCH 49/53] [Patch, microblaze]: Fix Compiler crash with 4Subject: [PATCH 49/54] Fix Compiler crash with -freg-struct-return This patch
5 -freg-struct-return This patch fixes a bug in MB GCC regarding the 5 fixes a bug in MB GCC regarding the passing struct values in registers.
6 passing struct values in registers. Currently we are only handling SImode 6 Currently we are only handling SImode With this patch all other modes are
7 With this patch all other modes are handled properly 7 handled properly
8 8
9 Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 9 Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
10Upstream-Status: Pending
11
12Signed-off-by: Mark Hatle <mark.hatle@amd.com>
13
14--- 10---
15 gcc/config/microblaze/microblaze.cc | 11 ++++++++++- 11 gcc/config/microblaze/microblaze.cc | 11 ++++++++++-
16 gcc/config/microblaze/microblaze.h | 19 ------------------- 12 gcc/config/microblaze/microblaze.h | 19 -------------------
17 2 files changed, 10 insertions(+), 20 deletions(-) 13 2 files changed, 10 insertions(+), 20 deletions(-)
18 14
19diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 15diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
20index 3ee3996a38d..4668a81d060 100644 16index f949a8863d3..4748c8c1f0d 100644
21--- a/gcc/config/microblaze/microblaze.cc 17--- a/gcc/config/microblaze/microblaze.cc
22+++ b/gcc/config/microblaze/microblaze.cc 18+++ b/gcc/config/microblaze/microblaze.cc
23@@ -3909,7 +3909,16 @@ microblaze_function_value (const_tree valtype, 19@@ -3918,7 +3918,16 @@ microblaze_function_value (const_tree valtype,
24 const_tree func ATTRIBUTE_UNUSED, 20 const_tree func ATTRIBUTE_UNUSED,
25 bool outgoing ATTRIBUTE_UNUSED) 21 bool outgoing ATTRIBUTE_UNUSED)
26 { 22 {
@@ -39,7 +35,7 @@ index 3ee3996a38d..4668a81d060 100644
39 35
40 /* Implement TARGET_SCHED_ADJUST_COST. */ 36 /* Implement TARGET_SCHED_ADJUST_COST. */
41diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 37diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
42index c48b6de0d58..730ad87b13b 100644 38index 4d6babfe9c4..eea360fda47 100644
43--- a/gcc/config/microblaze/microblaze.h 39--- a/gcc/config/microblaze/microblaze.h
44+++ b/gcc/config/microblaze/microblaze.h 40+++ b/gcc/config/microblaze/microblaze.h
45@@ -266,13 +266,6 @@ extern enum pipeline_type microblaze_pipe; 41@@ -266,13 +266,6 @@ extern enum pipeline_type microblaze_pipe;
@@ -76,5 +72,5 @@ index c48b6de0d58..730ad87b13b 100644
76 On the MicroBlaze, R2 R3 are the only register thus used. 72 On the MicroBlaze, R2 R3 are the only register thus used.
77 Currently, R2 are only implemented here (C has no complex type) */ 73 Currently, R2 are only implemented here (C has no complex type) */
78-- 74--
792.37.1 (Apple Git-137.1) 752.34.1
80 76
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0050-Add-TARGET_OPTION_OPTIMIZATION-and-disable-fivopts-b.patch
index 8d99c93d..3b8fad81 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0050-Add-TARGET_OPTION_OPTIMIZATION-and-disable-fivopts-b.patch
@@ -1,16 +1,14 @@
1From a64afc59e82703f40d04d4d7126038811a195467 Mon Sep 17 00:00:00 2001 1From b7fb925d6277d11e4014aa1731fc58813e30761f Mon Sep 17 00:00:00 2001
2From: Nagaraju <nmekala@xilinx.com> 2From: Nagaraju <nmekala@xilinx.com>
3Date: Wed, 8 May 2019 14:12:03 +0530 3Date: Wed, 8 May 2019 14:12:03 +0530
4Subject: [PATCH 50/53] [Patch, microblaze]: Add TARGET_OPTION_OPTIMIZATION and 4Subject: [PATCH 50/54] Add TARGET_OPTION_OPTIMIZATION and disable fivopts by
5 disable fivopts by default 5 default
6 6
7Added TARGET_OPTION_OPTIMIZATIONS and Turn off ivopts by default. 7Added TARGET_OPTION_OPTIMIZATIONS and Turn off ivopts by default.
8 8
9 * gcc/common/config/microblaze/microblaze-common.c 9 * gcc/common/config/microblaze/microblaze-common.c
10 (microblaze_option_optimization_table): Disable fivopts by default. 10 (microblaze_option_optimization_table): Disable fivopts by default.
11 11
12Upstream-Status: Pending
13
14Signed-off-by: Nagaraju Mekala <nmekala@xilinx.com> 12Signed-off-by: Nagaraju Mekala <nmekala@xilinx.com>
15 Mahesh Bodapati <mbodapat@xilinx.com> 13 Mahesh Bodapati <mbodapat@xilinx.com>
16Conflicts: 14Conflicts:
@@ -23,7 +21,7 @@ Conflicts:
23 1 file changed, 13 insertions(+) 21 1 file changed, 13 insertions(+)
24 22
25diff --git a/gcc/common/config/microblaze/microblaze-common.cc b/gcc/common/config/microblaze/microblaze-common.cc 23diff --git a/gcc/common/config/microblaze/microblaze-common.cc b/gcc/common/config/microblaze/microblaze-common.cc
26index 21b35f55b92..137332ded25 100644 24index 8750b022447..8a924e8a997 100644
27--- a/gcc/common/config/microblaze/microblaze-common.cc 25--- a/gcc/common/config/microblaze/microblaze-common.cc
28+++ b/gcc/common/config/microblaze/microblaze-common.cc 26+++ b/gcc/common/config/microblaze/microblaze-common.cc
29@@ -24,7 +24,20 @@ 27@@ -24,7 +24,20 @@
@@ -48,5 +46,5 @@ index 21b35f55b92..137332ded25 100644
48+ 46+
49 struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; 47 struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
50-- 48--
512.37.1 (Apple Git-137.1) 492.34.1
52 50
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0051-Patch-microblaze-Reducing-Stack-space-for-arguments.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0051-Reducing-Stack-space-for-arguments.patch
index 64069e3c..648da43a 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0051-Patch-microblaze-Reducing-Stack-space-for-arguments.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0051-Reducing-Stack-space-for-arguments.patch
@@ -1,7 +1,7 @@
1From 09e10c513f8970f4d2402244b7ac69ecd33b4c04 Mon Sep 17 00:00:00 2001 1From a464c0e6070cac9b40b7fe760e25cbd484a615a7 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 13 Sep 2022 16:35:00 +0530 3Date: Tue, 13 Sep 2022 16:35:00 +0530
4Subject: [PATCH 51/53] [Patch, microblaze]: Reducing Stack space for arguments 4Subject: [PATCH 51/54] Reducing Stack space for arguments
5 5
6 Currently in Microblaze target stack space for arguments in register is being 6 Currently in Microblaze target stack space for arguments in register is being
7 allocated even if there are no arguments in the function. 7 allocated even if there are no arguments in the function.
@@ -9,10 +9,6 @@ Subject: [PATCH 51/53] [Patch, microblaze]: Reducing Stack space for arguments
9 9
10 Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 10 Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
11 :Ajit Agarwal <ajitkum@xilinx.com> 11 :Ajit Agarwal <ajitkum@xilinx.com>
12Upstream-Status: Pending
13
14Signed-off-by: Mark Hatle <mark.hatle@amd.com>
15
16--- 12---
17 gcc/config/microblaze/microblaze-protos.h | 1 + 13 gcc/config/microblaze/microblaze-protos.h | 1 +
18 gcc/config/microblaze/microblaze.cc | 130 ++++++++++++++++++++++ 14 gcc/config/microblaze/microblaze.cc | 130 ++++++++++++++++++++++
@@ -20,7 +16,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com>
20 3 files changed, 133 insertions(+), 2 deletions(-) 16 3 files changed, 133 insertions(+), 2 deletions(-)
21 17
22diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h 18diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h
23index 7f575c2adec..bd594699940 100644 19index 0e9f783c4a4..091d8d9a51b 100644
24--- a/gcc/config/microblaze/microblaze-protos.h 20--- a/gcc/config/microblaze/microblaze-protos.h
25+++ b/gcc/config/microblaze/microblaze-protos.h 21+++ b/gcc/config/microblaze/microblaze-protos.h
26@@ -60,6 +60,7 @@ extern int symbol_mentioned_p (rtx); 22@@ -60,6 +60,7 @@ extern int symbol_mentioned_p (rtx);
@@ -32,10 +28,10 @@ index 7f575c2adec..bd594699940 100644
32 28
33 /* Declare functions in microblaze-c.cc. */ 29 /* Declare functions in microblaze-c.cc. */
34diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 30diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
35index 4668a81d060..24ac215b6d5 100644 31index 4748c8c1f0d..e6d3f35370c 100644
36--- a/gcc/config/microblaze/microblaze.cc 32--- a/gcc/config/microblaze/microblaze.cc
37+++ b/gcc/config/microblaze/microblaze.cc 33+++ b/gcc/config/microblaze/microblaze.cc
38@@ -2081,6 +2081,136 @@ microblaze_must_save_register (int regno) 34@@ -2086,6 +2086,136 @@ microblaze_must_save_register (int regno)
39 return 0; 35 return 0;
40 } 36 }
41 37
@@ -173,7 +169,7 @@ index 4668a81d060..24ac215b6d5 100644
173 stack pointer. 169 stack pointer.
174 170
175diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 171diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
176index 730ad87b13b..dfacd080b6d 100644 172index eea360fda47..f23805b1c03 100644
177--- a/gcc/config/microblaze/microblaze.h 173--- a/gcc/config/microblaze/microblaze.h
178+++ b/gcc/config/microblaze/microblaze.h 174+++ b/gcc/config/microblaze/microblaze.h
179@@ -447,9 +447,9 @@ extern struct microblaze_frame_info current_frame_info; 175@@ -447,9 +447,9 @@ extern struct microblaze_frame_info current_frame_info;
@@ -189,5 +185,5 @@ index 730ad87b13b..dfacd080b6d 100644
189 #define STACK_BOUNDARY (TARGET_MB_64 ? 64 : 32) 185 #define STACK_BOUNDARY (TARGET_MB_64 ? 64 : 32)
190 186
191-- 187--
1922.37.1 (Apple Git-137.1) 1882.34.1
193 189
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0052-If-we-use-break_handler-attribute-then-interrupt-vec.patch
index 63feff79..d0474dd9 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0052-If-we-use-break_handler-attribute-then-interrupt-vec.patch
@@ -1,26 +1,21 @@
1From fe2781d189493dc82a3714b48bbc12c6bd5cdfd0 Mon Sep 17 00:00:00 2001 1From b792943436857172e7a39e26a00602c7e6620860 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 13 Sep 2022 16:38:43 +0530 3Date: Tue, 13 Sep 2022 16:38:43 +0530
4Subject: [PATCH 52/53] [Patch,MicroBlaze] : If we use break_handler 4Subject: [PATCH 52/54] If we use break_handler attribute then interrupt vector
5 attribute then interrupt vector call happened to break_handler instead of 5 call happened to break_handler instead of interrupt_handler. this fix will
6 interrupt_handler. this fix will resolve the issue CR-1081780. This 6 resolve the issue CR-1081780. This fix will not change the behavior of
7 fix will not change the behavior of compiler unless there is a usage of 7 compiler unless there is a usage of break_handler attribute. signed-off-by :
8 break_handler attribute. signed-off-by : Mahesh Bodapati 8 Mahesh Bodapati <mbodapat@xilinx.com>
9 <mbodapat@xilinx.com>
10
11Upstream-Status: Pending
12
13Signed-off-by: Mark Hatle <mark.hatle@amd.com>
14 9
15--- 10---
16 gcc/config/microblaze/microblaze.cc | 13 +++++-------- 11 gcc/config/microblaze/microblaze.cc | 13 +++++--------
17 1 file changed, 5 insertions(+), 8 deletions(-) 12 1 file changed, 5 insertions(+), 8 deletions(-)
18 13
19diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc 14diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
20index 24ac215b6d5..66d62f6f909 100644 15index e6d3f35370c..58d091fbed2 100644
21--- a/gcc/config/microblaze/microblaze.cc 16--- a/gcc/config/microblaze/microblaze.cc
22+++ b/gcc/config/microblaze/microblaze.cc 17+++ b/gcc/config/microblaze/microblaze.cc
23@@ -2020,7 +2020,7 @@ microblaze_save_volatiles (tree func) 18@@ -2025,7 +2025,7 @@ microblaze_save_volatiles (tree func)
24 int 19 int
25 microblaze_is_interrupt_variant (void) 20 microblaze_is_interrupt_variant (void)
26 { 21 {
@@ -29,7 +24,7 @@ index 24ac215b6d5..66d62f6f909 100644
29 } 24 }
30 int 25 int
31 microblaze_is_break_handler (void) 26 microblaze_is_break_handler (void)
32@@ -2059,7 +2059,7 @@ microblaze_must_save_register (int regno) 27@@ -2064,7 +2064,7 @@ microblaze_must_save_register (int regno)
33 { 28 {
34 if (df_regs_ever_live_p (regno) 29 if (df_regs_ever_live_p (regno)
35 || regno == MB_ABI_MSR_SAVE_REG 30 || regno == MB_ABI_MSR_SAVE_REG
@@ -38,7 +33,7 @@ index 24ac215b6d5..66d62f6f909 100644
38 && (regno == MB_ABI_ASM_TEMP_REGNUM 33 && (regno == MB_ABI_ASM_TEMP_REGNUM
39 || regno == MB_ABI_EXCEPTION_RETURN_ADDR_REGNUM))) 34 || regno == MB_ABI_EXCEPTION_RETURN_ADDR_REGNUM)))
40 return 1; 35 return 1;
41@@ -2275,9 +2275,6 @@ compute_frame_size (HOST_WIDE_INT size) 36@@ -2280,9 +2280,6 @@ compute_frame_size (HOST_WIDE_INT size)
42 fast_interrupt = 37 fast_interrupt =
43 microblaze_fast_interrupt_function_p (current_function_decl); 38 microblaze_fast_interrupt_function_p (current_function_decl);
44 save_volatiles = microblaze_save_volatiles (current_function_decl); 39 save_volatiles = microblaze_save_volatiles (current_function_decl);
@@ -48,7 +43,7 @@ index 24ac215b6d5..66d62f6f909 100644
48 gp_reg_size = 0; 43 gp_reg_size = 0;
49 mask = 0; 44 mask = 0;
50 var_size = size; 45 var_size = size;
51@@ -3237,7 +3234,7 @@ microblaze_expand_prologue (void) 46@@ -3242,7 +3239,7 @@ microblaze_expand_prologue (void)
52 gen_rtx_PLUS (Pmode, stack_pointer_rtx, 47 gen_rtx_PLUS (Pmode, stack_pointer_rtx,
53 const0_rtx)); 48 const0_rtx));
54 49
@@ -57,7 +52,7 @@ index 24ac215b6d5..66d62f6f909 100644
57 /* Do not optimize in flow analysis. */ 52 /* Do not optimize in flow analysis. */
58 MEM_VOLATILE_P (mem_rtx) = 1; 53 MEM_VOLATILE_P (mem_rtx) = 1;
59 54
60@@ -3348,12 +3345,12 @@ microblaze_expand_epilogue (void) 55@@ -3353,12 +3350,12 @@ microblaze_expand_epilogue (void)
61 a load-use stall cycle :) This is also important to handle alloca. 56 a load-use stall cycle :) This is also important to handle alloca.
62 (See comments for if (frame_pointer_needed) below. */ 57 (See comments for if (frame_pointer_needed) below. */
63 58
@@ -73,5 +68,5 @@ index 24ac215b6d5..66d62f6f909 100644
73 MEM_VOLATILE_P (mem_rtx) = 1; 68 MEM_VOLATILE_P (mem_rtx) = 1;
74 reg_rtx = gen_rtx_REG (Pmode, MB_ABI_SUB_RETURN_ADDR_REGNUM); 69 reg_rtx = gen_rtx_REG (Pmode, MB_ABI_SUB_RETURN_ADDR_REGNUM);
75-- 70--
762.37.1 (Apple Git-137.1) 712.34.1
77 72
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0053-patch-microblaze64-Add-Zero_extended-instructions.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0053-Add-Zero_extended-instructions.patch
index 1552a5e9..52017a9d 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0053-patch-microblaze64-Add-Zero_extended-instructions.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0053-Add-Zero_extended-instructions.patch
@@ -1,7 +1,7 @@
1From 6c2e67237a12cecfd8c0575fd17314d3024943fc Mon Sep 17 00:00:00 2001 1From fbf853f0b9571529dcc72fc53adf4a35abd3e050 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 13 Sep 2022 16:45:41 +0530 3Date: Tue, 13 Sep 2022 16:45:41 +0530
4Subject: [PATCH 53/53] [patch, microblaze64]: Add Zero_extended instructions 4Subject: [PATCH 53/54] Add Zero_extended instructions
5 5
6 Due to latest changes in GCC-10.2 MB64 perforamance has reduced 6 Due to latest changes in GCC-10.2 MB64 perforamance has reduced
7 We have added zero_extended instructions to get rid of left shift 7 We have added zero_extended instructions to get rid of left shift
@@ -9,8 +9,6 @@ Subject: [PATCH 53/53] [patch, microblaze64]: Add Zero_extended instructions
9 9
10 [CR/TSR]: TSR-974519 10 [CR/TSR]: TSR-974519
11 11
12Upstream-Status: Pending
13
14 Signed-off-by: Nagaraju Mekala<nmekala@xilinx.com> 12 Signed-off-by: Nagaraju Mekala<nmekala@xilinx.com>
15 Mahesh Bodapati<mbodapat@xilinx.com> 13 Mahesh Bodapati<mbodapat@xilinx.com>
16--- 14---
@@ -18,7 +16,7 @@ Upstream-Status: Pending
18 1 file changed, 27 insertions(+) 16 1 file changed, 27 insertions(+)
19 17
20diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 18diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
21index 0ac6e1480e6..7a7c70d607b 100644 19index f41474feca6..aff98604db7 100644
22--- a/gcc/config/microblaze/microblaze.md 20--- a/gcc/config/microblaze/microblaze.md
23+++ b/gcc/config/microblaze/microblaze.md 21+++ b/gcc/config/microblaze/microblaze.md
24@@ -1191,6 +1191,33 @@ 22@@ -1191,6 +1191,33 @@
@@ -56,5 +54,5 @@ index 0ac6e1480e6..7a7c70d607b 100644
56 ;; Sign extension 54 ;; Sign extension
57 ;;---------------------------------------------------------------- 55 ;;----------------------------------------------------------------
58-- 56--
592.37.1 (Apple Git-137.1) 572.34.1
60 58
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-13/0054-Fix-failure-with-gcc.c-torture-execute-ashrdi-1.c-Os.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0054-Fix-failure-with-gcc.c-torture-execute-ashrdi-1.c-Os.patch
new file mode 100644
index 00000000..ec8bc0cf
--- /dev/null
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0054-Fix-failure-with-gcc.c-torture-execute-ashrdi-1.c-Os.patch
@@ -0,0 +1,42 @@
1From 79d007fea870a3b8d72faa90238cee2cdfaf5c85 Mon Sep 17 00:00:00 2001
2From: Gopi Kumar Bulusu <gopi@sankhya.com>
3Date: Fri, 28 Jun 2024 12:18:38 +0530
4Subject: [PATCH 54/54] Fix failure with gcc.c-torture/execute/ashrdi-1.c -Os
5 execution test
6
7The following tests fail with -Os option because a shift instruction
8in a branch delay slot gets replaced with multiple instructions when
9the processor has no barrel shifter. This fix addresses the problem
10by marking the responsible instruction pattern as type multi preventing
11it from being placed in a delay slot.
12
13> gcc.c-torture/execute/ashrdi-1.c -Os execution test
14> gcc.c-torture/execute/pr40057.c -Os execution test
15> gcc.c-torture/execute/pr79121.c -Os execution test
16> gcc.c-torture/execute/pr82524.c -Os execution test
17> c-c++-common/torture/vector-compare-1.c -Os execution test
18> gcc.dg/torture/vec-cvt-1.c -Os execution test
19
20These tests pass with this fix.
21
22Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com>
23---
24 gcc/config/microblaze/microblaze.md | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
28index aff98604db7..0e3981390c8 100644
29--- a/gcc/config/microblaze/microblaze.md
30+++ b/gcc/config/microblaze/microblaze.md
31@@ -2286,7 +2286,7 @@ else
32 output_asm_insn ("bneid\t%3,.-4", operands);
33 return "sra\t%0,%0";
34 }
35- [(set_attr "type" "arith")
36+ [(set_attr "type" "multi")
37 (set_attr "mode" "SI")
38 (set_attr "length" "20")]
39 )
40--
412.34.1
42
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/microblaze-mulitlib-hack.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/microblaze-mulitlib-hack.patch
index af8ebf3b..af8ebf3b 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/microblaze-mulitlib-hack.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/microblaze-mulitlib-hack.patch
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-common.inc b/meta-microblaze/recipes-devtools/gcc/gcc-common.inc
deleted file mode 100644
index 5ac82b1b..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-common.inc
+++ /dev/null
@@ -1,118 +0,0 @@
1SUMMARY = "GNU cc and gcc C compilers"
2HOMEPAGE = "http://www.gnu.org/software/gcc/"
3DESCRIPTION = "The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Ada, Go, and D, as well as libraries for these languages (libstdc++,...). GCC was originally written as the compiler for the GNU operating system."
4SECTION = "devel"
5LICENSE = "GPL"
6
7NATIVEDEPS = ""
8
9CVE_PRODUCT = "gcc"
10
11inherit autotools gettext texinfo
12
13BPN = "gcc"
14COMPILERDEP = "virtual/${TARGET_PREFIX}gcc:do_gcc_stash_builddir"
15
16python extract_stashed_builddir () {
17 src = d.expand("${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}")
18 dest = d.getVar("B")
19 oe.path.copyhardlinktree(src, dest)
20 staging_processfixme([src + "/fixmepath"], dest, d.getVar("RECIPE_SYSROOT"), d.getVar("RECIPE_SYSROOT_NATIVE"), d)
21}
22
23def get_gcc_float_setting(bb, d):
24 if d.getVar('ARMPKGSFX_EABI') == "hf" and d.getVar('TRANSLATED_TARGET_ARCH') == "arm":
25 return "--with-float=hard"
26 if d.getVar('TARGET_FPU') in [ 'soft' ]:
27 return "--with-float=soft"
28 if d.getVar('TARGET_FPU') in [ 'ppc-efd' ]:
29 return "--enable-e500_double"
30 return ""
31
32get_gcc_float_setting[vardepvalue] = "${@get_gcc_float_setting(bb, d)}"
33
34def get_gcc_x86_64_arch_setting(bb, d):
35 import re
36 march = re.match(r'^.*-march=([^\s]*)', d.getVar('TUNE_CCARGS'))
37 if march:
38 return "--with-arch=%s " % march.group(1)
39 # The earliest supported x86-64 CPU
40 return "--with-arch=core2"
41
42get_gcc_x86_64_arch_setting[vardepvalue] = "${@get_gcc_x86_64_arch_setting(bb, d)}"
43
44def get_gcc_mips_plt_setting(bb, d):
45 if d.getVar('TRANSLATED_TARGET_ARCH') in [ 'mips', 'mipsel' ] and bb.utils.contains('DISTRO_FEATURES', 'mplt', True, False, d):
46 return "--with-mips-plt"
47 return ""
48
49def get_gcc_ppc_plt_settings(bb, d):
50 if d.getVar('TRANSLATED_TARGET_ARCH') in [ 'powerpc', 'powerpc64' ] and not bb.utils.contains('DISTRO_FEATURES', 'bssplt', True, False, d):
51 return "--enable-secureplt"
52 return ""
53
54def get_gcc_multiarch_setting(bb, d):
55 target_arch = d.getVar('TRANSLATED_TARGET_ARCH')
56 multiarch_options = {
57 "i586": "--enable-targets=all",
58 "i686": "--enable-targets=all",
59 "powerpc": "--enable-targets=powerpc64",
60 "powerpc64le": "--enable-targets=powerpcle",
61 "mips": "--enable-targets=all",
62 "sparc": "--enable-targets=all",
63 }
64
65 if bb.utils.contains('DISTRO_FEATURES', 'multiarch', True, False, d):
66 if target_arch in multiarch_options :
67 return multiarch_options[target_arch]
68 return ""
69
70# this is used by the multilib setup of gcc
71def get_tune_parameters(tune, d):
72 availtunes = d.getVar('AVAILTUNES')
73 if tune not in availtunes.split():
74 bb.error('The tune: %s is not one of the available tunes: %s' % (tune or None, availtunes))
75
76 localdata = bb.data.createCopy(d)
77 override = ':tune-' + tune
78 localdata.setVar('OVERRIDES', localdata.getVar('OVERRIDES', False) + override)
79
80 retdict = {}
81 retdict['tune'] = tune
82 retdict['ccargs'] = localdata.getVar('TUNE_CCARGS')
83 retdict['features'] = localdata.getVar('TUNE_FEATURES')
84 # BASELIB is used by the multilib code to change library paths
85 retdict['baselib'] = localdata.getVar('BASE_LIB') or localdata.getVar('BASELIB')
86 retdict['arch'] = localdata.getVar('TUNE_ARCH')
87 retdict['abiextension'] = localdata.getVar('ABIEXTENSION')
88 retdict['target_fpu'] = localdata.getVar('TARGET_FPU')
89 retdict['pkgarch'] = localdata.getVar('TUNE_PKGARCH')
90 retdict['package_extra_archs'] = localdata.getVar('PACKAGE_EXTRA_ARCHS')
91 return retdict
92
93get_tune_parameters[vardepsexclude] = "AVAILTUNES TUNE_CCARGS OVERRIDES TUNE_FEATURES BASE_LIB BASELIB TUNE_ARCH ABIEXTENSION TARGET_FPU TUNE_PKGARCH PACKAGE_EXTRA_ARCHS"
94
95DEBIANNAME:${MLPREFIX}libgcc = "libgcc1"
96
97MIRRORS =+ "\
98 ${GNU_MIRROR}/gcc https://gcc.gnu.org/pub/gcc/releases/ \
99"
100#
101# Set some default values
102#
103gcclibdir = "${libdir}/gcc"
104BINV = "${PV}"
105#S = "${WORKDIR}/gcc-${PV}"
106S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
107
108B ?= "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
109
110target_includedir ?= "${includedir}"
111target_libdir ?= "${libdir}"
112target_base_libdir ?= "${base_libdir}"
113target_prefix ?= "${prefix}"
114
115# We need to ensure that for the shared work directory, the do_patch signatures match
116# The real WORKDIR location isn't a dependency for the shared workdir.
117src_patches[vardepsexclude] = "WORKDIR"
118should_apply[vardepsexclude] += "PN"
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-configure-common.inc b/meta-microblaze/recipes-devtools/gcc/gcc-configure-common.inc
deleted file mode 100644
index e4cdb73f..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-configure-common.inc
+++ /dev/null
@@ -1,123 +0,0 @@
1require gcc-multilib-config.inc
2require gcc-shared-source.inc
3#
4# Build the list of lanaguages to build.
5#
6# These can be overridden by the version specific .inc file.
7
8# gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran'
9FORTRAN ?= ",f77"
10LANGUAGES ?= "c,c++${FORTRAN}"
11
12EXTRA_OECONF_BASE ?= ""
13EXTRA_OECONF_PATHS ?= ""
14
15GCCMULTILIB ?= "--disable-multilib"
16GCCTHREADS ?= "posix"
17
18GCCPIE ??= ""
19
20SYMVERS_CONF ?= "--enable-symvers=gnu"
21
22EXTRA_OECONF = "\
23 ${@['--enable-clocale=generic', ''][d.getVar('USE_NLS') != 'no']} \
24 --with-gnu-ld \
25 --enable-shared \
26 --enable-languages=${LANGUAGES} \
27 --enable-threads=${GCCTHREADS} \
28 ${GCCMULTILIB} \
29 ${GCCPIE} \
30 --enable-c99 \
31 --enable-long-long \
32 ${SYMVERS_CONF} \
33 --enable-libstdcxx-pch \
34 --program-prefix=${TARGET_PREFIX} \
35 --without-local-prefix \
36 --disable-install-libiberty \
37 ${EXTRA_OECONF_BASE} \
38 ${EXTRA_OECONF_GCC_FLOAT} \
39 ${EXTRA_OECONF_PATHS} \
40 ${@get_gcc_mips_plt_setting(bb, d)} \
41 ${@get_gcc_ppc_plt_settings(bb, d)} \
42 ${@get_gcc_multiarch_setting(bb, d)} \
43 --enable-standard-branch-protection \
44"
45
46# glibc version is a minimum controlling whether features are enabled.
47# Doesn't need to track glibc exactly
48EXTRA_OECONF:append:libc-glibc = " --with-glibc-version=2.28 "
49
50# Set this here since GCC configure won't auto-detect and enable
51# initfini-arry when cross compiling.
52EXTRA_OECONF:append = " --enable-initfini-array"
53
54export gcc_cv_collect2_libs = 'none required'
55# We need to set gcc_cv_collect2_libs else there is cross-compilation badness
56# in the config.log files (which might not get generated until do_compile
57# hence being missed by the insane do_configure check).
58
59EXTRA_OECONF:append:linux = " --enable-__cxa_atexit"
60
61EXTRA_OECONF:append:mips64 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
62EXTRA_OECONF:append:mips64el = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
63EXTRA_OECONF:append:mips64n32 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
64EXTRA_OECONF:append:mips64eln32 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
65EXTRA_OECONF:append:mipsisa32r6el = " --with-abi=32 --with-arch=mips32r6"
66EXTRA_OECONF:append:mipsisa32r6 = " --with-abi=32 --with-arch=mips32r6"
67EXTRA_OECONF:append:mipsisa64r6el = " --with-abi=64 --with-arch-64=mips64r6"
68EXTRA_OECONF:append:mipsisa64r6 = " --with-abi=64 --with-arch-64=mips64r6"
69
70EXTRA_OECONF_GCC_FLOAT ??= ""
71CPPFLAGS = ""
72
73SYSTEMHEADERS = "${target_includedir}"
74SYSTEMLIBS = "${target_base_libdir}/"
75SYSTEMLIBS1 = "${target_libdir}/"
76
77do_configure:prepend () {
78 # teach gcc to find correct target includedir when checking libc ssp support
79 mkdir -p ${B}/gcc
80 echo "NATIVE_SYSTEM_HEADER_DIR = ${SYSTEMHEADERS}" > ${B}/gcc/t-oe
81 cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${B}/gcc/defaults.h.new
82 cat >>${B}/gcc/defaults.h.new <<_EOF
83#define NATIVE_SYSTEM_HEADER_DIR "${SYSTEMHEADERS}"
84#define STANDARD_STARTFILE_PREFIX_1 "${SYSTEMLIBS}"
85#define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}"
86#define SYSTEMLIBS_DIR "${SYSTEMLIBS}"
87#endif /* ! GCC_DEFAULTS_H */
88_EOF
89 mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h
90}
91
92do_configure () {
93 # Setup these vars for cross building only
94 # ... because foo_FOR_TARGET apparently gets misinterpreted inside the
95 # gcc build stuff when the build is producing a cross compiler - i.e.
96 # when the 'current' target is the 'host' system, and the host is not
97 # the target (because the build is actually making a cross compiler!)
98 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
99 export CC_FOR_TARGET="${CC}"
100 export GCC_FOR_TARGET="${CC}"
101 export CXX_FOR_TARGET="${CXX}"
102 export AS_FOR_TARGET="${HOST_PREFIX}as"
103 export LD_FOR_TARGET="${HOST_PREFIX}ld"
104 export NM_FOR_TARGET="${HOST_PREFIX}nm"
105 export AR_FOR_TARGET="${HOST_PREFIX}ar"
106 export GFORTRAN_FOR_TARGET="gfortran"
107 export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
108 fi
109 export CC_FOR_BUILD="${BUILD_CC}"
110 export CXX_FOR_BUILD="${BUILD_CXX}"
111 export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
112 export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
113 export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
114 export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
115 export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}"
116 export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}"
117 export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
118 export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}"
119
120
121 oe_runconf
122}
123
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian.inc
deleted file mode 100644
index ec87b462..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ /dev/null
@@ -1,187 +0,0 @@
1inherit cross-canadian
2
3SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} target)"
4PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
5
6DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc virtual/${HOST_PREFIX}binutils virtual/nativesdk-libc nativesdk-gettext flex-native virtual/libc"
7
8GCCMULTILIB = "--enable-multilib"
9
10require gcc-configure-common.inc
11
12EXTRA_OECONF += "--with-plugin-ld=ld"
13EXTRA_OECONF_PATHS = "\
14 --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
15 --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
16 --with-sysroot=/not/exist \
17 --with-build-sysroot=${STAGING_DIR_TARGET} \
18"
19# We have to point gcc at a sysroot but we don't need to rebuild if this changes
20# e.g. we switch between different machines with different tunes.
21EXTRA_OECONF_PATHS[vardepsexclude] = "TUNE_PKGARCH"
22TARGET_ARCH[vardepsexclude] = "TUNE_ARCH"
23get_gcc_float_setting[vardepvalue] = ""
24
25#
26# gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky
27# for the sdk. Hardcoding the paths ensures the build doesn't go canadian or worse.
28#
29export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
30export AS_FOR_TARGET = "${TARGET_PREFIX}as"
31export DLLTOOL_FOR_TARGET = "${TARGET_PREFIX}dlltool"
32export CC_FOR_TARGET = "${TARGET_PREFIX}gcc"
33export CXX_FOR_TARGET = "${TARGET_PREFIX}g++"
34export GCC_FOR_TARGET = "${TARGET_PREFIX}gcc"
35export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
36export LIPO_FOR_TARGET = "${TARGET_PREFIX}lipo"
37export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
38export OBJDUMP_FOR_TARGET = "${TARGET_PREFIX}objdump"
39export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
40export STRIP_FOR_TARGET = "${TARGET_PREFIX}strip"
41export WINDRES_FOR_TARGET = "${TARGET_PREFIX}windres"
42
43#
44# We need to override this and make sure the compiler can find staging
45#
46export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}"
47
48do_configure () {
49 if [ ! -d ${RECIPE_SYSROOT}/${target_includedir} ]; then
50 mkdir -p ${RECIPE_SYSROOT}/${target_includedir}
51 fi
52 export CC_FOR_BUILD="${BUILD_CC}"
53 export CXX_FOR_BUILD="${BUILD_CXX}"
54 export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
55 export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
56 export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
57 export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
58 export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}"
59 export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}"
60 export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
61 export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}"
62 oe_runconf
63}
64
65do_compile () {
66 oe_runmake all-host configure-target-libgcc
67 (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
68}
69
70PACKAGES = "${PN}-dbg ${PN} ${PN}-doc"
71
72FILES:${PN} = "\
73 ${exec_prefix}/bin/* \
74 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/* \
75 ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
76 ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
77 ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
78 ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
79 ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
80 ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \
81 ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.* \
82 ${libdir}/bfd-plugins/*.so \
83 ${includedir}/c++/${BINV} \
84 ${prefix}/${TARGET_SYS}/bin/* \
85 ${prefix}/${TARGET_SYS}/lib/* \
86 ${prefix}/${TARGET_SYS}${target_includedir}/* \
87"
88INSANE_SKIP:${PN} += "dev-so"
89
90FILES:${PN}-doc = "\
91 ${infodir} \
92 ${mandir} \
93 ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
94"
95
96EXEEXT = ""
97
98# Compute how to get from libexecdir to bindir in python (easier than shell)
99BINRELPATH = "${@os.path.relpath(d.expand("${bindir}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}"
100# linker plugin path
101LIBRELPATH = "${@os.path.relpath(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${libdir}/bfd-plugins"))}"
102
103do_install () {
104 ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h )
105 oe_runmake 'DESTDIR=${D}' install-host
106
107 # Cleanup some of the ${libdir}{,exec}/gcc stuff ...
108 rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
109 rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
110 rm -rf ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
111
112 # We care about g++ not c++
113 rm -f ${D}${bindir}/*c++
114
115 # We don't care about the gcc-<version> copies
116 rm -f ${D}${bindir}/*gcc-${BINV}*
117
118 # Cleanup empty directories which are not shipped
119 # we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted
120 # ${D}${libdir}/../lib only seems to appear with SDKMACHINE=i686
121 local empty_dirs="${D}${libdir}/../lib ${D}${prefix}/${TARGET_SYS}/lib ${D}${prefix}/${TARGET_SYS} ${D}${includedir}"
122 for i in $empty_dirs; do
123 [ -d $i ] && rmdir --ignore-fail-on-non-empty $i
124 done
125
126 # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
127 # found.
128 dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
129 install -d $dest
130 suffix=${EXEEXT}
131 for t in ar as ld ld.bfd ld.gold nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
132 if [ "$t" = "g77" -o "$t" = "gfortran" ] && [ ! -e ${D}${bindir}/${TARGET_PREFIX}$t$suffix ]; then
133 continue
134 fi
135
136 ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t$suffix $dest$t$suffix
137 done
138
139 # libquadmath headers need to be available in the gcc libexec dir
140 install -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
141 cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
142 cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
143
144 # install LTO linker plugins where binutils tools can find it
145 install -d ${D}${libdir}/bfd-plugins
146 ln -sf ${LIBRELPATH}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so
147
148 chown -R root:root ${D}
149
150 cross_canadian_bindirlinks
151
152 for i in linux ${CANADIANEXTRAOS}
153 do
154 for v in ${CANADIANEXTRAVENDOR}
155 do
156 d=${D}${bindir}/../${TARGET_ARCH}$v-$i
157 install -d $d
158 for j in ${TARGET_PREFIX}gcc${EXEEXT} ${TARGET_PREFIX}g++${EXEEXT}
159 do
160 p=${TARGET_ARCH}$v-$i-`echo $j | sed -e s,${TARGET_PREFIX},,`
161 case $i in
162 *musl*)
163 rm -rf $d/$p
164 echo "#!/usr/bin/env sh" > $d/$p
165 echo "exec \`dirname \$0\`/../${TARGET_SYS}/$j -mmusl \$@" >> $d/$p
166 chmod 0755 $d/$p
167 ;;
168 *)
169 ;;
170 esac
171 done
172 done
173 done
174}
175
176ELFUTILS = "nativesdk-elfutils"
177DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} nativesdk-zlib nativesdk-zstd"
178RDEPENDS:${PN} += "nativesdk-mpfr nativesdk-libmpc ${ELFUTILS}"
179
180SYSTEMHEADERS = "${target_includedir}/"
181SYSTEMLIBS = "${target_base_libdir}/"
182SYSTEMLIBS1 = "${target_libdir}/"
183
184EXTRA_OECONF += "--enable-poison-system-directories"
185
186# gcc 4.7 needs -isystem
187export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET} -isystem=${target_includedir}"
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_12.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_12.2.bb
deleted file mode 100644
index bf53c5cd..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_12.2.bb
+++ /dev/null
@@ -1,5 +0,0 @@
1require recipes-devtools/gcc/gcc-${PV}.inc
2require gcc-cross-canadian.inc
3
4
5
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_13.%.bbappend
deleted file mode 100644
index d1df2061..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_13.%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require microblaze-block.inc
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-cross.inc b/meta-microblaze/recipes-devtools/gcc/gcc-cross.inc
deleted file mode 100644
index a540fb24..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-cross.inc
+++ /dev/null
@@ -1,163 +0,0 @@
1inherit cross
2
3INHIBIT_DEFAULT_DEPS = "1"
4EXTRADEPENDS = ""
5DEPENDS = "virtual/${TARGET_PREFIX}binutils ${EXTRADEPENDS} ${NATIVEDEPS}"
6PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
7python () {
8 if d.getVar("TARGET_OS").startswith("linux"):
9 d.setVar("EXTRADEPENDS", "linux-libc-headers")
10}
11
12PN = "gcc-cross-${TARGET_ARCH}"
13
14# Ignore how TARGET_ARCH is computed.
15TARGET_ARCH[vardepvalue] = "${TARGET_ARCH}"
16
17require gcc-configure-common.inc
18
19# While we want the 'gnu' hash style, we explicitly set it to sysv here to
20# ensure that any recipe which doesn't obey our LDFLAGS (which also set it to
21# gnu) will hit a QA failure.
22LINKER_HASH_STYLE ?= "sysv"
23
24EXTRA_OECONF += "--enable-poison-system-directories=error"
25EXTRA_OECONF:append:sh4 = " \
26 --with-multilib-list= \
27 --enable-incomplete-targets \
28"
29
30EXTRA_OECONF += "\
31 --with-system-zlib \
32"
33
34EXTRA_OECONF:append:libc-baremetal = " --without-headers"
35EXTRA_OECONF:remove:libc-baremetal = "--enable-threads=posix"
36EXTRA_OECONF:remove:libc-newlib = "--enable-threads=posix"
37
38EXTRA_OECONF_PATHS = "\
39 --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
40 --with-sysroot=/not/exist \
41 --with-build-sysroot=${STAGING_DIR_TARGET} \
42"
43
44ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
45
46
47do_configure:prepend () {
48 install -d ${RECIPE_SYSROOT}${target_includedir}
49 touch ${RECIPE_SYSROOT}${target_includedir}/limits.h
50}
51
52do_compile () {
53 export CC="${BUILD_CC}"
54 export AR_FOR_TARGET="${TARGET_SYS}-ar"
55 export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
56 export LD_FOR_TARGET="${TARGET_SYS}-ld"
57 export NM_FOR_TARGET="${TARGET_SYS}-nm"
58 export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc"
59 export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}"
60 export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}"
61 export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
62 export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}"
63
64 # Prevent native/host sysroot path from being used in configargs.h header,
65 # as it will be rewritten when used by other sysroots preventing support
66 # for gcc plugins
67 oe_runmake configure-gcc
68 sed -i 's@${STAGING_DIR_TARGET}@/host@g' ${B}/gcc/configargs.h
69 sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/configargs.h
70
71 # Prevent sysroot/workdir paths from being used in checksum-options.
72 # checksum-options is used to generate a checksum which is embedded into
73 # the output binary.
74 oe_runmake TARGET-gcc=checksum-options all-gcc
75 sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options
76 sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/checksum-options
77
78 oe_runmake all-host configure-target-libgcc
79 (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
80}
81
82INHIBIT_PACKAGE_STRIP = "1"
83
84# Compute how to get from libexecdir to bindir in python (easier than shell)
85BINRELPATH = "${@os.path.relpath(d.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}"
86# linker plugin path
87LIBRELPATH = "${@os.path.relpath(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/bfd-plugins"))}"
88
89do_install () {
90 ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h )
91 oe_runmake 'DESTDIR=${D}' install-host
92
93 install -d ${D}${target_base_libdir}
94 install -d ${D}${target_libdir}
95
96 # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
97 # gfortran is fully backwards compatible. This is a safe and practical solution.
98 if [ -n "${@d.getVar('FORTRAN')}" ]; then
99 ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true
100 fortsymlinks="g77 gfortran"
101 fi
102
103 # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
104 # found. These need to be relative paths so they work in different locations.
105 dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
106 install -d $dest
107 for t in ar as ld ld.bfd ld.gold nm objcopy objdump ranlib strip gcc cpp $fortsymlinks; do
108 ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
109 ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t
110 done
111
112 # Remove things we don't need but keep share/java
113 for d in info man share/doc share/locale share/man share/info; do
114 rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/$d
115 done
116
117 # libquadmath headers need to be available in the gcc libexec dir
118 install -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
119 cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
120 cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
121
122 find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f
123
124 # install LTO linker plugins where binutils tools can find it
125 install -d ${D}${libdir}/bfd-plugins
126 ln -sf ${LIBRELPATH}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so
127}
128
129do_package[noexec] = "1"
130do_packagedata[noexec] = "1"
131do_package_write_ipk[noexec] = "1"
132do_package_write_rpm[noexec] = "1"
133do_package_write_deb[noexec] = "1"
134
135inherit chrpath
136
137python gcc_stash_builddir_fixrpaths() {
138 # rewrite rpaths, breaking hardlinks as required
139 process_dir("/", d.getVar("BUILDDIRSTASH"), d, break_hardlinks = True)
140}
141
142BUILDDIRSTASH = "${WORKDIR}/stashed-builddir/build"
143do_gcc_stash_builddir[dirs] = "${B}"
144do_gcc_stash_builddir[cleandirs] = "${BUILDDIRSTASH}"
145do_gcc_stash_builddir[postfuncs] += "gcc_stash_builddir_fixrpaths"
146do_gcc_stash_builddir () {
147 dest=${BUILDDIRSTASH}
148 hardlinkdir . $dest
149 # Makefile does move-if-change which can end up with 'timestamp' as file contents so break links to those files
150 rm $dest/gcc/include/*.h
151 cp gcc/include/*.h $dest/gcc/include/
152 sysroot-relativelinks.py $dest
153}
154addtask do_gcc_stash_builddir after do_compile before do_install
155SSTATETASKS += "do_gcc_stash_builddir"
156do_gcc_stash_builddir[sstate-inputdirs] = "${BUILDDIRSTASH}"
157do_gcc_stash_builddir[sstate-outputdirs] = "${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}"
158do_gcc_stash_builddir[sstate-fixmedir] = "${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}"
159
160python do_gcc_stash_builddir_setscene () {
161 sstate_setscene(d)
162}
163addtask do_gcc_stash_builddir_setscene
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-cross_12.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc-cross_12.2.bb
deleted file mode 100644
index b43cca0c..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-cross_12.2.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require recipes-devtools/gcc/gcc-${PV}.inc
2require gcc-cross.inc
3
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-cross_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-cross_13.%.bbappend
deleted file mode 100644
index d1df2061..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-cross_13.%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require microblaze-block.inc
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk.inc b/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk.inc
deleted file mode 100644
index bd65b1fe..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk.inc
+++ /dev/null
@@ -1,12 +0,0 @@
1inherit crosssdk
2
3PN = "gcc-crosssdk-${SDK_SYS}"
4
5SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
6SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
7SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
8
9GCCMULTILIB = "--disable-multilib"
10
11DEPENDS = "virtual/${TARGET_PREFIX}binutils gettext-native ${NATIVEDEPS}"
12PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_12.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_12.2.bb
deleted file mode 100644
index 40a6c4fe..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_12.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
1require recipes-devtools/gcc/gcc-cross_${PV}.bb
2require gcc-crosssdk.inc
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_13.%.bbappend
deleted file mode 100644
index d1df2061..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_13.%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require microblaze-block.inc
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-multilib-config.inc b/meta-microblaze/recipes-devtools/gcc/gcc-multilib-config.inc
deleted file mode 100644
index 2dbbc23c..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-multilib-config.inc
+++ /dev/null
@@ -1,249 +0,0 @@
1# following code modifies these definitions in the gcc config
2# MULTILIB_OPTIONS
3# MULTILIB_DIRNAMES
4# MULTILIB_OSDIRNAMES
5# GLIBC_DYNAMIC_LINKER32
6# GLIBC_DYNAMIC_LINKER64
7# GLIBC_DYNAMIC_LINKERX32
8# GLIBC_DYNAMIC_LINKERN32
9# For more information on use of these variables look at these files in the gcc source code
10# gcc/config/i386/t-linux64
11# gcc/config/mips/t-linux64
12# gcc/config/rs6000/t-linux64
13# gcc/config/i386/linux64.h
14# gcc/config/mips/linux64.h
15# gcc/config/rs6000/linux64.h
16
17MULTILIB_OPTION_WHITELIST ??= "-m32 -m64 -mx32 -mabi=n32 -mabi=32 -mabi=64"
18
19python gcc_multilib_setup() {
20 import re
21 import shutil
22 import glob
23
24 srcdir = d.getVar('S')
25 builddir = d.getVar('B')
26 src_conf_dir = '%s/gcc/config' % srcdir
27 build_conf_dir = '%s/gcc/config' % builddir
28
29 bb.utils.remove(build_conf_dir, True)
30 ml_globs = ('%s/*/t-linux64' % src_conf_dir,
31 '%s/*/linux64.h' % src_conf_dir,
32 '%s/aarch64/t-aarch64' % src_conf_dir,
33 '%s/aarch64/aarch64.h' % src_conf_dir,
34 '%s/aarch64/aarch64-linux.h' % src_conf_dir,
35 '%s/aarch64/aarch64-cores.def' % src_conf_dir,
36 '%s/arm/linux-eabi.h' % src_conf_dir,
37 '%s/*/linux.h' % src_conf_dir,
38 '%s/linux.h' % src_conf_dir)
39
40 # copy the target multilib config files to ${B}
41 for ml_glob in ml_globs:
42 for fn in glob.glob(ml_glob):
43 rel_path = os.path.relpath(fn, src_conf_dir)
44 parent_dir = os.path.dirname(rel_path)
45 bb.utils.mkdirhier('%s/%s' % (build_conf_dir, parent_dir))
46 bb.utils.copyfile(fn, '%s/%s' % (build_conf_dir, rel_path))
47
48 pn = d.getVar('PN')
49 multilibs = (d.getVar('MULTILIB_VARIANTS') or '').split()
50 if not multilibs and pn != "nativesdk-gcc":
51 return
52
53 mlprefix = d.getVar('MLPREFIX')
54
55 if ('%sgcc' % mlprefix) != pn and (not pn.startswith('gcc-cross-canadian')) and pn != "nativesdk-gcc":
56 return
57
58
59 def write_config(root, files, options, dirnames, osdirnames):
60 for ml_conf_file in files:
61 with open(root + '/' + ml_conf_file, 'r') as f:
62 filelines = f.readlines()
63 # recreate multilib configuration variables
64 substs = [
65 (r'^(\s*(MULTILIB_OPTIONS\s*=).*)$', r'\2 %s' % '/'.join(options)),
66 (r'^(\s*MULTILIB_OPTIONS\s*\+=.*)$', ''),
67 (r'^(\s*(MULTILIB_DIRNAMES\s*=).*)$', r'\2 %s' % ' '.join(dirnames)),
68 (r'^(\s*MULTILIB_DIRNAMES\s*\+=.*)$', ''),
69 (r'^(\s*(MULTILIB_OSDIRNAMES\s*=).*)$', r'\2 %s' % ' '.join(osdirnames)),
70 (r'^(\s*MULTILIB_OSDIRNAMES\s*\+=.*)$', ''),
71 ]
72
73 for (i, line) in enumerate(filelines):
74 for subst in substs:
75 line = re.sub(subst[0], subst[1], line)
76 filelines[i] = line
77
78 with open(root + '/' + ml_conf_file, 'w') as f:
79 f.write(''.join(filelines))
80
81 def write_headers(root, files, libdir32, libdir64, libdirx32, libdirn32):
82 def wrap_libdir(libdir):
83 if libdir.find('SYSTEMLIBS_DIR') != -1:
84 return '"%r"'
85 else:
86 return '"/%s/"' % libdir
87
88 for ml_conf_file in files:
89 fn = root + '/' + ml_conf_file
90 if not os.path.exists(fn):
91 continue
92 with open(fn, 'r') as f:
93 filelines = f.readlines()
94
95 # replace lines like
96 # #define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
97 # by
98 # #define GLIBC_DYNAMIC_LINKER32 "/lib/" "ld-linux.so.2"
99 # this is needed to put the correct dynamic loader path in the generated binaries
100 substs = [
101 (r'^(#define\s*GLIBC_DYNAMIC_LINKER32\s*)(\S+)(\s*\".*\")$',
102 r'\1' + wrap_libdir(libdir32) + r'\3'),
103 (r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*)(\S+)(\s*\"\S+\")$',
104 r'\1' + wrap_libdir(libdir64) + r'\3'),
105 (r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*\"\S+\"\s*)(\S+)(\s*\"\S+\"\s*)(\S+)(\s*\".*\")$',
106 r'\1' + wrap_libdir(libdir64) + r'\3' + wrap_libdir(libdir64) + r'\5'),
107 (r'^(#define\s*GLIBC_DYNAMIC_LINKER\b\s*)(\S+)(\s*\".*\")$',
108 r'\1' + wrap_libdir(libdir32) + r'\3'),
109 (r'^(#define\s*GLIBC_DYNAMIC_LINKERX32\s*)(\S+)(\s*\".*\")$',
110 r'\1' + wrap_libdir(libdirx32) + r'\3'),
111 (r'^(#define\s*GLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$',
112 r'\1' + wrap_libdir(libdirn32) + r'\3'),
113 (r'^(#define\s*UCLIBC_DYNAMIC_LINKER32\s*)(\S+)(\s*\".*\")$',
114 r'\1' + wrap_libdir(libdir32) + r'\3'),
115 (r'^(#define\s*UCLIBC_DYNAMIC_LINKER64\s*)(\S+)(\s*\".*\")$',
116 r'\1' + wrap_libdir(libdir64) + r'\3'),
117 (r'^(#define\s*UCLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$',
118 r'\1' + wrap_libdir(libdirn32) + r'\3'),
119 (r'^(#define\s*UCLIBC_DYNAMIC_LINKERX32\s*)(\S+)(\s*\".*\")$',
120 r'\1' + wrap_libdir(libdirx32) + r'\3'),
121 (r'^(#define\s*UCLIBC_DYNAMIC_LINKER\b\s*)(\S+)(\s*\".*\")$',
122 r'\1' + wrap_libdir(libdir32) + r'\3'),
123 (r'^(#define\s*MUSL_DYNAMIC_LINKER32\s*)(\S+)(\s*\".*\")$',
124 r'\1' + wrap_libdir(libdir32) + r'\3'),
125 (r'^(#define\s*MUSL_DYNAMIC_LINKER64\s*)(\S+)(\s*\".*\")$',
126 r'\1' + wrap_libdir(libdir64) + r'\3'),
127 (r'^(#define\s*MUSL_DYNAMIC_LINKERX32\s*)(\S+)(\s*\".*\")$',
128 r'\1' + wrap_libdir(libdirx32) + r'\3'),
129 (r'^(#define\s*MUSL_DYNAMIC_LINKER\b\s*)(\S+)(\s*\".*\")$',
130 r'\1' + wrap_libdir(libdir32) + r'\3'),
131 ]
132
133 for (i, line) in enumerate(filelines):
134 for subst in substs:
135 line = re.sub(subst[0], subst[1], line)
136 filelines[i] = line
137
138 with open(root + '/' + ml_conf_file, 'w') as f:
139 f.write(''.join(filelines))
140
141
142 gcc_target_config_files = {
143 'x86_64' : ['gcc/config/i386/t-linux64'],
144 'i586' : ['gcc/config/i386/t-linux64'],
145 'i686' : ['gcc/config/i386/t-linux64'],
146 'mips' : ['gcc/config/mips/t-linux64'],
147 'mips64' : ['gcc/config/mips/t-linux64'],
148 'powerpc' : ['gcc/config/rs6000/t-linux64'],
149 'powerpc64' : ['gcc/config/rs6000/t-linux64'],
150 'aarch64' : ['gcc/config/aarch64/t-aarch64'],
151 'arm' : ['gcc/config/aarch64/t-aarch64'],
152 }
153
154 gcc_header_config_files = {
155 'x86_64' : ['gcc/config/linux.h', 'gcc/config/i386/linux.h', 'gcc/config/i386/linux64.h'],
156 'i586' : ['gcc/config/linux.h', 'gcc/config/i386/linux.h', 'gcc/config/i386/linux64.h'],
157 'i686' : ['gcc/config/linux.h', 'gcc/config/i386/linux.h', 'gcc/config/i386/linux64.h'],
158 'mips' : ['gcc/config/linux.h', 'gcc/config/mips/linux.h', 'gcc/config/mips/linux64.h'],
159 'mips64' : ['gcc/config/linux.h', 'gcc/config/mips/linux.h', 'gcc/config/mips/linux64.h'],
160 'powerpc' : ['gcc/config/linux.h', 'gcc/config/rs6000/linux64.h'],
161 'powerpc64' : ['gcc/config/linux.h', 'gcc/config/rs6000/linux64.h'],
162 'aarch64' : ['gcc/config/linux.h', 'gcc/config/aarch64/aarch64-linux.h', 'gcc/config/arm/linux-eabi.h'],
163 'arm' : ['gcc/config/linux.h', 'gcc/config/aarch64/aarch64-linux.h', 'gcc/config/arm/linux-eabi.h'],
164 }
165
166 libdir32 = 'SYSTEMLIBS_DIR'
167 libdir64 = 'SYSTEMLIBS_DIR'
168 libdirx32 = 'SYSTEMLIBS_DIR'
169 libdirn32 = 'SYSTEMLIBS_DIR'
170
171
172 target_arch = (d.getVar('TARGET_ARCH_MULTILIB_ORIGINAL') if mlprefix
173 else d.getVar('TARGET_ARCH'))
174 if pn == "nativesdk-gcc":
175 header_config_files = gcc_header_config_files[d.getVar("SDK_ARCH")]
176 write_headers(builddir, header_config_files, libdir32, libdir64, libdirx32, libdirn32)
177 return
178
179 if target_arch not in gcc_target_config_files:
180 bb.warn('gcc multilib setup is not supported for TARGET_ARCH=' + target_arch)
181 return
182
183 target_config_files = gcc_target_config_files[target_arch]
184 header_config_files = gcc_header_config_files[target_arch]
185
186 ml_list = ['DEFAULTTUNE_MULTILIB_ORIGINAL' if mlprefix else 'DEFAULTTUNE']
187 mltunes = [('DEFAULTTUNE:virtclass-multilib-%s' % ml) for ml in multilibs]
188 if mlprefix:
189 mlindex = 0
190 for ml in multilibs:
191 if mlprefix == ml + '-':
192 break
193 mlindex += 1
194
195 ml_list.extend(mltunes[:mlindex] + ['DEFAULTTUNE'] + mltunes[(mlindex + 1):])
196 else:
197 ml_list.extend(mltunes)
198
199 options = []
200 dirnames = []
201 osdirnames = []
202 optsets = []
203
204 for ml in ml_list:
205 tune = d.getVar(ml)
206 if not tune:
207 bb.warn("%s doesn't have a corresponding tune. Skipping..." % ml)
208 continue
209 tune_parameters = get_tune_parameters(tune, d)
210
211 tune_baselib = tune_parameters['baselib']
212 if not tune_baselib:
213 bb.warn("Tune %s doesn't have a baselib set. Skipping..." % tune)
214 continue
215
216 if tune_baselib == 'lib64':
217 libdir64 = tune_baselib
218 elif tune_baselib == 'libx32':
219 libdirx32 = tune_baselib
220 elif tune_baselib == 'lib32':
221 libdirn32 = tune_baselib
222 elif tune_baselib == 'lib':
223 libdir32 = tune_baselib
224 else:
225 bb.error('Unknown libdir (%s) of the tune : %s' % (tune_baselib, tune))
226
227 # take out '-' mcpu='s and march='s from parameters
228 opts = []
229 whitelist = (d.getVar("MULTILIB_OPTION_WHITELIST") or "").split()
230 for i in d.expand(tune_parameters['ccargs']).split():
231 if i in whitelist:
232 # Need to strip '-' from option
233 opts.append(i[1:])
234 options.append(" ".join(opts))
235
236 if tune_baselib == 'lib':
237 dirnames.append('32') # /lib => 32bit lib
238 else:
239 dirnames.append(tune_baselib.replace('lib', ''))
240 osdirnames.append('../' + tune_baselib)
241
242 write_config(builddir, target_config_files, options, dirnames, osdirnames)
243 write_headers(builddir, header_config_files, libdir32, libdir64, libdirx32, libdirn32)
244}
245
246gcc_multilib_setup[cleandirs] = "${B}/gcc/config"
247gcc_multilib_setup[vardepsexclude] = "SDK_ARCH"
248
249EXTRACONFFUNCS += "gcc_multilib_setup"
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-runtime.inc b/meta-microblaze/recipes-devtools/gcc/gcc-runtime.inc
deleted file mode 100644
index 8bb58631..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-runtime.inc
+++ /dev/null
@@ -1,310 +0,0 @@
1require gcc-configure-common.inc
2
3SUMMARY = "Runtime libraries from GCC"
4
5# Over-ride the LICENSE set by gcc-${PV}.inc to remove "& GPLv3"
6# All gcc-runtime packages are now covered by the runtime exception.
7LICENSE = "GPL-3.0-with-GCC-exception"
8
9CXXFLAGS:remove = "-fvisibility-inlines-hidden"
10
11EXTRA_OECONF_PATHS = "\
12 --with-gxx-include-dir=${includedir}/c++/${BINV} \
13 --with-sysroot=/not/exist \
14 --with-build-sysroot=${STAGING_DIR_TARGET} \
15"
16
17EXTRA_OECONF:append:linuxstdbase = " --enable-clocale=gnu"
18EXTRA_OECONF:append = " --cache-file=${B}/config.cache"
19EXTRA_OECONF:append:libc-newlib = " --with-newlib --with-target-subdir"
20EXTRA_OECONF:append:libc-baremetal = " --with-target-subdir"
21
22# Disable ifuncs for libatomic on arm conflicts -march/-mcpu
23EXTRA_OECONF:append:arm = " libat_cv_have_ifunc=no "
24EXTRA_OECONF:append:armeb = " libat_cv_have_ifunc=no "
25
26DISABLE_STATIC:class-nativesdk ?= ""
27
28# Newlib does not support symbol versioning on libsdtcc++
29SYMVERS_CONF:libc-newlib = ""
30
31# Building with thumb enabled on armv6t fails
32ARM_INSTRUCTION_SET:armv6 = "arm"
33
34RUNTIMELIBITM = "libitm"
35RUNTIMELIBITM:arc = ""
36RUNTIMELIBITM:mipsarch = ""
37RUNTIMELIBITM:nios2 = ""
38RUNTIMELIBITM:microblaze = ""
39RUNTIMELIBITM:riscv32 = ""
40RUNTIMELIBITM:riscv64 = ""
41RUNTIMELIBITM:loongarch64 = ""
42RUNTIMELIBSSP ?= ""
43RUNTIMELIBSSP:mingw32 ?= "libssp"
44
45RUNTIMETARGET = "${RUNTIMELIBSSP} libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \
46 ${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \
47"
48# Only build libstdc++ for newlib
49RUNTIMETARGET:libc-newlib = "libstdc++-v3"
50
51# libiberty
52# libgfortran needs separate recipe due to libquadmath dependency
53
54do_configure () {
55 export CXX="${CXX} -nostdinc++ -L${WORKDIR}/dummylib"
56 # libstdc++ isn't built yet so CXX would error not able to find it which breaks stdc++'s configure
57 # tests. Create a dummy empty lib for the purposes of configure.
58 mkdir -p ${WORKDIR}/dummylib
59 ${CC} -x c /dev/null -c -o ${WORKDIR}/dummylib/dummylib.o
60 ${AR} rcs ${WORKDIR}/dummylib/libstdc++.a ${WORKDIR}/dummylib/dummylib.o
61 for d in libgcc ${RUNTIMETARGET}; do
62 echo "Configuring $d"
63 rm -rf ${B}/${TARGET_SYS}/$d/
64 mkdir -p ${B}/${TARGET_SYS}/$d/
65 cd ${B}/${TARGET_SYS}/$d/
66 chmod a+x ${S}/$d/configure
67 ${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
68 if [ "$d" = "libgcc" ]; then
69 (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
70 fi
71 done
72}
73EXTRACONFFUNCS += "extract_stashed_builddir"
74do_configure[depends] += "${COMPILERDEP}"
75
76do_compile () {
77 for d in libgcc ${RUNTIMETARGET}; do
78 cd ${B}/${TARGET_SYS}/$d/
79 oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/
80 done
81}
82
83do_install () {
84 for d in ${RUNTIMETARGET}; do
85 cd ${B}/${TARGET_SYS}/$d/
86 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install
87 done
88 if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then
89 install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include
90 mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include
91 rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include
92 fi
93 rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
94 rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir
95 rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir
96 if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then
97 rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
98 fi
99 if [ -d ${D}${infodir} ]; then
100 rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
101 fi
102}
103
104do_install:append:class-target () {
105 if [ "${TARGET_OS}" = "linux-gnuspe" ]; then
106 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
107 fi
108
109 if [ "${TARGET_OS}" = "linux-gnun32" ]; then
110 if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
111 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux
112 ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/32
113 elif [ "${MULTILIB_VARIANTS}" != "" ]; then
114 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
115 ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32
116 else
117 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
118 fi
119 elif [ "${TARGET_OS}" = "linux-gnux32" ]; then
120 if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
121 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux
122 ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/x32
123 elif [ "${MULTILIB_VARIANTS}" != "" ]; then
124 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
125 ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32
126 else
127 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
128 fi
129 elif [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
130 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}
131 ln -s ../${TARGET_SYS}/bits ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/bits
132 ln -s ../${TARGET_SYS}/ext ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/ext
133 fi
134
135 if [ "${TARGET_ARCH}" == "x86_64" -a "${MULTILIB_VARIANTS}" != "" ];then
136 ln -sf ../${X86ARCH32}${TARGET_VENDOR}-${TARGET_OS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}/32
137 fi
138
139 if [ "${TCLIBC}" != "glibc" ]; then
140 case "${TARGET_OS}" in
141 "linux-musl" | "linux-*spe") extra_target_os="linux";;
142 "linux-musleabi") extra_target_os="linux-gnueabi";;
143 *) extra_target_os="linux";;
144 esac
145 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
146 fi
147 chown -R root:root ${D}
148}
149
150INHIBIT_DEFAULT_DEPS = "1"
151DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc virtual/${MLPREFIX}libc"
152PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
153
154#BBCLASSEXTEND = "nativesdk"
155
156PACKAGES = "\
157 ${PN}-dbg \
158 libstdc++ \
159 libstdc++-precompile-dev \
160 libstdc++-dev \
161 libstdc++-staticdev \
162 libg2c \
163 libg2c-dev \
164 libssp \
165 libssp-dev \
166 libssp-staticdev \
167 libquadmath \
168 libquadmath-dev \
169 libquadmath-staticdev \
170 libgomp \
171 libgomp-dev \
172 libgomp-staticdev \
173 libatomic \
174 libatomic-dev \
175 libatomic-staticdev \
176 libitm \
177 libitm-dev \
178 libitm-staticdev \
179"
180# The base package doesn't exist, so we clear the recommends.
181RRECOMMENDS:${PN}-dbg = ""
182
183# include python debugging scripts
184FILES:${PN}-dbg += "\
185 ${libdir}/libstdc++.*-gdb.py \
186 ${datadir}/gcc-${BINV}/python/libstdcxx \
187"
188
189FILES:libg2c = "${target_libdir}/libg2c.so.*"
190SUMMARY:libg2c = "Companion runtime library for g77"
191FILES:libg2c-dev = "\
192 ${libdir}/libg2c.so \
193 ${libdir}/libg2c.a \
194 ${libdir}/libfrtbegin.a \
195"
196SUMMARY:libg2c-dev = "Companion runtime library for g77 - development files"
197
198FILES:libstdc++ = "${libdir}/libstdc++.so.*"
199SUMMARY:libstdc++ = "GNU standard C++ library"
200FILES:libstdc++-dev = "\
201 ${includedir}/c++/ \
202 ${libdir}/libstdc++.so \
203 ${libdir}/libstdc++*.la \
204 ${libdir}/libsupc++.la \
205"
206SUMMARY:libstdc++-dev = "GNU standard C++ library - development files"
207FILES:libstdc++-staticdev = "\
208 ${libdir}/libstdc++*.a \
209 ${libdir}/libsupc++.a \
210"
211SUMMARY:libstdc++-staticdev = "GNU standard C++ library - static development files"
212
213FILES:libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
214SUMMARY:libstdc++-precompile-dev = "GNU standard C++ library - precompiled header files"
215
216FILES:libssp = "${libdir}/libssp.so.*"
217SUMMARY:libssp = "GNU stack smashing protection library"
218FILES:libssp-dev = "\
219 ${libdir}/libssp*.so \
220 ${libdir}/libssp*_nonshared.a \
221 ${libdir}/libssp*.la \
222 ${libdir}/${TARGET_SYS}/${BINV}/include/ssp \
223"
224SUMMARY:libssp-dev = "GNU stack smashing protection library - development files"
225FILES:libssp-staticdev = "${libdir}/libssp*.a"
226SUMMARY:libssp-staticdev = "GNU stack smashing protection library - static development files"
227
228FILES:libquadmath = "${libdir}/libquadmath*.so.*"
229SUMMARY:libquadmath = "GNU quad-precision math library"
230FILES:libquadmath-dev = "\
231 ${libdir}/${TARGET_SYS}/${BINV}/include/quadmath* \
232 ${libdir}/libquadmath*.so \
233 ${libdir}/libquadmath.la \
234"
235SUMMARY:libquadmath-dev = "GNU quad-precision math library - development files"
236FILES:libquadmath-staticdev = "${libdir}/libquadmath.a"
237SUMMARY:libquadmath-staticdev = "GNU quad-precision math library - static development files"
238
239FILES:libgomp = "${libdir}/libgomp*${SOLIBS}"
240SUMMARY:libgomp = "GNU OpenMP parallel programming library"
241FILES:libgomp-dev = "\
242 ${libdir}/libgomp*${SOLIBSDEV} \
243 ${libdir}/libgomp*.la \
244 ${libdir}/libgomp.spec \
245 ${libdir}/${TARGET_SYS}/${BINV}/include/acc_prof.h \
246 ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \
247 ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \
248"
249SUMMARY:libgomp-dev = "GNU OpenMP parallel programming library - development files"
250FILES:libgomp-staticdev = "${libdir}/libgomp*.a"
251SUMMARY:libgomp-staticdev = "GNU OpenMP parallel programming library - static development files"
252
253FILES:libatomic = "${libdir}/libatomic.so.*"
254SUMMARY:libatomic = "GNU C++11 atomics support library"
255FILES:libatomic-dev = "\
256 ${libdir}/libatomic.so \
257 ${libdir}/libatomic.la \
258"
259SUMMARY:libatomic-dev = "GNU C++11 atomics support library - development files"
260FILES:libatomic-staticdev = "${libdir}/libatomic.a"
261SUMMARY:libatomic-staticdev = "GNU C++11 atomics support library - static development files"
262
263FILES:libitm = "${libdir}/libitm.so.*"
264SUMMARY:libitm = "GNU transactional memory support library"
265FILES:libitm-dev = "\
266 ${libdir}/libitm.so \
267 ${libdir}/libitm.la \
268 ${libdir}/libitm.spec \
269"
270SUMMARY:libitm-dev = "GNU transactional memory support library - development files"
271FILES:libitm-staticdev = "${libdir}/libitm.a"
272SUMMARY:libitm-staticdev = "GNU transactional memory support library - static development files"
273
274require gcc-testsuite.inc
275
276EXTRA_OEMAKE:prepend:task-check = "${PARALLEL_MAKE} "
277
278MAKE_CHECK_TARGETS ??= "check-gcc ${@" ".join("check-target-" + i for i in d.getVar("RUNTIMETARGET").split())}"
279# prettyprinters and xmethods require gdb tooling
280MAKE_CHECK_IGNORE ??= "prettyprinters.exp xmethods.exp"
281MAKE_CHECK_RUNTESTFLAGS ??= "${MAKE_CHECK_BOARDARGS} --ignore '${MAKE_CHECK_IGNORE}'"
282
283# specific host and target dependencies required for test suite running
284do_check[depends] += "dejagnu-native:do_populate_sysroot expect-native:do_populate_sysroot"
285do_check[depends] += "virtual/libc:do_populate_sysroot"
286# only depend on qemu if targeting linux user execution
287do_check[depends] += "${@'qemu-native:do_populate_sysroot' if "user" in d.getVar('TOOLCHAIN_TEST_TARGET') else ''}"
288# extend the recipe sysroot to include the built libraries (for qemu usermode)
289do_check[prefuncs] += "extend_recipe_sysroot"
290do_check[prefuncs] += "check_prepare"
291do_check[dirs] = "${WORKDIR}/dejagnu ${B}"
292do_check[nostamp] = "1"
293do_check() {
294 export DEJAGNU="${WORKDIR}/dejagnu/site.exp"
295
296 # HACK: this works around the configure setting CXX with -nostd* args
297 sed -i 's#-nostdinc++ -L${WORKDIR}/dummylib##g' $(find ${B} -name testsuite_flags | head -1)
298
299 if [ "${TOOLCHAIN_TEST_TARGET}" = "user" ]; then
300 # qemu user has issues allocating large amounts of memory
301 export G_SLICE=always-malloc
302 # no test should need more that 10G of memory, this prevents tests like pthread7-rope from leaking memory
303 ulimit -m 4194304
304 ulimit -v 10485760
305 fi
306
307 oe_runmake -i ${MAKE_CHECK_TARGETS} RUNTESTFLAGS="${MAKE_CHECK_RUNTESTFLAGS}"
308}
309addtask check after do_compile do_populate_sysroot
310
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-runtime_12.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc-runtime_12.2.bb
deleted file mode 100644
index dd430b57..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-runtime_12.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
1require recipes-devtools/gcc/gcc-${PV}.inc
2require gcc-runtime.inc
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-runtime_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-runtime_13.%.bbappend
deleted file mode 100644
index d1df2061..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-runtime_13.%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require microblaze-block.inc
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers.inc b/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers.inc
deleted file mode 100644
index f6aa9c99..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers.inc
+++ /dev/null
@@ -1,120 +0,0 @@
1require gcc-configure-common.inc
2
3LICENSE = "NCSA | MIT"
4
5LIC_FILES_CHKSUM = "\
6 file://libsanitizer/LICENSE.TXT;md5=0249c37748936faf5b1efd5789587909 \
7"
8
9EXTRA_OECONF_PATHS = "\
10 --with-sysroot=/not/exist \
11 --with-build-sysroot=${STAGING_DIR_TARGET} \
12"
13
14do_configure () {
15 rm -rf ${B}/${TARGET_SYS}/libsanitizer/
16 mkdir -p ${B}/${TARGET_SYS}/libsanitizer/
17 cd ${B}/${TARGET_SYS}/libsanitizer/
18 chmod a+x ${S}/libsanitizer/configure
19 relpath=${@os.path.relpath("${S}/libsanitizer", "${B}/${TARGET_SYS}/libsanitizer")}
20 $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
21 # Easiest way to stop bad RPATHs getting into the library since we have a
22 # broken libtool here
23 sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/${TARGET_SYS}/libsanitizer/libtool
24 # Link to the sysroot's libstdc++ instead of one gcc thinks it just built
25 sed -i -e '/LIBSTDCXX_RAW_CXX_\(CXXFLAGS\|LDFLAGS\)\s*=/d' ${B}/${TARGET_SYS}/libsanitizer/*/Makefile
26}
27EXTRACONFFUNCS += "extract_stashed_builddir"
28do_configure[depends] += "${COMPILERDEP}"
29
30do_compile () {
31 cd ${B}/${TARGET_SYS}/libsanitizer/
32 oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/libsanitizer/
33}
34
35do_install () {
36 cd ${B}/${TARGET_SYS}/libsanitizer/
37 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/libsanitizer/ install
38 if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then
39 install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include
40 mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include
41 rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include
42 fi
43 if [ -d ${D}${infodir} ]; then
44 rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
45 fi
46 chown -R root:root ${D}
47}
48
49INHIBIT_DEFAULT_DEPS = "1"
50ALLOW_EMPTY:${PN} = "1"
51DEPENDS = "virtual/crypt gcc-runtime virtual/${TARGET_PREFIX}gcc"
52
53# used to fix ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
54DEBUG_OPTIMIZATION:append = " -Wno-error"
55
56#BBCLASSEXTEND = "nativesdk"
57
58PACKAGES = "${PN} ${PN}-dbg"
59PACKAGES += "libasan libubsan liblsan libtsan"
60PACKAGES += "libasan-dev libubsan-dev liblsan-dev libtsan-dev"
61PACKAGES += "libasan-staticdev libubsan-staticdev liblsan-staticdev libtsan-staticdev"
62
63RDEPENDS:libasan += "libstdc++"
64RDEPENDS:libubsan += "libstdc++"
65RDEPENDS:liblsan += "libstdc++"
66RDEPENDS:libtsan += "libstdc++"
67RDEPENDS:libasan-dev += "${PN}"
68RDEPENDS:libubsan-dev += "${PN}"
69RDEPENDS:liblsan-dev += "${PN}"
70RDEPENDS:libtsan-dev += "${PN}"
71RRECOMMENDS:${PN} += "libasan libubsan"
72RRECOMMENDS:${PN}:append:x86 = " liblsan"
73RRECOMMENDS:${PN}:append:x86-64 = " liblsan libtsan"
74RRECOMMENDS:${PN}:append:powerpc64 = " liblsan libtsan"
75RRECOMMENDS:${PN}:append:aarch64 = " liblsan libtsan"
76
77do_package_write_ipk[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
78do_package_write_deb[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
79do_package_write_rpm[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
80
81# Only x86, powerpc, sparc, s390, arm, and aarch64 are supported
82COMPATIBLE_HOST = '(x86_64|i.86|powerpc|sparc|s390|arm|aarch64).*-linux'
83# musl is currently broken entirely
84COMPATIBLE_HOST:libc-musl = 'null'
85
86FILES:libasan += "${libdir}/libasan.so.* ${libdir}/libhwasan.so.*"
87FILES:libasan-dev += "\
88 ${libdir}/libasan_preinit.o \
89 ${libdir}/libasan.so \
90 ${libdir}/libhwasan.so \
91 ${libdir}/libasan.la \
92"
93FILES:libasan-staticdev += "${libdir}/libasan.a \
94 ${libdir}/libhwasan.a \
95"
96
97FILES:libubsan += "${libdir}/libubsan.so.*"
98FILES:libubsan-dev += "\
99 ${libdir}/libubsan.so \
100 ${libdir}/libubsan.la \
101"
102FILES:libubsan-staticdev += "${libdir}/libubsan.a"
103
104FILES:liblsan += "${libdir}/liblsan.so.*"
105FILES:liblsan-dev += "\
106 ${libdir}/liblsan.so \
107 ${libdir}/liblsan.la \
108 ${libdir}/liblsan_preinit.o \
109"
110FILES:liblsan-staticdev += "${libdir}/liblsan.a"
111
112FILES:libtsan += "${libdir}/libtsan.so.*"
113FILES:libtsan-dev += "\
114 ${libdir}/libtsan.so \
115 ${libdir}/libtsan.la \
116 ${libdir}/libtsan_*.o \
117"
118FILES:libtsan-staticdev += "${libdir}/libtsan.a"
119
120FILES:${PN} = "${libdir}/*.spec ${libdir}/${TARGET_SYS}/${BINV}/include/sanitizer/*.h"
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_12.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_12.2.bb
deleted file mode 100644
index 8bda2cca..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_12.2.bb
+++ /dev/null
@@ -1,7 +0,0 @@
1require recipes-devtools/gcc/gcc-${PV}.inc
2require gcc-sanitizers.inc
3
4# Building with thumb enabled on armv4t armv5t fails with
5# sanitizer_linux.s:5749: Error: lo register required -- `ldr ip,[sp],#8'
6ARM_INSTRUCTION_SET:armv4 = "arm"
7ARM_INSTRUCTION_SET:armv5 = "arm"
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_13.%.bbappend
deleted file mode 100644
index d1df2061..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_13.%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require microblaze-block.inc
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-shared-source.inc b/meta-microblaze/recipes-devtools/gcc/gcc-shared-source.inc
deleted file mode 100644
index 03f520b0..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-shared-source.inc
+++ /dev/null
@@ -1,21 +0,0 @@
1do_fetch() {
2 :
3}
4do_fetch[noexec] = "1"
5deltask do_unpack
6deltask do_patch
7
8SRC_URI = ""
9
10do_configure[depends] += "gcc-source-${PV}:do_preconfigure"
11do_populate_lic[depends] += "gcc-source-${PV}:do_unpack"
12do_deploy_source_date_epoch[depends] += "gcc-source-${PV}:do_deploy_source_date_epoch"
13
14# Copy the SDE from the shared workdir to the recipe workdir
15do_deploy_source_date_epoch () {
16 sde_file=${SDE_FILE}
17 sde_file=${sde_file#${WORKDIR}/}
18 mkdir -p ${SDE_DEPLOYDIR} $(dirname ${SDE_FILE})
19 cp -p $(dirname ${S})/$sde_file ${SDE_DEPLOYDIR}
20 cp -p $(dirname ${S})/$sde_file ${SDE_FILE}
21}
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-source.inc b/meta-microblaze/recipes-devtools/gcc/gcc-source.inc
deleted file mode 100644
index 265bcf4b..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-source.inc
+++ /dev/null
@@ -1,45 +0,0 @@
1deltask do_configure
2deltask do_compile
3deltask do_install
4deltask do_populate_sysroot
5deltask do_populate_lic
6RM_WORK_EXCLUDE += "${PN}"
7
8inherit nopackages
9
10PN = "gcc-source-${PV}"
11WORKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
12SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:"
13
14STAMP = "${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}"
15STAMPCLEAN = "${STAMPS_DIR}/work-shared/gcc-${PV}-*"
16
17INHIBIT_DEFAULT_DEPS = "1"
18DEPENDS = ""
19PACKAGES = ""
20TARGET_ARCH = "allarch"
21TARGET_AS_ARCH = "none"
22TARGET_CC_ARCH = "none"
23TARGET_LD_ARCH = "none"
24TARGET_OS = "linux"
25baselib = "lib"
26PACKAGE_ARCH = "all"
27
28B = "${WORKDIR}/build"
29
30# This needs to be Python to avoid lots of shell variables becoming dependencies.
31python do_preconfigure () {
32 import subprocess
33 cmd = d.expand('cd ${S} && PATH=${PATH} gnu-configize')
34 subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
35 cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure")
36 subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
37
38 # Easiest way to stop bad RPATHs getting into the library since we have a
39 # broken libtool here (breaks cross-canadian and target at least)
40 cmd = d.expand("sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${S}/libcc1/configure")
41 subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
42}
43addtask do_preconfigure after do_patch
44do_preconfigure[depends] += "gnu-config-native:do_populate_sysroot autoconf-native:do_populate_sysroot"
45
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-source_12.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-source_12.%.bbappend
deleted file mode 100644
index 42bcd174..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-source_12.%.bbappend
+++ /dev/null
@@ -1,59 +0,0 @@
1# Add MicroBlaze Patches (only when using MicroBlaze)
2FILESEXTRAPATHS:append := ":${THISDIR}/gcc-12"
3
4SRC_URI += " \
5 file://0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch \
6 file://0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch \
7 file://0003-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch \
8 file://0004-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch \
9 file://0005-Patch-testsuite-Update-MicroBlaze-strings-test.patch \
10 file://0006-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch \
11 file://0007-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch \
12 file://0008-Patch-microblaze-Fix-atomic-side-effects.patch \
13 file://0009-Patch-microblaze-Fix-atomic-boolean-return-value.patch \
14 file://0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch \
15 file://0011-Patch-microblaze-Added-ashrsi3_with_size_opt.patch \
16 file://0012-Patch-microblaze-Use-bralid-for-profiler-calls.patch \
17 file://0013-Patch-microblaze-Removed-moddi3-routinue.patch \
18 file://0014-Patch-microblaze-Add-INIT_PRIORITY-support-Added.patch \
19 file://0015-Patch-microblaze-Add-optimized-lshrsi3.patch \
20 file://0016-Patch-microblaze-Add-cbranchsi4_reg.patch \
21 file://0017-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch \
22 file://0018-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch \
23 file://0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch \
24 file://0020-Patch-microblaze-8-stage-pipeline-for-microblaze.patch \
25 file://0021-PATCH-21-53-Patch-microblaze-Correct-the-const-high-.patch \
26 file://0022-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch \
27 file://0023-patch-microblaze-Fix-the-calculation-of-high-word-in.patch \
28 file://0024-Patch-MicroBlaze-this-patch-has-1.Fixed-the-bug-in.patch \
29 file://0025-Fixing-the-issue-with-the-builtin_alloc.patch \
30 file://0026-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch \
31 file://0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch \
32 file://0028-Intial-commit-for-64bit-MB-sources.patch \
33 file://0029-Patch-MicroBlaze-re-arrangement-of-the-compare-branc.patch \
34 file://0030-Patch-Microblaze-previous-commit-broke-the-handling-.patch \
35 file://0031-Patch-Microblaze-Support-of-multilibs-with-m64.patch \
36 file://0032-Patch-MicroBlaze-Fixed-issues-like.patch \
37 file://0033-Patch-MicroBlaze.patch \
38 file://0034-Added-double-arith-instructions.patch \
39 file://0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch \
40 file://0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch \
41 file://0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch \
42 file://0038-fixing-the-typo-errors-in-umodsi3-file.patch \
43 file://0039-fixing-the-32bit-LTO-related-issue9-1014024.patch \
44 file://0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch \
45 file://0041-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch \
46 file://0042-fixing-the-long-long-long-mingw-toolchain-issue.patch \
47 file://0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch \
48 file://0044-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch \
49 file://0045-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch \
50 file://0046-Patch-microblaze-MB-64-removal-of-barrel-shift-instr.patch \
51 file://0047-Added-new-MB-64-single-register-arithmetic-instructi.patch \
52 file://0048-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch \
53 file://0049-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch \
54 file://0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch \
55 file://0051-Patch-microblaze-Reducing-Stack-space-for-arguments.patch \
56 file://0052-Patch-MicroBlaze.patch \
57 file://0053-patch-microblaze64-Add-Zero_extended-instructions.patch \
58 file://microblaze-mulitlib-hack.patch \
59"
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-source_12.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc-source_12.2.bb
deleted file mode 100644
index b890fa33..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-source_12.2.bb
+++ /dev/null
@@ -1,4 +0,0 @@
1require recipes-devtools/gcc/gcc-${PV}.inc
2require recipes-devtools/gcc/gcc-source.inc
3
4EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-source_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-source_13.%.bbappend
new file mode 100644
index 00000000..51b08f36
--- /dev/null
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-source_13.%.bbappend
@@ -0,0 +1,63 @@
1# Add MicroBlaze Patches (only when using MicroBlaze)
2FILESEXTRAPATHS:append := ":${THISDIR}/gcc-13"
3
4# Our changes are all local, no real patch-status
5ERROR_QA:remove = "patch-status"
6
7SRC_URI += " \
8 file://0001-LOCAL-Testsuite-builtins-tests-require-fpic-Signed-o.patch \
9 file://0002-Quick-fail-g-.dg-opt-memcpy1.C-This-particular-testc.patch \
10 file://0003-For-dejagnu-static-testing-on-qemu-suppress-warnings.patch \
11 file://0004-Add-MicroBlaze-to-target-supports-for-atomic-buil.-..patch \
12 file://0005-Update-MicroBlaze-strings-test-for-new-scan-assembly.patch \
13 file://0006-Allow-MicroBlaze-.weakext-pattern-in-regex-match-Ext.patch \
14 file://0007-Add-MicroBlaze-to-check_profiling_available-Testsuit.patch \
15 file://0008-Fix-atomic-side-effects.-In-atomic_compare_and_swaps.patch \
16 file://0009-Fix-atomic-boolean-return-value.-In-atomic_compare_a.patch \
17 file://0010-Fix-the-Microblaze-crash-with-msmall-divides-flag-Co.patch \
18 file://0011-Added-ashrsi3_with_size_opt-Added-ashrsi3_with_size_.patch \
19 file://0012-Use-bralid-for-profiler-calls-Signed-off-by-Edgar-E..patch \
20 file://0013-Removed-moddi3-routinue-Using-the-default-moddi3-fun.patch \
21 file://0014-Add-INIT_PRIORITY-support-Added-TARGET_ASM_CONSTRUCT.patch \
22 file://0015-Add-optimized-lshrsi3-When-barrel-shifter-is-not-pre.patch \
23 file://0016-Add-cbranchsi4_reg-This-patch-optimizes-the-generati.patch \
24 file://0017-Inline-Expansion-of-fsqrt-builtin.-The-changes-are-m.patch \
25 file://0018-microblaze.md-Improve-adddi3-and-subdi3-insn-definit.patch \
26 file://0019-Update-ashlsi3-movsf-patterns-This-patch-removes-the.patch \
27 file://0020-8-stage-pipeline-for-microblaze-This-patch-adds-the-.patch \
28 file://0021-Correct-the-const-high-double-immediate-value-with-t.patch \
29 file://0022-Fix-internal-compiler-error-with-msmall-divides-This.patch \
30 file://0023-Fix-the-calculation-of-high-word-in-a-long-long-64-b.patch \
31 file://0024-this-patch-has-1.Fixed-the-bug-in-version-calculatio.patch \
32 file://0025-Fixing-the-issue-with-the-builtin_alloc.-register-r1.patch \
33 file://0026-Removed-fsqrt-generation-for-double-values.patch \
34 file://0027-Intial-commit-of-64-bit-Microblaze.patch \
35 file://0028-Intial-commit-for-64bit-MB-sources.-Need-to-cleanup-.patch \
36 file://0029-re-arrangement-of-the-compare-branches.patch \
37 file://0030-previous-commit-broke-the-handling-of-SI-Branch-comp.patch \
38 file://0031-Support-of-multilibs-with-m64.patch \
39 file://0032-Fixed-issues-like-1-Interrupt-alignment-issue-2-Sign.patch \
40 file://0033-fixed-below-issues-Floating-point-print-issues-in-64.patch \
41 file://0034-Added-double-arith-instructions-Fixed-prologue-stack.patch \
42 file://0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch \
43 file://0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch \
44 file://0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch \
45 file://0038-fixing-the-typo-errors-in-umodsi3-file.patch \
46 file://0039-fixing-the-32bit-LTO-related-issue9-1014024.patch \
47 file://0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch \
48 file://0041-corrected-SPN-for-dlong-instruction-mapping.patch \
49 file://0042-fixing-the-long-long-long-mingw-toolchain-issue.patch \
50 file://0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch \
51 file://0044-We-will-check-the-possibility-of-peephole2-optimizat.patch \
52 file://0045-fixed-typos-in-mul-div-and-mod-assembly-files.patch \
53 file://0046-MB-64-removal-of-barrel-shift-instructions-from-defa.patch \
54 file://0047-Added-new-MB-64-single-register-arithmetic-instructi.patch \
55 file://0048-Added-support-for-64-bit-Immediate-values.patch \
56 file://0049-Fix-Compiler-crash-with-freg-struct-return-This-patc.patch \
57 file://0050-Add-TARGET_OPTION_OPTIMIZATION-and-disable-fivopts-b.patch \
58 file://0051-Reducing-Stack-space-for-arguments.patch \
59 file://0052-If-we-use-break_handler-attribute-then-interrupt-vec.patch \
60 file://0053-Add-Zero_extended-instructions.patch \
61 file://0054-Fix-failure-with-gcc.c-torture-execute-ashrdi-1.c-Os.patch \
62 file://microblaze-mulitlib-hack.patch \
63"
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-target.inc b/meta-microblaze/recipes-devtools/gcc/gcc-target.inc
deleted file mode 100644
index 7dac3ef4..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-target.inc
+++ /dev/null
@@ -1,259 +0,0 @@
1GCCMULTILIB = "--enable-multilib"
2require gcc-configure-common.inc
3
4EXTRA_OECONF_PATHS = "\
5 --with-build-sysroot=${STAGING_DIR_TARGET} \
6"
7
8EXTRA_OECONF:append:linuxstdbase = " --enable-clocale=gnu"
9
10# Configure gcc running on the target to default to an architecture which will
11# be compatible with that of gcc-runtime (which is cross compiled to be target
12# specific). For example, for ARM, ARMv6+ adds atomic instructions that may
13# affect the ABI in the gcc-runtime libs. Since we can't rely on gcc on the
14# target to always be passed -march etc, its built-in default needs to be safe.
15
16ARMFPARCHEXT ?= ""
17
18EXTRA_OECONF:append:armv6:class-target = " --with-arch=armv6${ARMFPARCHEXT}"
19EXTRA_OECONF:append:armv7a:class-target = " --with-arch=armv7-a${ARMFPARCHEXT}"
20EXTRA_OECONF:append:armv7ve:class-target = " --with-arch=armv7ve${ARMFPARCHEXT}"
21EXTRA_OECONF:append:arc:class-target = " --with-cpu=${TUNE_PKGARCH}"
22EXTRA_OECONF:append:x86-64:class-target = " ${@get_gcc_x86_64_arch_setting(bb, d)}"
23
24# libcc1 requres gcc_cv_objdump when cross build, but gcc_cv_objdump is
25# set in subdir gcc, so subdir libcc1 can't use it, export it here to
26# fix the problem.
27export gcc_cv_objdump = "${TARGET_PREFIX}objdump"
28
29EXTRA_OECONF_GCC_FLOAT = "${@get_gcc_float_setting(bb, d)}"
30
31PACKAGES = "\
32 ${PN} ${PN}-plugins ${PN}-symlinks \
33 g++ g++-symlinks \
34 cpp cpp-symlinks \
35 g77 g77-symlinks \
36 gfortran gfortran-symlinks \
37 gcov gcov-symlinks \
38 ${PN}-doc \
39 ${PN}-dev \
40 ${PN}-dbg \
41"
42
43FILES:${PN} = "\
44 ${bindir}/${TARGET_PREFIX}gcc* \
45 ${bindir}/${TARGET_PREFIX}lto* \
46 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2* \
47 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/g++-mapper-server \
48 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto* \
49 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
50 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto*${SOLIBSDEV} \
51 ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
52 ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
53 ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
54 ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
55 ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
56 ${libdir}/bfd-plugins/*.so \
57"
58INSANE_SKIP:${PN} += "dev-so"
59RRECOMMENDS:${PN} += "\
60 libssp \
61 libssp-dev \
62"
63RDEPENDS:${PN} += "cpp"
64
65FILES:${PN}-dev = "\
66 ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
67 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
68 ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \
69 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/gengtype \
70 ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.state \
71"
72FILES:${PN}-symlinks = "\
73 ${bindir}/cc \
74 ${bindir}/gcc \
75 ${bindir}/gccbug \
76"
77
78FILES:${PN}-plugins = "\
79 ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin \
80"
81ALLOW_EMPTY:${PN}-plugins = "1"
82
83FILES:g77 = "\
84 ${bindir}/${TARGET_PREFIX}g77 \
85 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
86"
87FILES:g77-symlinks = "\
88 ${bindir}/g77 \
89 ${bindir}/f77 \
90"
91RRECOMMENDS:g77 = "\
92 libg2c \
93 libg2c-dev \
94"
95
96FILES:gfortran = "\
97 ${bindir}/${TARGET_PREFIX}gfortran \
98 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
99"
100RRECOMMENDS:gfortran = "\
101 libquadmath \
102 libquadmath-dev \
103"
104FILES:gfortran-symlinks = "\
105 ${bindir}/gfortran \
106 ${bindir}/f95"
107
108FILES:cpp = "\
109 ${bindir}/${TARGET_PREFIX}cpp* \
110 ${base_libdir}/cpp \
111 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
112FILES:cpp-symlinks = "${bindir}/cpp"
113
114FILES:gcov = "${bindir}/${TARGET_PREFIX}gcov* \
115 ${bindir}/${TARGET_PREFIX}gcov-tool* \
116"
117FILES:gcov-symlinks = "${bindir}/gcov \
118 ${bindir}/gcov-tool \
119"
120
121FILES:g++ = "\
122 ${bindir}/${TARGET_PREFIX}g++* \
123 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
124"
125FILES:g++-symlinks = "\
126 ${bindir}/c++ \
127 ${bindir}/g++ \
128"
129RRECOMMENDS:g++ = "\
130 libstdc++ \
131 libstdc++-dev \
132 libatomic \
133 libatomic-dev \
134"
135
136FILES:${PN}-doc = "\
137 ${infodir} \
138 ${mandir} \
139 ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
140"
141
142do_compile () {
143 # Prevent full target sysroot path from being used in configargs.h header,
144 # as it will be rewritten when used by other sysroots preventing support
145 # for gcc plugins. Additionally the path is embeddeded into the output
146 # binary, this prevents building a reproducible binary.
147 oe_runmake configure-gcc
148 sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/configargs.h
149 sed -i 's@${STAGING_DIR_HOST}@/@g' ${B}/gcc/configargs.h
150
151 # Prevent sysroot/workdir paths from being used in checksum-options.
152 # checksum-options is used to generate a checksum which is embedded into
153 # the output binary.
154 oe_runmake TARGET-gcc=checksum-options all-gcc
155 sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options
156 sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/checksum-options
157
158 oe_runmake all-host
159}
160
161do_install () {
162 oe_runmake 'DESTDIR=${D}' install-host
163
164 # Add unwind.h, it comes from libgcc which we don't want to build again
165 install ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
166
167 # Info dir listing isn't interesting at this point so remove it if it exists.
168 if [ -e "${D}${infodir}/dir" ]; then
169 rm -f ${D}${infodir}/dir
170 fi
171
172 # Cleanup some of the ${libdir}{,exec}/gcc stuff ...
173 rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
174 rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
175 rm -rf ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/*.la
176 rmdir ${D}${includedir}
177 rm -rf ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
178
179 # Hack around specs file assumptions
180 test -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs && sed -i -e '/^*cross_compile:$/ { n; s/1/0/; }' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs
181
182 # Cleanup manpages..
183 rm -rf ${D}${mandir}/man7
184
185 # Don't package details about the build host
186 rm -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/plugin/include/auto-build.h
187 rm -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/plugin/include/bconfig.h
188
189 cd ${D}${bindir}
190
191 # We care about g++ not c++
192 rm -f *c++*
193
194 # We don't care about the gcc-<version> ones for this
195 rm -f *gcc-?*.?*
196
197 # Not sure why we end up with these but we don't want them...
198 rm -f ${TARGET_PREFIX}${TARGET_PREFIX}*
199
200 # Symlinks so we can use these trivially on the target
201 if [ -e ${TARGET_PREFIX}g77 ]; then
202 ln -sf ${TARGET_PREFIX}g77 g77 || true
203 ln -sf g77 f77 || true
204 fi
205 if [ -e ${TARGET_PREFIX}gfortran ]; then
206 ln -sf ${TARGET_PREFIX}gfortran gfortran || true
207 ln -sf gfortran f95 || true
208 fi
209 ln -sf ${TARGET_PREFIX}g++ g++
210 ln -sf ${TARGET_PREFIX}gcc gcc
211 ln -sf ${TARGET_PREFIX}cpp cpp
212 ln -sf ${TARGET_PREFIX}gcov gcov
213 ln -sf ${TARGET_PREFIX}gcov-tool gcov-tool
214 install -d ${D}${base_libdir}
215 ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
216 ln -sf g++ c++
217 ln -sf gcc cc
218 install -d ${D}${libdir}/bfd-plugins
219 ln -sf ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so
220 chown -R root:root ${D}
221}
222
223do_install:append () {
224 #
225 # Thefixinc.sh script, run on the gcc's compile phase, looks into sysroot header
226 # files and places the modified files into
227 # {D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed folder. This makes the
228 # build not deterministic. The following code prunes all those headers
229 # except those under include-fixed/linux, *limits.h and README, yielding
230 # the same include-fixed folders no matter what sysroot
231
232 include_fixed="${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed"
233 for f in $(find ${include_fixed} -type f); do
234 case $f in
235 */include-fixed/linux/*)
236 continue
237 ;;
238 */include-fixed/*limits.h)
239 continue
240 ;;
241 */include-fixed/README)
242 continue
243 ;;
244 *)
245 # remove file and directory if empty
246 bbdebug 2 "Pruning $f"
247 rm $f
248 find $(dirname $f) -maxdepth 0 -empty -exec rmdir {} \;
249 ;;
250 esac
251 done
252}
253
254# Installing /usr/lib/gcc/* means we'd have two copies, one from gcc-cross
255# and one from here. These can confuse gcc cross where includes use #include_next
256# and builds track file dependencies (e.g. perl and its makedepends code).
257# For determinism we don't install this ever and rely on the copy from gcc-cross.
258# [YOCTO #7287]
259SYSROOT_DIRS_IGNORE += "${libdir}/gcc"
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-testsuite.inc b/meta-microblaze/recipes-devtools/gcc/gcc-testsuite.inc
deleted file mode 100644
index f68fec58..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-testsuite.inc
+++ /dev/null
@@ -1,107 +0,0 @@
1inherit qemu
2
3TOOLCHAIN_TEST_TARGET ??= "user"
4TOOLCHAIN_TEST_HOST ??= "localhost"
5TOOLCHAIN_TEST_HOST_USER ??= "root"
6TOOLCHAIN_TEST_HOST_PORT ??= "2222"
7
8MAKE_CHECK_BOARDFLAGS ??= ""
9MAKE_CHECK_BOARDARGS ??= "--target_board=${TOOLCHAIN_TEST_TARGET}${MAKE_CHECK_BOARDFLAGS}"
10
11python () {
12 # Provide the targets compiler args via targets options. This allows dejagnu to
13 # correctly mark incompatible tests as UNSUPPORTED (e.g. needs soft-float
14 # but running on hard-float target).
15 #
16 # These options are called "multilib_flags" within the gcc test suite. Most
17 # architectures handle these options in a sensible way such that tests that
18 # are incompatible with the provided multilib are marked as UNSUPPORTED.
19 #
20 # Note: multilib flags are added to the compile command after the args
21 # provided by any test (through dg-options), CFLAGS_FOR_TARGET is always
22 # added to the compile command before any other args but is not interpted
23 # as options like multilib flags.
24 #
25 # i686, x86-64 and aarch64 are special, since most toolchains built for
26 # these targets don't do multilib the tests do not get correctly marked as
27 # UNSUPPORTED. More importantly the test suite itself does not handle
28 # overriding the multilib flags where it could (like other archs do). As
29 # such do not pass the target compiler args for these targets.
30 args = d.getVar("TUNE_CCARGS").split()
31 if d.getVar("TUNE_ARCH") in ["i686", "x86_64", "aarch64"]:
32 args = []
33 d.setVar("MAKE_CHECK_BOARDFLAGS", ("/" + "/".join(args)) if len(args) != 0 else "")
34}
35
36python check_prepare() {
37 def generate_qemu_linux_user_config(d):
38 content = []
39 content.append('load_generic_config "sim"')
40 content.append('load_base_board_description "basic-sim"')
41 content.append('process_multilib_options ""')
42
43 # qemu args
44 qemu_binary = qemu_target_binary(d)
45 if not qemu_binary:
46 bb.fatal("Missing target qemu linux-user binary")
47
48 args = []
49 # QEMU_OPTIONS is not always valid due to -cross recipe
50 args += ["-r", d.getVar("OLDEST_KERNEL")]
51 # enable all valid instructions, since the test suite itself does not
52 # limit itself to the target cpu options.
53 # - valid for x86*, powerpc, arm, arm64
54 if qemu_binary.lstrip("qemu-") in ["x86_64", "i386", "ppc", "arm", "aarch64"]:
55 args += ["-cpu", "max"]
56
57 sysroot = d.getVar("RECIPE_SYSROOT")
58 args += ["-L", sysroot]
59 # lib paths are static here instead of using $libdir since this is used by a -cross recipe
60 libpaths = [sysroot + "/usr/lib", sysroot + "/lib"]
61 args += ["-E", "LD_LIBRARY_PATH={0}".format(":".join(libpaths))]
62
63 content.append('set_board_info is_simulator 1')
64 content.append('set_board_info sim "{0}"'.format(qemu_binary))
65 content.append('set_board_info sim,options "{0}"'.format(" ".join(args)))
66
67 # target build/test config
68 content.append('set_board_info target_install {%s}' % d.getVar("TARGET_SYS"))
69 content.append('set_board_info ldscript ""')
70 #content.append('set_board_info needs_status_wrapper 1') # qemu-linux-user return codes work, and abort works fine
71 content.append('set_board_info gcc,stack_size 16834')
72 content.append('set_board_info gdb,nosignals 1')
73 content.append('set_board_info gcc,timeout 60')
74
75 return "\n".join(content)
76
77 def generate_remote_ssh_linux_config(d):
78 content = []
79 content.append('load_generic_config "unix"')
80 content.append('process_multilib_options ""')
81 content.append("set_board_info hostname {0}".format(d.getVar("TOOLCHAIN_TEST_HOST")))
82 content.append("set_board_info username {0}".format(d.getVar("TOOLCHAIN_TEST_HOST_USER")))
83
84 port = d.getVar("TOOLCHAIN_TEST_HOST_PORT")
85 content.append("set_board_info rsh_prog \"/usr/bin/ssh -p {0} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\"".format(port))
86 content.append("set_board_info rcp_prog \"/usr/bin/scp -P {0} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\"".format(port))
87
88 return "\n".join(content)
89
90 dejagnudir = d.expand("${WORKDIR}/dejagnu")
91 if not os.path.isdir(dejagnudir):
92 os.makedirs(dejagnudir)
93
94 # write out target qemu board config
95 with open(os.path.join(dejagnudir, "user.exp"), "w") as f:
96 f.write(generate_qemu_linux_user_config(d))
97
98 # write out target ssh board config
99 with open(os.path.join(dejagnudir, "ssh.exp"), "w") as f:
100 f.write(generate_remote_ssh_linux_config(d))
101
102 # generate site.exp to provide boards
103 with open(os.path.join(dejagnudir, "site.exp"), "w") as f:
104 f.write("lappend boards_dir {0}\n".format(dejagnudir))
105 f.write("set CFLAGS_FOR_TARGET \"{0}\"\n".format(d.getVar("TOOLCHAIN_OPTIONS")))
106}
107
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
deleted file mode 100644
index 66e582ca..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From 31f94ef5b43a984a98f0eebd2dcf1b53aa1d7bce Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 Mar 2013 08:37:11 +0400
4Subject: [PATCH] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7
8Upstream-Status: Inappropriate [embedded specific]
9---
10 configure | 2 +-
11 configure.ac | 2 +-
12 2 files changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/configure b/configure
15index 5dcaab14ae9..f76310a36bb 100755
16--- a/configure
17+++ b/configure
18@@ -10165,7 +10165,7 @@ fi
19 # for target_alias and gcc doesn't manage it consistently.
20 target_configargs="--cache-file=./config.cache ${target_configargs}"
21
22-FLAGS_FOR_TARGET=
23+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
24 case " $target_configdirs " in
25 *" newlib "*)
26 case " $target_configargs " in
27diff --git a/configure.ac b/configure.ac
28index 85977482aee..8b9097c7a45 100644
29--- a/configure.ac
30+++ b/configure.ac
31@@ -3346,7 +3346,7 @@ fi
32 # for target_alias and gcc doesn't manage it consistently.
33 target_configargs="--cache-file=./config.cache ${target_configargs}"
34
35-FLAGS_FOR_TARGET=
36+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
37 case " $target_configdirs " in
38 *" newlib "*)
39 case " $target_configargs " in
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
deleted file mode 100644
index 5aa635b3..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
+++ /dev/null
@@ -1,239 +0,0 @@
1From 99f1e61b2957226254a116fde7fd73bf07034012 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 8 Mar 2021 16:04:20 -0800
4Subject: [PATCH] gcc: poison-system-directories
5
6Add /sw/include and /opt/include based on the original
7zecke-no-host-includes.patch patch. The original patch checked for
8/usr/include, /sw/include and /opt/include and then triggered a failure and
9aborted.
10
11Instead, we add the two missing items to the current scan. If the user
12wants this to be a failure, they can add "-Werror=poison-system-directories".
13
14Upstream-Status: Pending
15Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 gcc/common.opt | 4 ++++
19 gcc/config.in | 10 ++++++++++
20 gcc/configure | 19 +++++++++++++++++++
21 gcc/configure.ac | 16 ++++++++++++++++
22 gcc/doc/invoke.texi | 9 +++++++++
23 gcc/gcc.cc | 15 ++++++++++++---
24 gcc/incpath.cc | 21 +++++++++++++++++++++
25 7 files changed, 91 insertions(+), 3 deletions(-)
26
27diff --git a/gcc/common.opt b/gcc/common.opt
28index 8a0dafc52..0357868e2 100644
29--- a/gcc/common.opt
30+++ b/gcc/common.opt
31@@ -710,6 +710,10 @@ Wreturn-local-addr
32 Common Var(warn_return_local_addr) Init(1) Warning
33 Warn about returning a pointer/reference to a local or temporary variable.
34
35+Wpoison-system-directories
36+Common Var(flag_poison_system_directories) Init(1) Warning
37+Warn for -I and -L options using system directories if cross compiling
38+
39 Wshadow
40 Common Var(warn_shadow) Warning
41 Warn when one variable shadows another. Same as -Wshadow=global.
42diff --git a/gcc/config.in b/gcc/config.in
43index 64c27c9cf..a693cb8a8 100644
44--- a/gcc/config.in
45+++ b/gcc/config.in
46@@ -230,6 +230,16 @@
47 #endif
48
49
50+/* Define to warn for use of native system header directories */
51+#ifndef USED_FOR_TARGET
52+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
53+#endif
54+/* Define to warn for use of native system header directories */
55+#ifndef USED_FOR_TARGET
56+#undef POISON_BY_DEFAULT
57+#endif
58+
59+
60 /* Define if you want all operations on RTL (the basic data structure of the
61 optimizer and back end) to be checked for dynamic type safety at runtime.
62 This is quite expensive. */
63diff --git a/gcc/configure b/gcc/configure
64index 2b83acfb0..8bb97578c 100755
65--- a/gcc/configure
66+++ b/gcc/configure
67@@ -1023,6 +1023,7 @@ enable_maintainer_mode
68 enable_link_mutex
69 enable_link_serialization
70 enable_version_specific_runtime_libs
71+enable_poison_system_directories
72 enable_plugin
73 enable_host_shared
74 enable_libquadmath_support
75@@ -1785,6 +1786,8 @@ Optional Features:
76 --enable-version-specific-runtime-libs
77 specify that runtime libraries should be installed
78 in a compiler-specific directory
79+ --enable-poison-system-directories
80+ warn for use of native system header directories
81 --enable-plugin enable plugin support
82 --enable-host-shared build host code as shared libraries
83 --disable-libquadmath-support
84@@ -31996,6 +31999,22 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
85 fi
86
87
88+# Check whether --enable-poison-system-directories was given.
89+if test "${enable_poison_system_directories+set}" = set; then :
90+ enableval=$enable_poison_system_directories;
91+else
92+ enable_poison_system_directories=no
93+fi
94+
95+if test "x${enable_poison_system_directories}" != "xno"; then
96+
97+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
98+if test "$enable_poison_system_directories" = "error"; then
99+$as_echo "#define POISON_BY_DEFAULT 1" >>confdefs.h
100+fi
101+
102+fi
103+
104 # Substitute configuration variables
105
106
107diff --git a/gcc/configure.ac b/gcc/configure.ac
108index daf2a708c..6155b83a7 100644
109--- a/gcc/configure.ac
110+++ b/gcc/configure.ac
111@@ -7435,6 +7435,22 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
112 [specify that runtime libraries should be
113 installed in a compiler-specific directory])])
114
115+AC_ARG_ENABLE([poison-system-directories],
116+ AS_HELP_STRING([--enable-poison-system-directories],
117+ [warn for use of native system header directories (no/yes/error)]),,
118+ [enable_poison_system_directories=no])
119+AC_MSG_NOTICE([poisoned directories $enable_poison_system_directories])
120+if test "x${enable_poison_system_directories}" != "xno"; then
121+ AC_MSG_NOTICE([poisoned directories enabled])
122+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
123+ [1],
124+ [Define to warn for use of native system header directories])
125+ if test $enable_poison_system_directories = "error"; then
126+ AC_MSG_NOTICE([poisoned directories are fatal])
127+ AC_DEFINE([POISON_BY_DEFAULT], [1], [Define to make poison warnings errors])
128+ fi
129+fi
130+
131 # Substitute configuration variables
132 AC_SUBST(subdirs)
133 AC_SUBST(srcdir)
134diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
135index ff6c338be..a8ebfa59a 100644
136--- a/gcc/doc/invoke.texi
137+++ b/gcc/doc/invoke.texi
138@@ -379,6 +379,7 @@ Objective-C and Objective-C++ Dialects}.
139 -Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded @gol
140 -Wparentheses -Wno-pedantic-ms-format @gol
141 -Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast @gol
142+-Wno-poison-system-directories @gol
143 -Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol
144 -Wrestrict -Wno-return-local-addr -Wreturn-type @gol
145 -Wno-scalar-storage-order -Wsequence-point @gol
146@@ -8029,6 +8030,14 @@ made up of data only and thus requires no special treatment. But, for
147 most targets, it is made up of code and thus requires the stack to be
148 made executable in order for the program to work properly.
149
150+@item -Wno-poison-system-directories
151+@opindex Wno-poison-system-directories
152+Do not warn for @option{-I} or @option{-L} options using system
153+directories such as @file{/usr/include} when cross compiling. This
154+option is intended for use in chroot environments when such
155+directories contain the correct headers and libraries for the target
156+system rather than the host.
157+
158 @item -Wfloat-equal
159 @opindex Wfloat-equal
160 @opindex Wno-float-equal
161diff --git a/gcc/gcc.cc b/gcc/gcc.cc
162index beefde7f6..4e6557b3c 100644
163--- a/gcc/gcc.cc
164+++ b/gcc/gcc.cc
165@@ -1162,6 +1162,8 @@ proper position among the other output files. */
166 "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
167 "%X %{o*} %{e*} %{N} %{n} %{r}\
168 %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
169+ %{Wno-poison-system-directories:--no-poison-system-directories} \
170+ %{Werror=poison-system-directories:--error-poison-system-directories} \
171 %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \
172 VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
173 %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
174@@ -1257,8 +1259,11 @@ static const char *cpp_unique_options =
175 static const char *cpp_options =
176 "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\
177 %{f*} %{g*:%{%:debug-level-gt(0):%{g*}\
178- %{!fno-working-directory:-fworking-directory}}} %{O*}\
179- %{undef} %{save-temps*:-fpch-preprocess}";
180+ %{!fno-working-directory:-fworking-directory}}} %{O*}"
181+#ifdef POISON_BY_DEFAULT
182+ " %{!Wno-error=poison-system-directories:-Werror=poison-system-directories}"
183+#endif
184+ " %{undef} %{save-temps*:-fpch-preprocess}";
185
186 /* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al.
187
188@@ -1287,7 +1292,11 @@ static const char *cc1_options =
189 %{coverage:-fprofile-arcs -ftest-coverage}\
190 %{fprofile-arcs|fprofile-generate*|coverage:\
191 %{!fprofile-update=single:\
192- %{pthread:-fprofile-update=prefer-atomic}}}";
193+ %{pthread:-fprofile-update=prefer-atomic}}}"
194+#ifdef POISON_BY_DEFAULT
195+ " %{!Wno-error=poison-system-directories:-Werror=poison-system-directories}"
196+#endif
197+ ;
198
199 static const char *asm_options =
200 "%{-target-help:%:print-asm-header()} "
201diff --git a/gcc/incpath.cc b/gcc/incpath.cc
202index 622204a38..5ac03c086 100644
203--- a/gcc/incpath.cc
204+++ b/gcc/incpath.cc
205@@ -26,6 +26,7 @@
206 #include "intl.h"
207 #include "incpath.h"
208 #include "cppdefault.h"
209+#include "diagnostic-core.h"
210
211 /* Microsoft Windows does not natively support inodes.
212 VMS has non-numeric inodes. */
213@@ -399,6 +400,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
214 }
215 fprintf (stderr, _("End of search list.\n"));
216 }
217+
218+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
219+ if (flag_poison_system_directories)
220+ {
221+ struct cpp_dir *p;
222+
223+ for (p = heads[INC_QUOTE]; p; p = p->next)
224+ {
225+ if ((!strncmp (p->name, "/usr/include", 12))
226+ || (!strncmp (p->name, "/usr/local/include", 18))
227+ || (!strncmp (p->name, "/usr/X11R6/include", 18))
228+ || (!strncmp (p->name, "/sw/include", 11))
229+ || (!strncmp (p->name, "/opt/include", 12)))
230+ warning (OPT_Wpoison_system_directories,
231+ "include location \"%s\" is unsafe for "
232+ "cross-compilation",
233+ p->name);
234+ }
235+ }
236+#endif
237 }
238
239 /* Use given -I paths for #include "..." but not #include <...>, and
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch
deleted file mode 100644
index e83f05b8..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch
+++ /dev/null
@@ -1,134 +0,0 @@
1From 34b861e7a4cfd7b1f0d2c0f8cf9bb0b0b81eb61a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 Mar 2013 09:10:06 +0400
4Subject: [PATCH] 64-bit multilib hack.
5
6GCC has internal multilib handling code but it assumes a very specific rigid directory
7layout. The build system implementation of multilib layout is very generic and allows
8complete customisation of the library directories.
9
10This patch is a partial solution to allow any custom directories to be passed into gcc
11and handled correctly. It forces gcc to use the base_libdir (which is the current
12directory, "."). We need to do this for each multilib that is configured as we don't
13know which compiler options may be being passed into the compiler. Since we have a compiler
14per mulitlib at this point that isn't an issue.
15
16The one problem is the target compiler is only going to work for the default multlilib at
17this point. Ideally we'd figure out which multilibs were being enabled with which paths
18and be able to patch these entries with a complete set of correct paths but this we
19don't have such code at this point. This is something the target gcc recipe should do
20and override these platform defaults in its build config.
21
22Do same for riscv64, aarch64 & arc
23
24RP 15/8/11
25
26Upstream-Status: Inappropriate [OE-Specific]
27
28Signed-off-by: Khem Raj <raj.khem@gmail.com>
29Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
30Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
31Signed-off-by: Khem Raj <raj.khem@gmail.com>
32---
33 gcc/config/aarch64/t-aarch64-linux | 8 ++++----
34 gcc/config/arc/t-multilib-linux | 4 ++--
35 gcc/config/i386/t-linux64 | 6 ++----
36 gcc/config/mips/t-linux64 | 10 +++-------
37 gcc/config/riscv/t-linux | 6 ++++--
38 gcc/config/rs6000/t-linux64 | 5 ++---
39 6 files changed, 17 insertions(+), 22 deletions(-)
40
41diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
42index d0cd546002a..f4056d68372 100644
43--- a/gcc/config/aarch64/t-aarch64-linux
44+++ b/gcc/config/aarch64/t-aarch64-linux
45@@ -21,8 +21,8 @@
46 LIB1ASMSRC = aarch64/lib1funcs.asm
47 LIB1ASMFUNCS = _aarch64_sync_cache_range
48
49-AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
50-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
51-MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
52+#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
53+#MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
54+#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
55
56-MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
57+#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
58diff --git a/gcc/config/arc/t-multilib-linux b/gcc/config/arc/t-multilib-linux
59index ecb9ae6859f..12a164028d4 100644
60--- a/gcc/config/arc/t-multilib-linux
61+++ b/gcc/config/arc/t-multilib-linux
62@@ -16,9 +16,9 @@
63 # along with GCC; see the file COPYING3. If not see
64 # <http://www.gnu.org/licenses/>.
65
66-MULTILIB_OPTIONS = mcpu=hs/mcpu=archs/mcpu=hs38/mcpu=hs38_linux/mcpu=arc700/mcpu=nps400
67+#MULTILIB_OPTIONS = mcpu=hs/mcpu=archs/mcpu=hs38/mcpu=hs38_linux/mcpu=arc700/mcpu=nps400
68
69-MULTILIB_DIRNAMES = hs archs hs38 hs38_linux arc700 nps400
70+#MULTILIB_DIRNAMES = hs archs hs38 hs38_linux arc700 nps400
71
72 # Aliases:
73 MULTILIB_MATCHES += mcpu?arc700=mA7
74diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
75index 5526ad0e6cc..fa51c88912b 100644
76--- a/gcc/config/i386/t-linux64
77+++ b/gcc/config/i386/t-linux64
78@@ -32,7 +32,5 @@
79 #
80 comma=,
81 MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
82-MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
83-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
84-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
85-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
86+MULTILIB_DIRNAMES = . .
87+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
88diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
89index 2fdd8e00407..04f2099250f 100644
90--- a/gcc/config/mips/t-linux64
91+++ b/gcc/config/mips/t-linux64
92@@ -17,10 +17,6 @@
93 # <http://www.gnu.org/licenses/>.
94
95 MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
96-MULTILIB_DIRNAMES = n32 32 64
97-MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
98-MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
99-MULTILIB_OSDIRNAMES = \
100- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
101- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
102- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
103+MULTILIB_DIRNAMES = . . .
104+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
105+
106diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux
107index 216d2776a18..e4d817621fc 100644
108--- a/gcc/config/riscv/t-linux
109+++ b/gcc/config/riscv/t-linux
110@@ -1,3 +1,5 @@
111 # Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/
112-MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
113-MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
114+#MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
115+MULTILIB_DIRNAMES := . .
116+#MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
117+MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
118diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
119index 47e0efd5764..05f5a3f188e 100644
120--- a/gcc/config/rs6000/t-linux64
121+++ b/gcc/config/rs6000/t-linux64
122@@ -26,10 +26,9 @@
123 # MULTILIB_OSDIRNAMES according to what is found on the target.
124
125 MULTILIB_OPTIONS := m64/m32
126-MULTILIB_DIRNAMES := 64 32
127+MULTILIB_DIRNAMES := . .
128 MULTILIB_EXTRA_OPTS :=
129-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
130-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
131+MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
132
133 rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.cc
134 $(COMPILE) $<
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch
deleted file mode 100644
index e8f21634..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch
+++ /dev/null
@@ -1,64 +0,0 @@
1From 7f40f8321fb999e9b34d948724517d3fb0d26820 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Thu, 28 Oct 2021 11:33:40 +0100
4Subject: [PATCH] Pass CXXFLAGS_FOR_BUILD in a couple of places to avoid these
5 errors.
6
7If CXXFLAGS contains something unsupported by the build CXX, we see build failures (e.g. using -fmacro-prefix-map for the target).
8
92021-10-28 Richard Purdie <richard.purdie@linuxfoundation.org>
10
11ChangeLog:
12
13 * Makefile.in: Regenerate.
14 * Makefile.tpl: Add missing CXXFLAGS_FOR_BUILD overrides
15
16Upstream-Status: Pending [should be submittable]
17
18Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20---
21 Makefile.in | 2 ++
22 Makefile.tpl | 2 ++
23 2 files changed, 4 insertions(+)
24
25diff --git a/Makefile.in b/Makefile.in
26index 593495e1650..1d9c83cc566 100644
27--- a/Makefile.in
28+++ b/Makefile.in
29@@ -176,6 +176,7 @@ BUILD_EXPORTS = \
30 # built for the build system to override those in BASE_FLAGS_TO_PASS.
31 EXTRA_BUILD_FLAGS = \
32 CFLAGS="$(CFLAGS_FOR_BUILD)" \
33+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
34 LDFLAGS="$(LDFLAGS_FOR_BUILD)"
35
36 # This is the list of directories to built for the host system.
37@@ -207,6 +208,7 @@ HOST_EXPORTS = \
38 CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \
39 CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \
40 CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \
41+ CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \
42 DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
43 DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \
44 LD="$(LD)"; export LD; \
45diff --git a/Makefile.tpl b/Makefile.tpl
46index ef58fac2b9a..bab04f335c2 100644
47--- a/Makefile.tpl
48+++ b/Makefile.tpl
49@@ -179,6 +179,7 @@ BUILD_EXPORTS = \
50 # built for the build system to override those in BASE_FLAGS_TO_PASS.
51 EXTRA_BUILD_FLAGS = \
52 CFLAGS="$(CFLAGS_FOR_BUILD)" \
53+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
54 LDFLAGS="$(LDFLAGS_FOR_BUILD)"
55
56 # This is the list of directories to built for the host system.
57@@ -210,6 +211,7 @@ HOST_EXPORTS = \
58 CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \
59 CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \
60 CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \
61+ CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \
62 DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
63 DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \
64 LD="$(LD)"; export LD; \
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
deleted file mode 100644
index e34eb2cf..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ /dev/null
@@ -1,92 +0,0 @@
1From 5455fc1de74897a27c1199dc5611ec02243e24af Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 Mar 2013 09:17:25 +0400
4Subject: [PATCH] Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}
5
6Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
7the source can be shared between gcc-cross-initial,
8gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
12Upstream-Status: Pending
13
14While compiling gcc-crosssdk-initial-x86_64 on some host, there is
15occasionally failure that test the existance of default.h doesn't
16work, the reason is tm_include_list='** defaults.h' rather than
17tm_include_list='** ./defaults.h'
18
19So we add the test condition for this situation.
20Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
21---
22 gcc/Makefile.in | 2 +-
23 gcc/configure | 4 ++--
24 gcc/configure.ac | 4 ++--
25 gcc/mkconfig.sh | 4 ++--
26 4 files changed, 7 insertions(+), 7 deletions(-)
27
28diff --git a/gcc/Makefile.in b/gcc/Makefile.in
29index 31ff95500c9..a8277254696 100644
30--- a/gcc/Makefile.in
31+++ b/gcc/Makefile.in
32@@ -553,7 +553,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
33 TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
34
35 xmake_file=@xmake_file@
36-tmake_file=@tmake_file@
37+tmake_file=@tmake_file@ ./t-oe
38 TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
39 TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
40 TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
41diff --git a/gcc/configure b/gcc/configure
42index dc2d59701ad..3fc0e2f5813 100755
43--- a/gcc/configure
44+++ b/gcc/configure
45@@ -13381,8 +13381,8 @@ for f in $tm_file; do
46 tm_include_list="${tm_include_list} $f"
47 ;;
48 defaults.h )
49- tm_file_list="${tm_file_list} \$(srcdir)/$f"
50- tm_include_list="${tm_include_list} $f"
51+ tm_file_list="${tm_file_list} ./$f"
52+ tm_include_list="${tm_include_list} ./$f"
53 ;;
54 * )
55 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
56diff --git a/gcc/configure.ac b/gcc/configure.ac
57index 36ce78924de..46de496b256 100644
58--- a/gcc/configure.ac
59+++ b/gcc/configure.ac
60@@ -2332,8 +2332,8 @@ for f in $tm_file; do
61 tm_include_list="${tm_include_list} $f"
62 ;;
63 defaults.h )
64- tm_file_list="${tm_file_list} \$(srcdir)/$f"
65- tm_include_list="${tm_include_list} $f"
66+ tm_file_list="${tm_file_list} ./$f"
67+ tm_include_list="${tm_include_list} ./$f"
68 ;;
69 * )
70 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
71diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
72index 91cc43f69ff..8de33713cd8 100644
73--- a/gcc/mkconfig.sh
74+++ b/gcc/mkconfig.sh
75@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
76 if [ $# -ge 1 ]; then
77 echo '#ifdef IN_GCC' >> ${output}T
78 for file in "$@"; do
79- if test x"$file" = x"defaults.h"; then
80+ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
81 postpone_defaults_h="yes"
82 else
83 echo "# include \"$file\"" >> ${output}T
84@@ -106,7 +106,7 @@ esac
85
86 # If we postponed including defaults.h, add the #include now.
87 if test x"$postpone_defaults_h" = x"yes"; then
88- echo "# include \"defaults.h\"" >> ${output}T
89+ echo "# include \"./defaults.h\"" >> ${output}T
90 fi
91
92 # Add multiple inclusion protection guard, part two.
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch
deleted file mode 100644
index b08aecc7..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1From abc3b82ab24169277f2090e9df1ceac3573142be Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 Mar 2013 09:22:00 +0400
4Subject: [PATCH] cpp: honor sysroot.
5
6Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
7preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
8rather than the --sysroot option specified on the commandline. If access to that directory is
9permission denied (unreadable), gcc will error.
10
11This happens when ccache is in use due to the fact it uses preprocessed source files.
12
13The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
14-isystem, -isysroot happen and the correct sysroot is used.
15
16[YOCTO #2074]
17
18RP 2012/04/13
19
20Signed-off-by: Khem Raj <raj.khem@gmail.com>
21
22Upstream-Status: Pending
23---
24 gcc/cp/lang-specs.h | 2 +-
25 gcc/gcc.cc | 2 +-
26 2 files changed, 2 insertions(+), 2 deletions(-)
27
28diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
29index f35c9fab76b..19ddc98ce7f 100644
30--- a/gcc/cp/lang-specs.h
31+++ b/gcc/cp/lang-specs.h
32@@ -116,7 +116,7 @@ along with GCC; see the file COPYING3. If not see
33 {".ii", "@c++-cpp-output", 0, 0, 0},
34 {"@c++-cpp-output",
35 "%{!E:%{!M:%{!MM:"
36- " cc1plus -fpreprocessed %i %(cc1_options) %2"
37+ " cc1plus -fpreprocessed %i %I %(cc1_options) %2"
38 " %{!fsyntax-only:"
39 " %{fmodule-only:%{!S:-o %g.s%V}}"
40 " %{!fmodule-only:%{!fmodule-header*:%(invoke_as)}}}"
41diff --git a/gcc/gcc.cc b/gcc/gcc.cc
42index ce161d3c853..aa4cf92fb78 100644
43--- a/gcc/gcc.cc
44+++ b/gcc/gcc.cc
45@@ -1476,7 +1476,7 @@ static const struct compiler default_compilers[] =
46 %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0},
47 {".i", "@cpp-output", 0, 0, 0},
48 {"@cpp-output",
49- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
50+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
51 {".s", "@assembler", 0, 0, 0},
52 {"@assembler",
53 "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
deleted file mode 100644
index b59eed57..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ /dev/null
@@ -1,403 +0,0 @@
1From 4de00af67b57b5440bdf61ab364ad959ad0aeee7 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 Mar 2013 09:24:50 +0400
4Subject: [PATCH] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
5 relative to SYSTEMLIBS_DIR
6
7This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
8relative to SYSTEMLIBS_DIR which can be set in generated headers
9This breaks the assumption of hardcoded multilib in gcc
10Change is only for the supported architectures in OE including
11SH, sparc, alpha for possible future support (if any)
12
13Removes the do_headerfix task in metadata
14
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16
17Upstream-Status: Inappropriate [OE configuration]
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 gcc/config/aarch64/aarch64-linux.h | 4 ++--
21 gcc/config/alpha/linux-elf.h | 4 ++--
22 gcc/config/arm/linux-eabi.h | 6 +++---
23 gcc/config/arm/linux-elf.h | 2 +-
24 gcc/config/i386/linux.h | 4 ++--
25 gcc/config/i386/linux64.h | 12 ++++++------
26 gcc/config/linux.h | 8 ++++----
27 gcc/config/loongarch/gnu-user.h | 4 ++--
28 gcc/config/microblaze/linux.h | 4 ++--
29 gcc/config/mips/linux.h | 18 +++++++++---------
30 gcc/config/nios2/linux.h | 4 ++--
31 gcc/config/riscv/linux.h | 4 ++--
32 gcc/config/rs6000/linux64.h | 15 +++++----------
33 gcc/config/rs6000/sysv4.h | 4 ++--
34 gcc/config/s390/linux.h | 8 ++++----
35 gcc/config/sh/linux.h | 4 ++--
36 gcc/config/sparc/linux.h | 2 +-
37 gcc/config/sparc/linux64.h | 4 ++--
38 18 files changed, 53 insertions(+), 58 deletions(-)
39
40diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
41index 5e4553d79f5..877e8841eb2 100644
42--- a/gcc/config/aarch64/aarch64-linux.h
43+++ b/gcc/config/aarch64/aarch64-linux.h
44@@ -21,10 +21,10 @@
45 #ifndef GCC_AARCH64_LINUX_H
46 #define GCC_AARCH64_LINUX_H
47
48-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
49+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
50
51 #undef MUSL_DYNAMIC_LINKER
52-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
53+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
54
55 #undef ASAN_CC1_SPEC
56 #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
57diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
58index 17f16a55910..0a7be38fa63 100644
59--- a/gcc/config/alpha/linux-elf.h
60+++ b/gcc/config/alpha/linux-elf.h
61@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see
62 #define EXTRA_SPECS \
63 { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
64
65-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
66-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
67+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
68+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
69 #if DEFAULT_LIBC == LIBC_UCLIBC
70 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
71 #elif DEFAULT_LIBC == LIBC_GLIBC
72diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
73index 50cc0bc6d08..17c18b27145 100644
74--- a/gcc/config/arm/linux-eabi.h
75+++ b/gcc/config/arm/linux-eabi.h
76@@ -65,8 +65,8 @@
77 GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
78
79 #undef GLIBC_DYNAMIC_LINKER
80-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
81-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
82+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
83+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
84 #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
85
86 #define GLIBC_DYNAMIC_LINKER \
87@@ -89,7 +89,7 @@
88 #define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
89 #endif
90 #define MUSL_DYNAMIC_LINKER \
91- "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1"
92+ SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1"
93
94 /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
95 use the GNU/Linux version, not the generic BPABI version. */
96diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
97index df3da67c4f0..37456e9d5a4 100644
98--- a/gcc/config/arm/linux-elf.h
99+++ b/gcc/config/arm/linux-elf.h
100@@ -60,7 +60,7 @@
101
102 #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
103
104-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
105+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
106
107 #define LINUX_TARGET_LINK_SPEC "%{h*} \
108 %{static:-Bstatic} \
109diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
110index 5d99ee56d5b..a76022c9ccc 100644
111--- a/gcc/config/i386/linux.h
112+++ b/gcc/config/i386/linux.h
113@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
114 <http://www.gnu.org/licenses/>. */
115
116 #define GNU_USER_LINK_EMULATION "elf_i386"
117-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
118+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
119
120 #undef MUSL_DYNAMIC_LINKER
121-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
122+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-i386.so.1"
123diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
124index 8681e36f10d..ddce49b6b60 100644
125--- a/gcc/config/i386/linux64.h
126+++ b/gcc/config/i386/linux64.h
127@@ -27,13 +27,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
128 #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
129 #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
130
131-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
132-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
133-#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
134+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
135+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
136+#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
137
138 #undef MUSL_DYNAMIC_LINKER32
139-#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
140+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-i386.so.1"
141 #undef MUSL_DYNAMIC_LINKER64
142-#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
143+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-x86_64.so.1"
144 #undef MUSL_DYNAMIC_LINKERX32
145-#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
146+#define MUSL_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-musl-x32.so.1"
147diff --git a/gcc/config/linux.h b/gcc/config/linux.h
148index 74f70793d90..4ce173384ef 100644
149--- a/gcc/config/linux.h
150+++ b/gcc/config/linux.h
151@@ -99,10 +99,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
152 GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
153 GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
154 supporting both 32-bit and 64-bit compilation. */
155-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
156-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
157-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
158-#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
159+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
160+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
161+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
162+#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0"
163 #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
164 #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
165 #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
166diff --git a/gcc/config/loongarch/gnu-user.h b/gcc/config/loongarch/gnu-user.h
167index 664dc9206ad..082bd7cfc6f 100644
168--- a/gcc/config/loongarch/gnu-user.h
169+++ b/gcc/config/loongarch/gnu-user.h
170@@ -31,11 +31,11 @@ along with GCC; see the file COPYING3. If not see
171
172 #undef GLIBC_DYNAMIC_LINKER
173 #define GLIBC_DYNAMIC_LINKER \
174- "/lib" ABI_GRLEN_SPEC "/ld-linux-loongarch-" ABI_SPEC ".so.1"
175+ SYSTEMLIBS_DIR "ld-linux-loongarch-" ABI_SPEC ".so.1"
176
177 #undef MUSL_DYNAMIC_LINKER
178 #define MUSL_DYNAMIC_LINKER \
179- "/lib" ABI_GRLEN_SPEC "/ld-musl-loongarch-" ABI_SPEC ".so.1"
180+ SYSTEMLIBS_DIR "ld-musl-loongarch-" ABI_SPEC ".so.1"
181
182 #undef GNU_USER_TARGET_LINK_SPEC
183 #define GNU_USER_TARGET_LINK_SPEC \
184diff --git a/gcc/config/microblaze/linux.h b/gcc/config/microblaze/linux.h
185index 5b1a365eda4..2e63df1ae9c 100644
186--- a/gcc/config/microblaze/linux.h
187+++ b/gcc/config/microblaze/linux.h
188@@ -28,7 +28,7 @@
189 #undef TLS_NEEDS_GOT
190 #define TLS_NEEDS_GOT 1
191
192-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
193+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "/ld.so.1"
194 #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
195
196 #if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */
197@@ -38,7 +38,7 @@
198 #endif
199
200 #undef MUSL_DYNAMIC_LINKER
201-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1"
202+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1"
203
204 #undef SUBTARGET_EXTRA_SPECS
205 #define SUBTARGET_EXTRA_SPECS \
206diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
207index 230b7789bb8..d96d134bfcf 100644
208--- a/gcc/config/mips/linux.h
209+++ b/gcc/config/mips/linux.h
210@@ -22,29 +22,29 @@ along with GCC; see the file COPYING3. If not see
211 #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
212
213 #define GLIBC_DYNAMIC_LINKER32 \
214- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
215+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
216 #define GLIBC_DYNAMIC_LINKER64 \
217- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
218+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
219 #define GLIBC_DYNAMIC_LINKERN32 \
220- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
221+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
222
223 #undef UCLIBC_DYNAMIC_LINKER32
224 #define UCLIBC_DYNAMIC_LINKER32 \
225- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
226+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
227 #undef UCLIBC_DYNAMIC_LINKER64
228 #define UCLIBC_DYNAMIC_LINKER64 \
229- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}"
230+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}"
231 #define UCLIBC_DYNAMIC_LINKERN32 \
232- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
233+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
234
235 #undef MUSL_DYNAMIC_LINKER32
236 #define MUSL_DYNAMIC_LINKER32 \
237- "/lib/ld-musl-mips%{mips32r6|mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
238+ SYSTEMLIBS_DIR "ld-musl-mips%{mips32r6|mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
239 #undef MUSL_DYNAMIC_LINKER64
240 #define MUSL_DYNAMIC_LINKER64 \
241- "/lib/ld-musl-mips64%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
242+ SYSTEMLIBS_DIR "ld-musl-mips64%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
243 #define MUSL_DYNAMIC_LINKERN32 \
244- "/lib/ld-musl-mipsn32%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
245+ SYSTEMLIBS_DIR "ld-musl-mipsn32%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
246
247 #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
248 #define GNU_USER_DYNAMIC_LINKERN32 \
249diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
250index f5dd813acad..7a13e1c9799 100644
251--- a/gcc/config/nios2/linux.h
252+++ b/gcc/config/nios2/linux.h
253@@ -29,8 +29,8 @@
254 #undef CPP_SPEC
255 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
256
257-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
258-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1"
259+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-nios2.so.1"
260+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-nios2.so.1"
261
262 #undef LINK_SPEC
263 #define LINK_SPEC LINK_SPEC_ENDIAN \
264diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
265index 38803723ba9..d5ef8a96a19 100644
266--- a/gcc/config/riscv/linux.h
267+++ b/gcc/config/riscv/linux.h
268@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see
269 GNU_USER_TARGET_OS_CPP_BUILTINS(); \
270 } while (0)
271
272-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1"
273+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1"
274
275 #define MUSL_ABI_SUFFIX \
276 "%{mabi=ilp32:-sf}" \
277@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3. If not see
278 "%{mabi=lp64d:}"
279
280 #undef MUSL_DYNAMIC_LINKER
281-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1"
282+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1"
283
284 /* Because RISC-V only has word-sized atomics, it requries libatomic where
285 others do not. So link libatomic by default, as needed. */
286diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
287index b2a7afabc73..364c1a5b155 100644
288--- a/gcc/config/rs6000/linux64.h
289+++ b/gcc/config/rs6000/linux64.h
290@@ -339,24 +339,19 @@ extern int dot_symbols;
291 #undef LINK_OS_DEFAULT_SPEC
292 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
293
294-#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1"
295-
296+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
297 #ifdef LINUX64_DEFAULT_ABI_ELFv2
298-#define GLIBC_DYNAMIC_LINKER64 \
299-"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \
300-":%(dynamic_linker_prefix)/lib64/ld64.so.2}"
301+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}"
302 #else
303-#define GLIBC_DYNAMIC_LINKER64 \
304-"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \
305-":%(dynamic_linker_prefix)/lib64/ld64.so.1}"
306+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}"
307 #endif
308
309 #undef MUSL_DYNAMIC_LINKER32
310 #define MUSL_DYNAMIC_LINKER32 \
311- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
312+ SYSTEMLIBS_DIR "ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
313 #undef MUSL_DYNAMIC_LINKER64
314 #define MUSL_DYNAMIC_LINKER64 \
315- "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
316+ SYSTEMLIBS_DIR "ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
317
318 #undef DEFAULT_ASM_ENDIAN
319 #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
320diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
321index 7e2519de5d4..a73954d9de5 100644
322--- a/gcc/config/rs6000/sysv4.h
323+++ b/gcc/config/rs6000/sysv4.h
324@@ -779,10 +779,10 @@ GNU_USER_TARGET_CC1_SPEC
325
326 #define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","")
327
328-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
329+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld.so.1"
330 #undef MUSL_DYNAMIC_LINKER
331 #define MUSL_DYNAMIC_LINKER \
332- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
333+ SYSTEMLIBS_DIR "ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
334
335 #ifndef GNU_USER_DYNAMIC_LINKER
336 #define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
337diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h
338index d7b7e7a7b02..0139b4d06ca 100644
339--- a/gcc/config/s390/linux.h
340+++ b/gcc/config/s390/linux.h
341@@ -72,13 +72,13 @@ along with GCC; see the file COPYING3. If not see
342 #define MULTILIB_DEFAULTS { "m31" }
343 #endif
344
345-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
346-#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
347+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
348+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64.so.1"
349
350 #undef MUSL_DYNAMIC_LINKER32
351-#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-s390.so.1"
352+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-s390.so.1"
353 #undef MUSL_DYNAMIC_LINKER64
354-#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-s390x.so.1"
355+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-s390x.so.1"
356
357 #undef LINK_SPEC
358 #define LINK_SPEC \
359diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
360index d96d077c99e..7d27f9893ee 100644
361--- a/gcc/config/sh/linux.h
362+++ b/gcc/config/sh/linux.h
363@@ -61,10 +61,10 @@ along with GCC; see the file COPYING3. If not see
364
365 #undef MUSL_DYNAMIC_LINKER
366 #define MUSL_DYNAMIC_LINKER \
367- "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \
368+ SYSTEMLIBS_DIR "ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \
369 "%{mfdpic:-fdpic}.so.1"
370
371-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
372+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
373
374 #undef SUBTARGET_LINK_EMUL_SUFFIX
375 #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
376diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
377index 6a809e9092d..60603765ad6 100644
378--- a/gcc/config/sparc/linux.h
379+++ b/gcc/config/sparc/linux.h
380@@ -78,7 +78,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
381 When the -shared link option is used a final link is not being
382 done. */
383
384-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
385+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
386
387 #undef LINK_SPEC
388 #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
389diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
390index d08a2ef96fe..e6955da0a5b 100644
391--- a/gcc/config/sparc/linux64.h
392+++ b/gcc/config/sparc/linux64.h
393@@ -78,8 +78,8 @@ along with GCC; see the file COPYING3. If not see
394 When the -shared link option is used a final link is not being
395 done. */
396
397-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
398-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
399+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
400+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2"
401
402 #ifdef SPARC_BI_ARCH
403
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0008-libtool.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0008-libtool.patch
deleted file mode 100644
index c9bc38cc..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0008-libtool.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From 5117519c1897a49b09fe7fff213b9c2ea15d37f5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 Mar 2013 09:29:11 +0400
4Subject: [PATCH] libtool
5
6libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
7when running on am x86_64 build host.
8
9This patch stops this speading to libdir in the libstdc++.la file within libtool.
10Arguably, it shouldn't be passing this into libtool in the first place but
11for now this resolves the nastiest problems this causes.
12
13func_normal_abspath would resolve an empty path to `pwd` so we need
14to filter the zero case.
15
16RP 2012/8/24
17
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19
20Upstream-Status: Pending
21---
22 ltmain.sh | 4 ++++
23 1 file changed, 4 insertions(+)
24
25diff --git a/ltmain.sh b/ltmain.sh
26index 70990740b6c..ee938056bef 100644
27--- a/ltmain.sh
28+++ b/ltmain.sh
29@@ -6359,6 +6359,10 @@ func_mode_link ()
30 func_warning "ignoring multiple \`-rpath's for a libtool library"
31
32 install_libdir="$1"
33+ if test -n "$install_libdir"; then
34+ func_normal_abspath "$install_libdir"
35+ install_libdir=$func_normal_abspath_result
36+ fi
37
38 oldlibs=
39 if test -z "$rpath"; then
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
deleted file mode 100644
index dd67b115..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From 32129f9682d0d27fc67af10f077ad2768935cbe6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 Mar 2013 09:30:32 +0400
4Subject: [PATCH] gcc: armv4: pass fix-v4bx to linker to support EABI.
5
6The LINK_SPEC for linux gets overwritten by linux-eabi.h which
7means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
8the option is not passed to linker when chosing march=armv4
9This patch redefines this in linux-eabi.h and reinserts it
10for eabi defaulting toolchains.
11
12We might want to send it upstream.
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15
16Upstream-Status: Pending
17---
18 gcc/config/arm/linux-eabi.h | 6 +++++-
19 1 file changed, 5 insertions(+), 1 deletion(-)
20
21diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
22index 17c18b27145..8eacb099317 100644
23--- a/gcc/config/arm/linux-eabi.h
24+++ b/gcc/config/arm/linux-eabi.h
25@@ -91,10 +91,14 @@
26 #define MUSL_DYNAMIC_LINKER \
27 SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1"
28
29+/* For armv4 we pass --fix-v4bx to linker to support EABI */
30+#undef TARGET_FIX_V4BX_SPEC
31+#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
32+
33 /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
34 use the GNU/Linux version, not the generic BPABI version. */
35 #undef LINK_SPEC
36-#define LINK_SPEC EABI_LINK_SPEC \
37+#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \
38 LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
39 LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
40
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch
deleted file mode 100644
index 45edc62e..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ /dev/null
@@ -1,99 +0,0 @@
1From bf85b8bbcb4b77725d4c22c1bb25a29f6ff21038 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 Mar 2013 09:33:04 +0400
4Subject: [PATCH] Use the multilib config files from ${B} instead of using the
5 ones from ${S}
6
7Use the multilib config files from ${B} instead of using the ones from ${S}
8so that the source can be shared between gcc-cross-initial,
9gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
13
14Upstream-Status: Inappropriate [configuration]
15---
16 gcc/configure | 22 ++++++++++++++++++----
17 gcc/configure.ac | 22 ++++++++++++++++++----
18 2 files changed, 36 insertions(+), 8 deletions(-)
19
20diff --git a/gcc/configure b/gcc/configure
21index 3fc0e2f5813..2f0f0e057a9 100755
22--- a/gcc/configure
23+++ b/gcc/configure
24@@ -13361,10 +13361,20 @@ done
25 tmake_file_=
26 for f in ${tmake_file}
27 do
28- if test -f ${srcdir}/config/$f
29- then
30- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
31- fi
32+ case $f in
33+ */t-linux64 )
34+ if test -f ./config/$f
35+ then
36+ tmake_file_="${tmake_file_} ./config/$f"
37+ fi
38+ ;;
39+ * )
40+ if test -f ${srcdir}/config/$f
41+ then
42+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
43+ fi
44+ ;;
45+ esac
46 done
47 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
48
49@@ -13375,6 +13385,10 @@ tm_file_list="options.h"
50 tm_include_list="options.h insn-constants.h"
51 for f in $tm_file; do
52 case $f in
53+ */linux64.h )
54+ tm_file_list="${tm_file_list} ./config/$f"
55+ tm_include_list="${tm_include_list} ./config/$f"
56+ ;;
57 ./* )
58 f=`echo $f | sed 's/^..//'`
59 tm_file_list="${tm_file_list} $f"
60diff --git a/gcc/configure.ac b/gcc/configure.ac
61index 46de496b256..6155b83a732 100644
62--- a/gcc/configure.ac
63+++ b/gcc/configure.ac
64@@ -2312,10 +2312,20 @@ done
65 tmake_file_=
66 for f in ${tmake_file}
67 do
68- if test -f ${srcdir}/config/$f
69- then
70- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
71- fi
72+ case $f in
73+ */t-linux64 )
74+ if test -f ./config/$f
75+ then
76+ tmake_file_="${tmake_file_} ./config/$f"
77+ fi
78+ ;;
79+ * )
80+ if test -f ${srcdir}/config/$f
81+ then
82+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
83+ fi
84+ ;;
85+ esac
86 done
87 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
88
89@@ -2326,6 +2336,10 @@ tm_file_list="options.h"
90 tm_include_list="options.h insn-constants.h"
91 for f in $tm_file; do
92 case $f in
93+ */linux64.h )
94+ tm_file_list="${tm_file_list} ./config/$f"
95+ tm_include_list="${tm_include_list} ./config/$f"
96+ ;;
97 ./* )
98 f=`echo $f | sed 's/^..//'`
99 tm_file_list="${tm_file_list} $f"
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
deleted file mode 100644
index 352c6eec..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From e5463727ff028cee5e452da38f5b4c44d52e412e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 09:39:38 +0000
4Subject: [PATCH] Avoid using libdir from .la which usually points to a host
5 path
6
7Upstream-Status: Inappropriate [embedded specific]
8
9Signed-off-by: Jonathan Liu <net147@gmail.com>
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 ltmain.sh | 3 +++
13 1 file changed, 3 insertions(+)
14
15diff --git a/ltmain.sh b/ltmain.sh
16index ee938056bef..9ebc7e3d1e0 100644
17--- a/ltmain.sh
18+++ b/ltmain.sh
19@@ -5628,6 +5628,9 @@ func_mode_link ()
20 absdir="$abs_ladir"
21 libdir="$abs_ladir"
22 else
23+ # Instead of using libdir from .la which usually points to a host path,
24+ # use the path the .la is contained in.
25+ libdir="$abs_ladir"
26 dir="$libdir"
27 absdir="$libdir"
28 fi
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch
deleted file mode 100644
index f52e21ed..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1From 710d1325474e708e6b34eebe09f3f130420af293 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 31 Jan 2023 22:03:38 -0800
4Subject: [PATCH] aarch64: Fix include paths when S != B
5
6aarch64.h gets copied into build directory when built out of tree, in
7this case build uses this file but does not find the includes inside it
8since they are not found in any of include paths specified in compiler
9cmdline.
10
11Fixes build errors like
12
13% g++ -c -isystem/mnt/b/yoe/master/build/tmp/work/x86_64-linux/gcc-cross-aarch64/13.0.1-r0/recipe-sysroot-native/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 -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/build -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/../include -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/../libcpp/include -o build/gencheck.o ../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/gencheck.cc
14In file included from ./tm.h:34,
15 from ../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/gencheck.cc:23:
16./config/aarch64/aarch64.h:164:10: fatal error: aarch64-option-extensions.def: No such file or directory
17 164 | #include "aarch64-option-extensions.def"
18 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19compilation terminated.
20
21See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105144
22
23Upstream-Status: Pending
24
25Signed-off-by: Khem Raj <raj.khem@gmail.com>
26---
27 gcc/config/aarch64/aarch64.h | 8 ++++----
28 1 file changed, 4 insertions(+), 4 deletions(-)
29
30diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
31index 155cace6afe..07d68958908 100644
32--- a/gcc/config/aarch64/aarch64.h
33+++ b/gcc/config/aarch64/aarch64.h
34@@ -161,8 +161,8 @@
35 enum class aarch64_feature : unsigned char {
36 #define AARCH64_OPT_EXTENSION(A, IDENT, C, D, E, F) IDENT,
37 #define AARCH64_ARCH(A, B, IDENT, D, E) IDENT,
38-#include "aarch64-option-extensions.def"
39-#include "aarch64-arches.def"
40+#include "config/aarch64/aarch64-option-extensions.def"
41+#include "config/aarch64/aarch64-arches.def"
42 };
43
44 /* Define unique flags for each of the above. */
45@@ -171,8 +171,8 @@ enum class aarch64_feature : unsigned char {
46 = aarch64_feature_flags (1) << int (aarch64_feature::IDENT);
47 #define AARCH64_OPT_EXTENSION(A, IDENT, C, D, E, F) HANDLE (IDENT)
48 #define AARCH64_ARCH(A, B, IDENT, D, E) HANDLE (IDENT)
49-#include "aarch64-option-extensions.def"
50-#include "aarch64-arches.def"
51+#include "config/aarch64/aarch64-option-extensions.def"
52+#include "config/aarch64/aarch64-arches.def"
53 #undef HANDLE
54
55 #endif
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
deleted file mode 100644
index b05be59c..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From e8e8a0ab572cfceb9758f99599c0db4c962e49c0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 09:39:38 +0000
4Subject: [PATCH] Avoid using libdir from .la which usually points to a host
5 path
6
7Upstream-Status: Inappropriate [embedded specific]
8
9Signed-off-by: Jonathan Liu <net147@gmail.com>
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 ltmain.sh | 3 +++
13 1 file changed, 3 insertions(+)
14
15diff --git a/ltmain.sh b/ltmain.sh
16index ee938056bef..9ebc7e3d1e0 100644
17--- a/ltmain.sh
18+++ b/ltmain.sh
19@@ -5628,6 +5628,9 @@ func_mode_link ()
20 absdir="$abs_ladir"
21 libdir="$abs_ladir"
22 else
23+ # Instead of using libdir from .la which usually points to a host path,
24+ # use the path the .la is contained in.
25+ libdir="$abs_ladir"
26 dir="$libdir"
27 absdir="$libdir"
28 fi
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch
deleted file mode 100644
index 61e61ecc..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch
+++ /dev/null
@@ -1,113 +0,0 @@
1From 612801d426e75ff997cfabda380dbe52c2cbc532 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 10:25:11 +0000
4Subject: [PATCH] Ensure target gcc headers can be included
5
6There are a few headers installed as part of the OpenEmbedded
7gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
8built for the target architecture, these are within the target
9sysroot and not cross/nativesdk; thus they weren't able to be
10found by gcc with the existing search paths. Add support for
11picking up these headers under the sysroot supplied on the gcc
12command line in order to resolve this.
13
14Extend target gcc headers search to musl too
15
16Upstream-Status: Pending
17
18Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20---
21 gcc/Makefile.in | 2 ++
22 gcc/config/linux.h | 8 ++++++++
23 gcc/config/rs6000/sysv4.h | 8 ++++++++
24 gcc/cppdefault.cc | 4 ++++
25 4 files changed, 22 insertions(+)
26
27diff --git a/gcc/Makefile.in b/gcc/Makefile.in
28index a8277254696..07fa63b6640 100644
29--- a/gcc/Makefile.in
30+++ b/gcc/Makefile.in
31@@ -632,6 +632,7 @@ libexecdir = @libexecdir@
32
33 # Directory in which the compiler finds libraries etc.
34 libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
35+libsubdir_target = $(target_noncanonical)/$(version)
36 # Directory in which the compiler finds executables
37 libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
38 # Directory in which all plugin resources are installed
39@@ -3024,6 +3025,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
40
41 PREPROCESSOR_DEFINES = \
42 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
43+ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
44 -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
45 -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
46 -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
47diff --git a/gcc/config/linux.h b/gcc/config/linux.h
48index 4ce173384ef..8a3cd4f2d34 100644
49--- a/gcc/config/linux.h
50+++ b/gcc/config/linux.h
51@@ -170,6 +170,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
52 #define INCLUDE_DEFAULTS_MUSL_TOOL
53 #endif
54
55+#ifdef GCC_INCLUDE_SUBDIR_TARGET
56+#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
57+ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0},
58+#else
59+#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET
60+#endif
61+
62 #ifdef NATIVE_SYSTEM_HEADER_DIR
63 #define INCLUDE_DEFAULTS_MUSL_NATIVE \
64 { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
65@@ -196,6 +203,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
66 INCLUDE_DEFAULTS_MUSL_PREFIX \
67 INCLUDE_DEFAULTS_MUSL_CROSS \
68 INCLUDE_DEFAULTS_MUSL_TOOL \
69+ INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
70 INCLUDE_DEFAULTS_MUSL_NATIVE \
71 { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
72 { 0, 0, 0, 0, 0, 0 } \
73diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
74index a73954d9de5..e5dd6538358 100644
75--- a/gcc/config/rs6000/sysv4.h
76+++ b/gcc/config/rs6000/sysv4.h
77@@ -994,6 +994,13 @@ ncrtn.o%s"
78 #define INCLUDE_DEFAULTS_MUSL_TOOL
79 #endif
80
81+#ifdef GCC_INCLUDE_SUBDIR_TARGET
82+#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
83+ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0},
84+#else
85+#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET
86+#endif
87+
88 #ifdef NATIVE_SYSTEM_HEADER_DIR
89 #define INCLUDE_DEFAULTS_MUSL_NATIVE \
90 { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
91@@ -1020,6 +1027,7 @@ ncrtn.o%s"
92 INCLUDE_DEFAULTS_MUSL_PREFIX \
93 INCLUDE_DEFAULTS_MUSL_CROSS \
94 INCLUDE_DEFAULTS_MUSL_TOOL \
95+ INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
96 INCLUDE_DEFAULTS_MUSL_NATIVE \
97 { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
98 { 0, 0, 0, 0, 0, 0 } \
99diff --git a/gcc/cppdefault.cc b/gcc/cppdefault.cc
100index 7888300f277..52cf14e92f8 100644
101--- a/gcc/cppdefault.cc
102+++ b/gcc/cppdefault.cc
103@@ -64,6 +64,10 @@ const struct default_include cpp_include_defaults[]
104 /* This is the dir for gcc's private headers. */
105 { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
106 #endif
107+#ifdef GCC_INCLUDE_SUBDIR_TARGET
108+ /* This is the dir for gcc's private headers under the specified sysroot. */
109+ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
110+#endif
111 #ifdef LOCAL_INCLUDE_DIR
112 /* /usr/local/include comes before the fixincluded header files. */
113 { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch
deleted file mode 100644
index 94308b2a..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From 9ae49e7b88c208ab79ec9c2fc4a2fa8a3f1e85bb Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 3 Mar 2015 08:21:19 +0000
4Subject: [PATCH] Don't search host directory during "relink" if $inst_prefix
5 is provided
6
7http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html
8
9Upstream-Status: Submitted
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 ltmain.sh | 5 +++--
14 1 file changed, 3 insertions(+), 2 deletions(-)
15
16diff --git a/ltmain.sh b/ltmain.sh
17index 9ebc7e3d1e0..7ea79fa8be6 100644
18--- a/ltmain.sh
19+++ b/ltmain.sh
20@@ -6004,12 +6004,13 @@ func_mode_link ()
21 fi
22 else
23 # We cannot seem to hardcode it, guess we'll fake it.
24+ # Default if $libdir is not relative to the prefix:
25 add_dir="-L$libdir"
26- # Try looking first in the location we're being installed to.
27+
28 if test -n "$inst_prefix_dir"; then
29 case $libdir in
30 [\\/]*)
31- add_dir="$add_dir -L$inst_prefix_dir$libdir"
32+ add_dir="-L$inst_prefix_dir$libdir"
33 ;;
34 esac
35 fi
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch
deleted file mode 100644
index ce9635ce..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1From bf918db7117f41d3c04162095641165ca241707d Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Sun, 5 Jul 2015 20:25:18 -0700
4Subject: [PATCH] libcc1: fix libcc1's install path and rpath
5
6* Install libcc1.so and libcc1plugin.so into
7 $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we
8 had done to lto-plugin.
9* Fix bad RPATH iussue:
10 gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file
11 /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0
12 [rpaths]
13
14Upstream-Status: Inappropriate [OE configuration]
15
16Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
17---
18 libcc1/Makefile.am | 4 ++--
19 libcc1/Makefile.in | 4 ++--
20 2 files changed, 4 insertions(+), 4 deletions(-)
21
22diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
23index 6e3a34ff7e2..3f3f6391aba 100644
24--- a/libcc1/Makefile.am
25+++ b/libcc1/Makefile.am
26@@ -40,8 +40,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
27 $(Wc)$(libiberty_normal)))
28 libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
29
30-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
31-cc1libdir = $(libdir)/$(libsuffix)
32+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
33+plugindir = $(cc1libdir)
34
35 if ENABLE_PLUGIN
36 plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la
37diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
38index f8f590d71e9..56462492045 100644
39--- a/libcc1/Makefile.in
40+++ b/libcc1/Makefile.in
41@@ -396,8 +396,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
42 $(Wc)$(libiberty_normal)))
43
44 libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
45-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
46-cc1libdir = $(libdir)/$(libsuffix)
47+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
48+plugindir = $(cc1libdir)
49 @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la
50 @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
51 shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch
deleted file mode 100644
index 3b547195..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch
+++ /dev/null
@@ -1,510 +0,0 @@
1From 4fbbd40d7db89cdbeaf93df1e1da692b1f80a5bc Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 7 Dec 2015 23:39:54 +0000
4Subject: [PATCH] handle sysroot support for nativesdk-gcc
5
6Being able to build a nativesdk gcc is useful, particularly in cases
7where the host compiler may be of an incompatible version (or a 32
8bit compiler is needed).
9
10Sadly, building nativesdk-gcc is not straight forward. We install
11nativesdk-gcc into a relocatable location and this means that its
12library locations can change. "Normal" sysroot support doesn't help
13in this case since the values of paths like "libdir" change, not just
14base root directory of the system.
15
16In order to handle this we do two things:
17
18a) Add %r into spec file markup which can be used for injected paths
19 such as SYSTEMLIBS_DIR (see gcc_multilib_setup()).
20b) Add other paths which need relocation into a .gccrelocprefix section
21 which the relocation code will notice and adjust automatically.
22
23Upstream-Status: Inappropriate
24RP 2015/7/28
25
26Extend the gccrelocprefix support to musl config too, this ensures
27that gcc will get right bits in SDK installations
28
29Signed-off-by: Khem Raj <raj.khem@gmail.com>
30
31Added PREFIXVAR and EXEC_PREFIXVAR to support runtime relocation. Without
32these as part of the gccrelocprefix the system can't do runtime relocation
33if the executable is moved. (These paths were missed in the original
34implementation.)
35
36Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
37---
38 gcc/c-family/c-opts.cc | 4 +--
39 gcc/config/linux.h | 24 +++++++--------
40 gcc/config/rs6000/sysv4.h | 24 +++++++--------
41 gcc/cppdefault.cc | 63 ++++++++++++++++++++++++---------------
42 gcc/cppdefault.h | 13 ++++----
43 gcc/gcc.cc | 20 +++++++++----
44 gcc/incpath.cc | 12 ++++----
45 gcc/prefix.cc | 6 ++--
46 8 files changed, 94 insertions(+), 72 deletions(-)
47
48diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc
49index a341a061758..83b0bef4dbb 100644
50--- a/gcc/c-family/c-opts.cc
51+++ b/gcc/c-family/c-opts.cc
52@@ -1458,8 +1458,8 @@ add_prefixed_path (const char *suffix, incpath_kind chain)
53 size_t prefix_len, suffix_len;
54
55 suffix_len = strlen (suffix);
56- prefix = iprefix ? iprefix : cpp_GCC_INCLUDE_DIR;
57- prefix_len = iprefix ? strlen (iprefix) : cpp_GCC_INCLUDE_DIR_len;
58+ prefix = iprefix ? iprefix : GCC_INCLUDE_DIRVAR;
59+ prefix_len = iprefix ? strlen (iprefix) : strlen(GCC_INCLUDE_DIRVAR) - 7;
60
61 path = (char *) xmalloc (prefix_len + suffix_len + 1);
62 memcpy (path, prefix, prefix_len);
63diff --git a/gcc/config/linux.h b/gcc/config/linux.h
64index 8a3cd4f2d34..58143dff731 100644
65--- a/gcc/config/linux.h
66+++ b/gcc/config/linux.h
67@@ -134,53 +134,53 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
68 * Unfortunately, this is mostly duplicated from cppdefault.cc */
69 #if DEFAULT_LIBC == LIBC_MUSL
70 #define INCLUDE_DEFAULTS_MUSL_GPP \
71- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
72+ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1, \
73 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
74- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
75+ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1, \
76 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
77- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
78+ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1, \
79 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
80
81 #ifdef LOCAL_INCLUDE_DIR
82 #define INCLUDE_DEFAULTS_MUSL_LOCAL \
83- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
84- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
85+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 }, \
86+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 },
87 #else
88 #define INCLUDE_DEFAULTS_MUSL_LOCAL
89 #endif
90
91 #ifdef PREFIX_INCLUDE_DIR
92 #define INCLUDE_DEFAULTS_MUSL_PREFIX \
93- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
94+ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0},
95 #else
96 #define INCLUDE_DEFAULTS_MUSL_PREFIX
97 #endif
98
99 #ifdef CROSS_INCLUDE_DIR
100 #define INCLUDE_DEFAULTS_MUSL_CROSS \
101- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
102+ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0},
103 #else
104 #define INCLUDE_DEFAULTS_MUSL_CROSS
105 #endif
106
107 #ifdef TOOL_INCLUDE_DIR
108 #define INCLUDE_DEFAULTS_MUSL_TOOL \
109- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
110+ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0},
111 #else
112 #define INCLUDE_DEFAULTS_MUSL_TOOL
113 #endif
114
115 #ifdef GCC_INCLUDE_SUBDIR_TARGET
116 #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
117- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0},
118+ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0},
119 #else
120 #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET
121 #endif
122
123 #ifdef NATIVE_SYSTEM_HEADER_DIR
124 #define INCLUDE_DEFAULTS_MUSL_NATIVE \
125- { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
126- { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
127+ { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 2 }, \
128+ { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 0 },
129 #else
130 #define INCLUDE_DEFAULTS_MUSL_NATIVE
131 #endif
132@@ -205,7 +205,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
133 INCLUDE_DEFAULTS_MUSL_TOOL \
134 INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
135 INCLUDE_DEFAULTS_MUSL_NATIVE \
136- { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
137+ { GCC_INCLUDE_DIRVAR, "GCC", 0, 1, 0, 0 }, \
138 { 0, 0, 0, 0, 0, 0 } \
139 }
140 #endif
141diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
142index e5dd6538358..b496849b792 100644
143--- a/gcc/config/rs6000/sysv4.h
144+++ b/gcc/config/rs6000/sysv4.h
145@@ -958,53 +958,53 @@ ncrtn.o%s"
146 /* Include order changes for musl, same as in generic linux.h. */
147 #if DEFAULT_LIBC == LIBC_MUSL
148 #define INCLUDE_DEFAULTS_MUSL_GPP \
149- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
150+ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1, \
151 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
152- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
153+ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1, \
154 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
155- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
156+ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1, \
157 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
158
159 #ifdef LOCAL_INCLUDE_DIR
160 #define INCLUDE_DEFAULTS_MUSL_LOCAL \
161- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
162- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
163+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 }, \
164+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 },
165 #else
166 #define INCLUDE_DEFAULTS_MUSL_LOCAL
167 #endif
168
169 #ifdef PREFIX_INCLUDE_DIR
170 #define INCLUDE_DEFAULTS_MUSL_PREFIX \
171- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
172+ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0},
173 #else
174 #define INCLUDE_DEFAULTS_MUSL_PREFIX
175 #endif
176
177 #ifdef CROSS_INCLUDE_DIR
178 #define INCLUDE_DEFAULTS_MUSL_CROSS \
179- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
180+ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0},
181 #else
182 #define INCLUDE_DEFAULTS_MUSL_CROSS
183 #endif
184
185 #ifdef TOOL_INCLUDE_DIR
186 #define INCLUDE_DEFAULTS_MUSL_TOOL \
187- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
188+ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0},
189 #else
190 #define INCLUDE_DEFAULTS_MUSL_TOOL
191 #endif
192
193 #ifdef GCC_INCLUDE_SUBDIR_TARGET
194 #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
195- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0},
196+ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0},
197 #else
198 #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET
199 #endif
200
201 #ifdef NATIVE_SYSTEM_HEADER_DIR
202 #define INCLUDE_DEFAULTS_MUSL_NATIVE \
203- { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
204- { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
205+ { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 2 }, \
206+ { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 0 },
207 #else
208 #define INCLUDE_DEFAULTS_MUSL_NATIVE
209 #endif
210@@ -1029,7 +1029,7 @@ ncrtn.o%s"
211 INCLUDE_DEFAULTS_MUSL_TOOL \
212 INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
213 INCLUDE_DEFAULTS_MUSL_NATIVE \
214- { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
215+ { GCC_INCLUDE_DIRVAR, "GCC", 0, 1, 0, 0 }, \
216 { 0, 0, 0, 0, 0, 0 } \
217 }
218 #endif
219diff --git a/gcc/cppdefault.cc b/gcc/cppdefault.cc
220index 52cf14e92f8..d8977afc05e 100644
221--- a/gcc/cppdefault.cc
222+++ b/gcc/cppdefault.cc
223@@ -35,6 +35,30 @@
224 # undef CROSS_INCLUDE_DIR
225 #endif
226
227+static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR;
228+char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR;
229+static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR;
230+static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR;
231+static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET;
232+#ifdef LOCAL_INCLUDE_DIR
233+static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR;
234+#endif
235+#ifdef PREFIX_INCLUDE_DIR
236+static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR;
237+#endif
238+#ifdef FIXED_INCLUDE_DIR
239+static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR;
240+#endif
241+#ifdef CROSS_INCLUDE_DIR
242+static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR;
243+#endif
244+#ifdef TOOL_INCLUDE_DIR
245+static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR;
246+#endif
247+#ifdef NATIVE_SYSTEM_HEADER_DIR
248+static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR;
249+#endif
250+
251 const struct default_include cpp_include_defaults[]
252 #ifdef INCLUDE_DEFAULTS
253 = INCLUDE_DEFAULTS;
254@@ -42,17 +66,17 @@ const struct default_include cpp_include_defaults[]
255 = {
256 #ifdef GPLUSPLUS_INCLUDE_DIR
257 /* Pick up GNU C++ generic include files. */
258- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
259+ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1,
260 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
261 #endif
262 #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
263 /* Pick up GNU C++ target-dependent include files. */
264- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
265+ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1,
266 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
267 #endif
268 #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
269 /* Pick up GNU C++ backward and deprecated include files. */
270- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
271+ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1,
272 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
273 #endif
274 #ifdef GPLUSPLUS_LIBCXX_INCLUDE_DIR
275@@ -62,23 +86,23 @@ const struct default_include cpp_include_defaults[]
276 #endif
277 #ifdef GCC_INCLUDE_DIR
278 /* This is the dir for gcc's private headers. */
279- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
280+ { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
281 #endif
282 #ifdef GCC_INCLUDE_SUBDIR_TARGET
283 /* This is the dir for gcc's private headers under the specified sysroot. */
284- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
285+ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 },
286 #endif
287 #ifdef LOCAL_INCLUDE_DIR
288 /* /usr/local/include comes before the fixincluded header files. */
289- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
290- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
291+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 },
292+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 },
293 #endif
294 #ifdef PREFIX_INCLUDE_DIR
295- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 },
296+ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 },
297 #endif
298 #ifdef FIXED_INCLUDE_DIR
299 /* This is the dir for fixincludes. */
300- { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0,
301+ { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0,
302 /* A multilib suffix needs adding if different multilibs use
303 different headers. */
304 #ifdef SYSROOT_HEADERS_SUFFIX_SPEC
305@@ -90,33 +114,24 @@ const struct default_include cpp_include_defaults[]
306 #endif
307 #ifdef CROSS_INCLUDE_DIR
308 /* One place the target system's headers might be. */
309- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
310+ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
311 #endif
312 #ifdef TOOL_INCLUDE_DIR
313 /* Another place the target system's headers might be. */
314- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 },
315+ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 },
316 #endif
317 #ifdef NATIVE_SYSTEM_HEADER_DIR
318 /* /usr/include comes dead last. */
319- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
320- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
321+ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
322+ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
323 #endif
324 { 0, 0, 0, 0, 0, 0 }
325 };
326 #endif /* no INCLUDE_DEFAULTS */
327
328-#ifdef GCC_INCLUDE_DIR
329-const char cpp_GCC_INCLUDE_DIR[] = GCC_INCLUDE_DIR;
330-const size_t cpp_GCC_INCLUDE_DIR_len = sizeof GCC_INCLUDE_DIR - 8;
331-#else
332-const char cpp_GCC_INCLUDE_DIR[] = "";
333-const size_t cpp_GCC_INCLUDE_DIR_len = 0;
334-#endif
335-
336 /* The configured prefix. */
337-const char cpp_PREFIX[] = PREFIX;
338-const size_t cpp_PREFIX_len = sizeof PREFIX - 1;
339-const char cpp_EXEC_PREFIX[] = STANDARD_EXEC_PREFIX;
340+char PREFIXVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX;
341+char EXEC_PREFIXVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX;
342
343 /* This value is set by cpp_relocated at runtime */
344 const char *gcc_exec_prefix;
345diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
346index fb97c0b5814..6267150facc 100644
347--- a/gcc/cppdefault.h
348+++ b/gcc/cppdefault.h
349@@ -33,7 +33,8 @@
350
351 struct default_include
352 {
353- const char *const fname; /* The name of the directory. */
354+ const char *fname; /* The name of the directory. */
355+
356 const char *const component; /* The component containing the directory
357 (see update_path in prefix.cc) */
358 const char cplusplus; /* When this is non-zero, we should only
359@@ -55,17 +56,13 @@ struct default_include
360 };
361
362 extern const struct default_include cpp_include_defaults[];
363-extern const char cpp_GCC_INCLUDE_DIR[];
364-extern const size_t cpp_GCC_INCLUDE_DIR_len;
365+extern char GCC_INCLUDE_DIRVAR[] __attribute__ ((section (".gccrelocprefix")));
366
367 /* The configure-time prefix, i.e., the value supplied as the argument
368 to --prefix=. */
369-extern const char cpp_PREFIX[];
370+extern char PREFIXVAR[] __attribute__ ((section (".gccrelocprefix")));
371 /* The length of the configure-time prefix. */
372-extern const size_t cpp_PREFIX_len;
373-/* The configure-time execution prefix. This is typically the lib/gcc
374- subdirectory of cpp_PREFIX. */
375-extern const char cpp_EXEC_PREFIX[];
376+extern char EXEC_PREFIXVAR[] __attribute__ ((section (".gccrelocprefix")));
377 /* The run-time execution prefix. This is typically the lib/gcc
378 subdirectory of the actual installation. */
379 extern const char *gcc_exec_prefix;
380diff --git a/gcc/gcc.cc b/gcc/gcc.cc
381index aa4cf92fb78..5569a39a14a 100644
382--- a/gcc/gcc.cc
383+++ b/gcc/gcc.cc
384@@ -252,6 +252,8 @@ FILE *report_times_to_file = NULL;
385 #endif
386 static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT;
387
388+static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR;
389+
390 /* Nonzero means pass the updated target_system_root to the compiler. */
391
392 static int target_system_root_changed;
393@@ -575,6 +577,7 @@ or with constant text in a single argument.
394 %G process LIBGCC_SPEC as a spec.
395 %R Output the concatenation of target_system_root and
396 target_sysroot_suffix.
397+ %r Output the base path target_relocatable_prefix
398 %S process STARTFILE_SPEC as a spec. A capital S is actually used here.
399 %E process ENDFILE_SPEC as a spec. A capital E is actually used here.
400 %C process CPP_SPEC as a spec.
401@@ -1627,10 +1630,10 @@ static const char *gcc_libexec_prefix;
402 gcc_exec_prefix is set because, in that case, we know where the
403 compiler has been installed, and use paths relative to that
404 location instead. */
405-static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
406-static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX;
407-static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
408-static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
409+static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX;
410+static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX;
411+static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX;
412+static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
413
414 /* For native compilers, these are well-known paths containing
415 components that may be provided by the system. For cross
416@@ -1638,9 +1641,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
417 static const char *md_exec_prefix = MD_EXEC_PREFIX;
418 static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
419 static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
420-static const char *const standard_startfile_prefix_1
421+static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix")))
422 = STANDARD_STARTFILE_PREFIX_1;
423-static const char *const standard_startfile_prefix_2
424+static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix")))
425 = STANDARD_STARTFILE_PREFIX_2;
426
427 /* A relative path to be used in finding the location of tools
428@@ -6676,6 +6679,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
429 }
430 break;
431
432+ case 'r':
433+ obstack_grow (&obstack, target_relocatable_prefix,
434+ strlen (target_relocatable_prefix));
435+ break;
436+
437 case 'S':
438 value = do_spec_1 (startfile_spec, 0, NULL);
439 if (value != 0)
440diff --git a/gcc/incpath.cc b/gcc/incpath.cc
441index c80f100f476..5ac03c08693 100644
442--- a/gcc/incpath.cc
443+++ b/gcc/incpath.cc
444@@ -135,7 +135,7 @@ add_standard_paths (const char *sysroot, const char *iprefix,
445 int relocated = cpp_relocated ();
446 size_t len;
447
448- if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0)
449+ if (iprefix && (len = strlen(GCC_INCLUDE_DIRVAR) - 7) != 0)
450 {
451 /* Look for directories that start with the standard prefix.
452 "Translate" them, i.e. replace /usr/local/lib/gcc... with
453@@ -150,7 +150,7 @@ add_standard_paths (const char *sysroot, const char *iprefix,
454 now. */
455 if (sysroot && p->add_sysroot)
456 continue;
457- if (!filename_ncmp (p->fname, cpp_GCC_INCLUDE_DIR, len))
458+ if (!filename_ncmp (p->fname, GCC_INCLUDE_DIRVAR, len))
459 {
460 char *str = concat (iprefix, p->fname + len, NULL);
461 if (p->multilib == 1 && imultilib)
462@@ -191,7 +191,7 @@ add_standard_paths (const char *sysroot, const char *iprefix,
463 free (sysroot_no_trailing_dir_separator);
464 }
465 else if (!p->add_sysroot && relocated
466- && !filename_ncmp (p->fname, cpp_PREFIX, cpp_PREFIX_len))
467+ && !filename_ncmp (p->fname, PREFIXVAR, strlen(PREFIXVAR)))
468 {
469 static const char *relocated_prefix;
470 char *ostr;
471@@ -208,12 +208,12 @@ add_standard_paths (const char *sysroot, const char *iprefix,
472 dummy = concat (gcc_exec_prefix, "dummy", NULL);
473 relocated_prefix
474 = make_relative_prefix (dummy,
475- cpp_EXEC_PREFIX,
476- cpp_PREFIX);
477+ EXEC_PREFIXVAR,
478+ PREFIXVAR);
479 free (dummy);
480 }
481 ostr = concat (relocated_prefix,
482- p->fname + cpp_PREFIX_len,
483+ p->fname + strlen(PREFIXVAR),
484 NULL);
485 str = update_path (ostr, p->component);
486 free (ostr);
487diff --git a/gcc/prefix.cc b/gcc/prefix.cc
488index 096ed5afa3d..2526f0ecc39 100644
489--- a/gcc/prefix.cc
490+++ b/gcc/prefix.cc
491@@ -72,7 +72,9 @@ License along with GCC; see the file COPYING3. If not see
492 #include "prefix.h"
493 #include "common/common-target.h"
494
495-static const char *std_prefix = PREFIX;
496+char PREFIXVAR1[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX;
497+
498+static const char *std_prefix = PREFIXVAR1;
499
500 static const char *get_key_value (char *);
501 static char *translate_name (char *);
502@@ -212,7 +214,7 @@ translate_name (char *name)
503 prefix = getenv (key);
504
505 if (prefix == 0)
506- prefix = PREFIX;
507+ prefix = PREFIXVAR1;
508
509 /* We used to strip trailing DIR_SEPARATORs here, but that can
510 sometimes yield a result with no separator when one was coded
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch
deleted file mode 100644
index 9b05da64..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch
+++ /dev/null
@@ -1,99 +0,0 @@
1From 33a1f07a4417247dc24819d4e583ca09f56d5a7b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 7 Dec 2015 23:41:45 +0000
4Subject: [PATCH] Search target sysroot gcc version specific dirs with
5 multilib.
6
7We install the gcc libraries (such as crtbegin.p) into
8<sysroot><libdir>/<target-sys>/5.2.0/
9which is a default search path for GCC (aka multi_suffix in the
10code below). <target-sys> is 'machine' in gcc's terminology. We use
11these directories so that multiple gcc versions could in theory
12co-exist on target.
13
14We only want to build one gcc-cross-canadian per arch and have this work
15for all multilibs. <target-sys> can be handled by mapping the multilib
16<target-sys> to the one used by gcc-cross-canadian, e.g.
17mips64-polkmllib32-linux
18is symlinked to by mips64-poky-linux.
19
20The default gcc search path in the target sysroot for a "lib64" mutlilib
21is:
22
23<sysroot>/lib32/mips64-poky-linux/5.2.0/
24<sysroot>/lib32/../lib64/
25<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
26<sysroot>/usr/lib32/../lib64/
27<sysroot>/lib32/
28<sysroot>/usr/lib32/
29
30which means that the lib32 crtbegin.o will be found and the lib64 ones
31will not which leads to compiler failures.
32
33This patch injects a multilib version of that path first so the lib64
34binaries can be found first. With this change the search path becomes:
35
36<sysroot>/lib32/../lib64/mips64-poky-linux/5.2.0/
37<sysroot>/lib32/mips64-poky-linux/5.2.0/
38<sysroot>/lib32/../lib64/
39<sysroot>/usr/lib32/../lib64/mips64-poky-linux/5.2.0/
40<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
41<sysroot>/usr/lib32/../lib64/
42<sysroot>/lib32/
43<sysroot>/usr/lib32/
44
45Upstream-Status: Pending
46RP 2015/7/31
47
48Signed-off-by: Khem Raj <raj.khem@gmail.com>
49---
50 gcc/gcc.cc | 29 ++++++++++++++++++++++++++++-
51 1 file changed, 28 insertions(+), 1 deletion(-)
52
53diff --git a/gcc/gcc.cc b/gcc/gcc.cc
54index 5569a39a14a..4598f6cd7c9 100644
55--- a/gcc/gcc.cc
56+++ b/gcc/gcc.cc
57@@ -2817,7 +2817,7 @@ for_each_path (const struct path_prefix *paths,
58 if (path == NULL)
59 {
60 len = paths->max_len + extra_space + 1;
61- len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
62+ len += MAX ((suffix_len + multi_os_dir_len), multiarch_len);
63 path = XNEWVEC (char, len);
64 }
65
66@@ -2829,6 +2829,33 @@ for_each_path (const struct path_prefix *paths,
67 /* Look first in MACHINE/VERSION subdirectory. */
68 if (!skip_multi_dir)
69 {
70+ if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
71+ {
72+ const char *this_multi;
73+ size_t this_multi_len;
74+
75+ if (pl->os_multilib)
76+ {
77+ this_multi = multi_os_dir;
78+ this_multi_len = multi_os_dir_len;
79+ }
80+ else
81+ {
82+ this_multi = multi_dir;
83+ this_multi_len = multi_dir_len;
84+ }
85+
86+ /* Look in multilib MACHINE/VERSION subdirectory first */
87+ if (this_multi_len)
88+ {
89+ memcpy (path + len, this_multi, this_multi_len + 1);
90+ memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1);
91+ ret = callback (path, callback_info);
92+ if (ret)
93+ break;
94+ }
95+ }
96+
97 memcpy (path + len, multi_suffix, suffix_len + 1);
98 ret = callback (path, callback_info);
99 if (ret)
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
deleted file mode 100644
index 56793e03..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
+++ /dev/null
@@ -1,84 +0,0 @@
1From d7dc2861840e88a4592817a398a054a886c3f3ee Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 27 Jun 2017 18:10:54 -0700
4Subject: [PATCH] Add ssp_nonshared to link commandline for musl targets
5
6when -fstack-protector options are enabled we need to
7link with ssp_shared on musl since it does not provide
8the __stack_chk_fail_local() so essentially it provides
9libssp but not libssp_nonshared something like
10TARGET_LIBC_PROVIDES_SSP_BUT_NOT_SSP_NONSHARED
11 where-as for glibc the needed symbols
12are already present in libc_nonshared library therefore
13we do not need any library helper on glibc based systems
14but musl needs the libssp_noshared from gcc
15
16Upstream-Status: Pending
17
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 gcc/config/linux.h | 7 +++++++
21 gcc/config/rs6000/linux.h | 10 ++++++++++
22 gcc/config/rs6000/linux64.h | 10 ++++++++++
23 3 files changed, 27 insertions(+)
24
25diff --git a/gcc/config/linux.h b/gcc/config/linux.h
26index 58143dff731..d2409ccac26 100644
27--- a/gcc/config/linux.h
28+++ b/gcc/config/linux.h
29@@ -208,6 +208,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
30 { GCC_INCLUDE_DIRVAR, "GCC", 0, 1, 0, 0 }, \
31 { 0, 0, 0, 0, 0, 0 } \
32 }
33+#ifdef TARGET_LIBC_PROVIDES_SSP
34+#undef LINK_SSP_SPEC
35+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
36+ "|fstack-protector-strong|fstack-protector-explicit" \
37+ ":-lssp_nonshared}"
38+#endif
39+
40 #endif
41
42 #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */
43diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
44index 8c9039ac1e5..259cd485973 100644
45--- a/gcc/config/rs6000/linux.h
46+++ b/gcc/config/rs6000/linux.h
47@@ -99,6 +99,16 @@
48 " -m elf32ppclinux")
49 #endif
50
51+/* link libssp_nonshared.a with musl */
52+#if DEFAULT_LIBC == LIBC_MUSL
53+#ifdef TARGET_LIBC_PROVIDES_SSP
54+#undef LINK_SSP_SPEC
55+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
56+ "|fstack-protector-strong|fstack-protector-explicit" \
57+ ":-lssp_nonshared}"
58+#endif
59+#endif
60+
61 #undef LINK_OS_LINUX_SPEC
62 #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \
63 %{!static-pie: \
64diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
65index 364c1a5b155..e33d9ae98e0 100644
66--- a/gcc/config/rs6000/linux64.h
67+++ b/gcc/config/rs6000/linux64.h
68@@ -372,6 +372,16 @@ extern int dot_symbols;
69 " -m elf64ppc")
70 #endif
71
72+/* link libssp_nonshared.a with musl */
73+#if DEFAULT_LIBC == LIBC_MUSL
74+#ifdef TARGET_LIBC_PROVIDES_SSP
75+#undef LINK_SSP_SPEC
76+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
77+ "|fstack-protector-strong|fstack-protector-explicit" \
78+ ":-lssp_nonshared}"
79+#endif
80+#endif
81+
82 #define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \
83 %{!static-pie: \
84 %{rdynamic:-export-dynamic} \
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch
deleted file mode 100644
index bb1699be..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From bf0d7c463e1fab62804556099b56319fe94be1eb Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 6 Jun 2018 12:10:22 -0700
4Subject: [PATCH] Re-introduce spe commandline options
5
6This should ensure that we keep accepting
7spe options
8
9Upstream-Status: Inappropriate [SPE port is removed from rs600 port]
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 gcc/config/rs6000/rs6000.opt | 13 +++++++++++++
14 1 file changed, 13 insertions(+)
15
16diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
17index 4931d781c4e..3fb87b6f7d5 100644
18--- a/gcc/config/rs6000/rs6000.opt
19+++ b/gcc/config/rs6000/rs6000.opt
20@@ -348,6 +348,19 @@ mdebug=
21 Target RejectNegative Joined
22 -mdebug= Enable debug output.
23
24+; PPC SPE ABI
25+mspe
26+Target Var(rs6000_spe) Save
27+Generate SPE SIMD instructions on E500.
28+
29+mabi=spe
30+Target RejectNegative Var(rs6000_spe_abi) Save
31+Use the SPE ABI extensions.
32+
33+mabi=no-spe
34+Target RejectNegative Var(rs6000_spe_abi, 0)
35+Do not use the SPE ABI extensions.
36+
37 ; Altivec ABI
38 mabi=altivec
39 Target RejectNegative Var(rs6000_altivec_abi) Save
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
deleted file mode 100644
index f3709208..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
+++ /dev/null
@@ -1,83 +0,0 @@
1From a32c75b37209d6836eaaa943dc6b1207acba5d27 Mon Sep 17 00:00:00 2001
2From: Szabolcs Nagy <nsz@port70.net>
3Date: Sat, 24 Oct 2015 20:09:53 +0000
4Subject: [PATCH] libgcc_s: Use alias for __cpu_indicator_init instead of
5 symver
6
7Adapter from
8
9https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00899.html
10
11This fix was debated but hasnt been applied gcc upstream since
12they expect musl to support '@' in symbol versioning which is
13a sun/gnu versioning extention. This patch however avoids the
14need for the '@' symbols at all
15
16libgcc/Changelog:
17
182015-05-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
19
20 * config/i386/cpuinfo.c (__cpu_indicator_init_local): Add.
21 (__cpu_indicator_init@GCC_4.8.0, __cpu_model@GCC_4.8.0): Remove.
22
23 * config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Remove -DUSE_ELF_SYMVER.
24
25gcc/Changelog:
26
272015-05-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
28
29 * config/i386/i386-expand.c (ix86_expand_builtin): Make __builtin_cpu_init
30 call __cpu_indicator_init_local instead of __cpu_indicator_init.
31
32Upstream-Status: Pending
33
34Signed-off-by: Khem Raj <raj.khem@gmail.com>
35---
36 gcc/config/i386/i386-expand.cc | 4 ++--
37 libgcc/config/i386/cpuinfo.c | 6 +++---
38 libgcc/config/i386/t-linux | 2 +-
39 3 files changed, 6 insertions(+), 6 deletions(-)
40
41diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
42index 68978ef8dc2..0c71f36b572 100644
43--- a/gcc/config/i386/i386-expand.cc
44+++ b/gcc/config/i386/i386-expand.cc
45@@ -12321,10 +12321,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
46 {
47 case IX86_BUILTIN_CPU_INIT:
48 {
49- /* Make it call __cpu_indicator_init in libgcc. */
50+ /* Make it call __cpu_indicator_init_local in libgcc.a. */
51 tree call_expr, fndecl, type;
52 type = build_function_type_list (integer_type_node, NULL_TREE);
53- fndecl = build_fn_decl ("__cpu_indicator_init", type);
54+ fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
55 call_expr = build_call_expr (fndecl, 0);
56 return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
57 }
58diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
59index dab1d98060f..cf824b4114a 100644
60--- a/libgcc/config/i386/cpuinfo.c
61+++ b/libgcc/config/i386/cpuinfo.c
62@@ -63,7 +63,7 @@ __cpu_indicator_init (void)
63 __cpu_features2);
64 }
65
66-#if defined SHARED && defined USE_ELF_SYMVER
67-__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
68-__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
69+#ifndef SHARED
70+int __cpu_indicator_init_local (void)
71+ __attribute__ ((weak, alias ("__cpu_indicator_init")));
72 #endif
73diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
74index 8506a635790..564296f788e 100644
75--- a/libgcc/config/i386/t-linux
76+++ b/libgcc/config/i386/t-linux
77@@ -3,5 +3,5 @@
78 # t-slibgcc-elf-ver and t-linux
79 SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
80
81-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS)
82+HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS)
83 CRTSTUFF_T_CFLAGS += $(CET_FLAGS)
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch
deleted file mode 100644
index f5f04ae3..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch
+++ /dev/null
@@ -1,182 +0,0 @@
1From 4efc42b99c96b026f560b0918de7e237ac3dc8d1 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Tue, 10 Mar 2020 08:26:53 -0700
4Subject: [PATCH] gentypes/genmodes: Do not use __LINE__ for maintaining
5 reproducibility
6
7Inserting line numbers into generated code means its not always reproducible wth
8differing versions of host gcc. Void the issue by not adding these.
9
10Upstream-Status: Inappropriate [OE Reproducibility specific]
11
12Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 gcc/gengtype.cc | 6 +++---
16 gcc/genmodes.cc | 32 ++++++++++++++++----------------
17 2 files changed, 19 insertions(+), 19 deletions(-)
18
19diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc
20index 386ae1b0506..9762e914296 100644
21--- a/gcc/gengtype.cc
22+++ b/gcc/gengtype.cc
23@@ -1006,7 +1006,7 @@ create_field_at (pair_p next, type_p type, const char *name, options_p opt,
24 /* Create a fake field with the given type and name. NEXT is the next
25 field in the chain. */
26 #define create_field(next,type,name) \
27- create_field_all (next,type,name, 0, this_file, __LINE__)
28+ create_field_all (next,type,name, 0, this_file, 0)
29
30 /* Like create_field, but the field is only valid when condition COND
31 is true. */
32@@ -1039,7 +1039,7 @@ create_optional_field_ (pair_p next, type_p type, const char *name,
33 }
34
35 #define create_optional_field(next,type,name,cond) \
36- create_optional_field_(next,type,name,cond,__LINE__)
37+ create_optional_field_(next,type,name,cond,0)
38
39 /* Reverse a linked list of 'struct pair's in place. */
40 pair_p
41@@ -5238,7 +5238,7 @@ main (int argc, char **argv)
42 /* These types are set up with #define or else outside of where
43 we can see them. We should initialize them before calling
44 read_input_list. */
45-#define POS_HERE(Call) do { pos.file = this_file; pos.line = __LINE__; \
46+#define POS_HERE(Call) do { pos.file = this_file; pos.line = 0; \
47 Call;} while (0)
48 POS_HERE (do_scalar_typedef ("CUMULATIVE_ARGS", &pos));
49 POS_HERE (do_scalar_typedef ("REAL_VALUE_TYPE", &pos));
50diff --git a/gcc/genmodes.cc b/gcc/genmodes.cc
51index 59850bb070a..e187f8542a1 100644
52--- a/gcc/genmodes.cc
53+++ b/gcc/genmodes.cc
54@@ -440,7 +440,7 @@ complete_all_modes (void)
55 }
56
57 /* For each mode in class CLASS, construct a corresponding complex mode. */
58-#define COMPLEX_MODES(C) make_complex_modes (MODE_##C, __FILE__, __LINE__)
59+#define COMPLEX_MODES(C) make_complex_modes (MODE_##C, __FILE__, 0)
60 static void
61 make_complex_modes (enum mode_class cl,
62 const char *file, unsigned int line)
63@@ -499,7 +499,7 @@ make_complex_modes (enum mode_class cl,
64 having as many components as necessary. ORDER is the sorting order
65 of the mode, with smaller numbers indicating a higher priority. */
66 #define VECTOR_MODES_WITH_PREFIX(PREFIX, C, W, ORDER) \
67- make_vector_modes (MODE_##C, #PREFIX, W, ORDER, __FILE__, __LINE__)
68+ make_vector_modes (MODE_##C, #PREFIX, W, ORDER, __FILE__, 0)
69 #define VECTOR_MODES(C, W) VECTOR_MODES_WITH_PREFIX (V, C, W, 0)
70 static void ATTRIBUTE_UNUSED
71 make_vector_modes (enum mode_class cl, const char *prefix, unsigned int width,
72@@ -552,7 +552,7 @@ make_vector_modes (enum mode_class cl, const char *prefix, unsigned int width,
73 BYTESIZE bytes in total. */
74 #define VECTOR_BOOL_MODE(NAME, COUNT, COMPONENT, BYTESIZE) \
75 make_vector_bool_mode (#NAME, COUNT, #COMPONENT, BYTESIZE, \
76- __FILE__, __LINE__)
77+ __FILE__, 0)
78 static void ATTRIBUTE_UNUSED
79 make_vector_bool_mode (const char *name, unsigned int count,
80 const char *component, unsigned int bytesize,
81@@ -574,7 +574,7 @@ make_vector_bool_mode (const char *name, unsigned int count,
82 /* Input. */
83
84 #define _SPECIAL_MODE(C, N) \
85- make_special_mode (MODE_##C, #N, __FILE__, __LINE__)
86+ make_special_mode (MODE_##C, #N, __FILE__, 0)
87 #define RANDOM_MODE(N) _SPECIAL_MODE (RANDOM, N)
88 #define CC_MODE(N) _SPECIAL_MODE (CC, N)
89
90@@ -587,7 +587,7 @@ make_special_mode (enum mode_class cl, const char *name,
91
92 #define INT_MODE(N, Y) FRACTIONAL_INT_MODE (N, -1U, Y)
93 #define FRACTIONAL_INT_MODE(N, B, Y) \
94- make_int_mode (#N, B, Y, __FILE__, __LINE__)
95+ make_int_mode (#N, B, Y, __FILE__, 0)
96
97 static void
98 make_int_mode (const char *name,
99@@ -628,16 +628,16 @@ make_opaque_mode (const char *name,
100 }
101
102 #define FRACT_MODE(N, Y, F) \
103- make_fixed_point_mode (MODE_FRACT, #N, Y, 0, F, __FILE__, __LINE__)
104+ make_fixed_point_mode (MODE_FRACT, #N, Y, 0, F, __FILE__, 0)
105
106 #define UFRACT_MODE(N, Y, F) \
107- make_fixed_point_mode (MODE_UFRACT, #N, Y, 0, F, __FILE__, __LINE__)
108+ make_fixed_point_mode (MODE_UFRACT, #N, Y, 0, F, __FILE__, 0)
109
110 #define ACCUM_MODE(N, Y, I, F) \
111- make_fixed_point_mode (MODE_ACCUM, #N, Y, I, F, __FILE__, __LINE__)
112+ make_fixed_point_mode (MODE_ACCUM, #N, Y, I, F, __FILE__, 0)
113
114 #define UACCUM_MODE(N, Y, I, F) \
115- make_fixed_point_mode (MODE_UACCUM, #N, Y, I, F, __FILE__, __LINE__)
116+ make_fixed_point_mode (MODE_UACCUM, #N, Y, I, F, __FILE__, 0)
117
118 /* Create a fixed-point mode by setting CL, NAME, BYTESIZE, IBIT, FBIT,
119 FILE, and LINE. */
120@@ -658,7 +658,7 @@ make_fixed_point_mode (enum mode_class cl,
121
122 #define FLOAT_MODE(N, Y, F) FRACTIONAL_FLOAT_MODE (N, -1U, Y, F)
123 #define FRACTIONAL_FLOAT_MODE(N, B, Y, F) \
124- make_float_mode (#N, B, Y, #F, __FILE__, __LINE__)
125+ make_float_mode (#N, B, Y, #F, __FILE__, 0)
126
127 static void
128 make_float_mode (const char *name,
129@@ -675,7 +675,7 @@ make_float_mode (const char *name,
130 #define DECIMAL_FLOAT_MODE(N, Y, F) \
131 FRACTIONAL_DECIMAL_FLOAT_MODE (N, -1U, Y, F)
132 #define FRACTIONAL_DECIMAL_FLOAT_MODE(N, B, Y, F) \
133- make_decimal_float_mode (#N, B, Y, #F, __FILE__, __LINE__)
134+ make_decimal_float_mode (#N, B, Y, #F, __FILE__, 0)
135
136 static void
137 make_decimal_float_mode (const char *name,
138@@ -690,7 +690,7 @@ make_decimal_float_mode (const char *name,
139 }
140
141 #define RESET_FLOAT_FORMAT(N, F) \
142- reset_float_format (#N, #F, __FILE__, __LINE__)
143+ reset_float_format (#N, #F, __FILE__, 0)
144 static void ATTRIBUTE_UNUSED
145 reset_float_format (const char *name, const char *format,
146 const char *file, unsigned int line)
147@@ -711,7 +711,7 @@ reset_float_format (const char *name, const char *format,
148
149 /* __intN support. */
150 #define INT_N(M,PREC) \
151- make_int_n (#M, PREC, __FILE__, __LINE__)
152+ make_int_n (#M, PREC, __FILE__, 0)
153 static void ATTRIBUTE_UNUSED
154 make_int_n (const char *m, int bitsize,
155 const char *file, unsigned int line)
156@@ -740,7 +740,7 @@ make_int_n (const char *m, int bitsize,
157 /* Partial integer modes are specified by relation to a full integer
158 mode. */
159 #define PARTIAL_INT_MODE(M,PREC,NAME) \
160- make_partial_integer_mode (#M, #NAME, PREC, __FILE__, __LINE__)
161+ make_partial_integer_mode (#M, #NAME, PREC, __FILE__, 0)
162 static void ATTRIBUTE_UNUSED
163 make_partial_integer_mode (const char *base, const char *name,
164 unsigned int precision,
165@@ -767,7 +767,7 @@ make_partial_integer_mode (const char *base, const char *name,
166 /* A single vector mode can be specified by naming its component
167 mode and the number of components. */
168 #define VECTOR_MODE_WITH_PREFIX(PREFIX, C, M, N, ORDER) \
169- make_vector_mode (MODE_##C, #PREFIX, #M, N, ORDER, __FILE__, __LINE__);
170+ make_vector_mode (MODE_##C, #PREFIX, #M, N, ORDER, __FILE__, 0);
171 #define VECTOR_MODE(C, M, N) VECTOR_MODE_WITH_PREFIX(V, C, M, N, 0);
172 static void ATTRIBUTE_UNUSED
173 make_vector_mode (enum mode_class bclass,
174@@ -814,7 +814,7 @@ make_vector_mode (enum mode_class bclass,
175
176 /* Adjustability. */
177 #define _ADD_ADJUST(A, M, X, C1, C2) \
178- new_adjust (#M, &adj_##A, #A, #X, MODE_##C1, MODE_##C2, __FILE__, __LINE__)
179+ new_adjust (#M, &adj_##A, #A, #X, MODE_##C1, MODE_##C2, __FILE__, 0)
180
181 #define ADJUST_NUNITS(M, X) _ADD_ADJUST (nunits, M, X, RANDOM, RANDOM)
182 #define ADJUST_BYTESIZE(M, X) _ADD_ADJUST (bytesize, M, X, RANDOM, RANDOM)
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch
deleted file mode 100644
index cb8969b1..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From c3870d073eb9e5d82f9d3067d0fa15038b69713a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 13 May 2020 15:10:38 -0700
4Subject: [PATCH] libatomic: Do not enforce march on aarch64
5
6OE passes the right options via gcc compiler cmdline via TUNE_CCARGS
7this can conflict between -mcpu settings and -march setting here, since
8-mcpu will translate into an appropriate -march, lets depend on that
9instead of setting it explicitly
10
11Upstream-Status: Inappropriate [OE-Specific]
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 libatomic/Makefile.am | 1 -
16 libatomic/Makefile.in | 1 -
17 2 files changed, 2 deletions(-)
18
19diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
20index c6c8d81c56a..d959a5d040e 100644
21--- a/libatomic/Makefile.am
22+++ b/libatomic/Makefile.am
23@@ -125,7 +125,6 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix _$(s)_.lo,$(SIZEOBJS)))
24 ## On a target-specific basis, include alternates to be selected by IFUNC.
25 if HAVE_IFUNC
26 if ARCH_AARCH64_LINUX
27-IFUNC_OPTIONS = -march=armv8-a+lse
28 libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS)))
29 libatomic_la_SOURCES += atomic_16.S
30
31diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
32index a0fa3dfc8cc..e70d389874a 100644
33--- a/libatomic/Makefile.in
34+++ b/libatomic/Makefile.in
35@@ -447,7 +447,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files)))
36 libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \
37 _$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_3) \
38 $(am__append_4) $(am__append_5)
39-@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8-a+lse
40 @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64
41 @ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586
42 @ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 -mcx16
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch
deleted file mode 100644
index 11f42c59..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 7bd6e631e4a5273f5ecc41a5a48830a1342e5926 Mon Sep 17 00:00:00 2001
2From: Andrei Gherzan <andrei.gherzan@huawei.com>
3Date: Wed, 22 Dec 2021 12:49:25 +0100
4Subject: [PATCH] Fix install path of linux64.h
5
6We add linux64.h to tm includes[1] as a relative path to B. This patch
7adapts the install path of linux64.h to match the include in tm.h.
8
9[1] 0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch
10
11Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
12
13Upstream-Status: Inappropriate [configuration]
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 gcc/Makefile.in | 2 ++
17 1 file changed, 2 insertions(+)
18
19diff --git a/gcc/Makefile.in b/gcc/Makefile.in
20index 065ce7e9a5b..d4c723968aa 100644
21--- a/gcc/Makefile.in
22+++ b/gcc/Makefile.in
23@@ -3738,6 +3738,8 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
24 "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \
25 | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \
26 base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \
27+ */linux64.h ) \
28+ base=`dirname $$path`;;\
29 *) base=`basename $$path` ;; \
30 esac; \
31 dest=$(plugin_includedir)/$$base; \
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0023-libatomic-Do-not-enforce-march-on-aarch64.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0023-libatomic-Do-not-enforce-march-on-aarch64.patch
deleted file mode 100644
index 2f016598..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0023-libatomic-Do-not-enforce-march-on-aarch64.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From 52931ec7a708b58d68e69ce9eb99001ae9f099dd Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 13 May 2020 15:10:38 -0700
4Subject: [PATCH] libatomic: Do not enforce march on aarch64
5
6OE passes the right options via gcc compiler cmdline via TUNE_CCARGS
7this can conflict between -mcpu settings and -march setting here, since
8-mcpu will translate into an appropriate -march, lets depend on that
9instead of setting it explicitly
10
11Upstream-Status: Inappropriate [OE-Specific]
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 libatomic/Makefile.am | 1 -
16 libatomic/Makefile.in | 1 -
17 2 files changed, 2 deletions(-)
18
19diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
20index d88515e4a03..e0e2f8b442a 100644
21--- a/libatomic/Makefile.am
22+++ b/libatomic/Makefile.am
23@@ -125,7 +125,6 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix _$(s)_.lo,$(SIZEOBJS)))
24 ## On a target-specific basis, include alternates to be selected by IFUNC.
25 if HAVE_IFUNC
26 if ARCH_AARCH64_LINUX
27-IFUNC_OPTIONS = -march=armv8-a+lse
28 libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS)))
29 endif
30 if ARCH_ARM_LINUX
31diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
32index 80d25653dc7..7377689ab34 100644
33--- a/libatomic/Makefile.in
34+++ b/libatomic/Makefile.in
35@@ -434,7 +434,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files)))
36 libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \
37 _$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \
38 $(am__append_3) $(am__append_4)
39-@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8-a+lse
40 @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64
41 @ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586
42 @ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 -mcx16
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch
deleted file mode 100644
index ad826901..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From 4623d87d779853a2862ee92a15a41fded81eddb8 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Sat, 20 Aug 2022 09:04:14 -0700
4Subject: [PATCH] Avoid hardcoded build paths into ppc libgcc
5
6Avoid encoding build paths into sources used for floating point on powerpc.
7(MACHINE=qemuppc bitbake libgcc).
8
9Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599882.html]
10Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 libgcc/config/rs6000/t-float128 | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/libgcc/config/rs6000/t-float128 b/libgcc/config/rs6000/t-float128
17index b09b5664af0..513e63748f1 100644
18--- a/libgcc/config/rs6000/t-float128
19+++ b/libgcc/config/rs6000/t-float128
20@@ -103,7 +103,7 @@ $(ibm128_dec_objs) : INTERNAL_CFLAGS += $(IBM128_CFLAGS_DECIMAL)
21 $(fp128_softfp_src) : $(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@)) $(fp128_dep)
22 @src="$(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@))"; \
23 echo "Create $@"; \
24- (echo "/* file created from $$src */"; \
25+ (echo "/* file created from `basename $$src` */"; \
26 echo; \
27 sed -f $(fp128_sed) < $$src) > $@
28
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0024-Fix-install-path-of-linux64.h.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0024-Fix-install-path-of-linux64.h.patch
deleted file mode 100644
index 555be623..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0024-Fix-install-path-of-linux64.h.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 3e67c9c77e46132c252911bf1e5e4222dfd3aa34 Mon Sep 17 00:00:00 2001
2From: Andrei Gherzan <andrei.gherzan@huawei.com>
3Date: Wed, 22 Dec 2021 12:49:25 +0100
4Subject: [PATCH] Fix install path of linux64.h
5
6We add linux64.h to tm includes[1] as a relative path to B. This patch
7adapts the install path of linux64.h to match the include in tm.h.
8
9[1] 0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch
10
11Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
12
13Upstream-Status: Inappropriate [configuration]
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 gcc/Makefile.in | 2 ++
17 1 file changed, 2 insertions(+)
18
19diff --git a/gcc/Makefile.in b/gcc/Makefile.in
20index 07fa63b6640..0def7394454 100644
21--- a/gcc/Makefile.in
22+++ b/gcc/Makefile.in
23@@ -3706,6 +3706,8 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
24 "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \
25 | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \
26 base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \
27+ */linux64.h ) \
28+ base=`dirname $$path`;;\
29 *) base=`basename $$path` ;; \
30 esac; \
31 dest=$(plugin_includedir)/$$base; \
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0026-rust-recursion-limit.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0026-rust-recursion-limit.patch
deleted file mode 100644
index bbe2f18f..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/0026-rust-recursion-limit.patch
+++ /dev/null
@@ -1,92 +0,0 @@
1From 9234cdca6ee88badfc00297e72f13dac4e540c79 Mon Sep 17 00:00:00 2001
2From: Nick Clifton <nickc@redhat.com>
3Date: Fri, 1 Jul 2022 15:58:52 +0100
4Subject: [PATCH] Add a recursion limit to the demangle_const function in the
5 Rust demangler.
6
7libiberty/
8 PR demangler/105039
9 * rust-demangle.c (demangle_const): Add recursion limit.
10
11Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=9234cdca6ee88badfc00297e72f13dac4e540c79]
12---
13 libiberty/rust-demangle.c | 29 ++++++++++++++++++++---------
14 1 file changed, 20 insertions(+), 9 deletions(-)
15
16diff --git a/libiberty/rust-demangle.c b/libiberty/rust-demangle.c
17index bb58d900e27..36afcfae278 100644
18--- a/libiberty/rust-demangle.c
19+++ b/libiberty/rust-demangle.c
20@@ -126,7 +126,7 @@ parse_integer_62 (struct rust_demangler *rdm)
21 return 0;
22
23 x = 0;
24- while (!eat (rdm, '_'))
25+ while (!eat (rdm, '_') && !rdm->errored)
26 {
27 c = next (rdm);
28 x *= 62;
29@@ -1148,6 +1148,15 @@ demangle_const (struct rust_demangler *rdm)
30 if (rdm->errored)
31 return;
32
33+ if (rdm->recursion != RUST_NO_RECURSION_LIMIT)
34+ {
35+ ++ rdm->recursion;
36+ if (rdm->recursion > RUST_MAX_RECURSION_COUNT)
37+ /* FIXME: There ought to be a way to report
38+ that the recursion limit has been reached. */
39+ goto fail_return;
40+ }
41+
42 if (eat (rdm, 'B'))
43 {
44 backref = parse_integer_62 (rdm);
45@@ -1158,7 +1167,7 @@ demangle_const (struct rust_demangler *rdm)
46 demangle_const (rdm);
47 rdm->next = old_next;
48 }
49- return;
50+ goto pass_return;
51 }
52
53 ty_tag = next (rdm);
54@@ -1167,7 +1176,7 @@ demangle_const (struct rust_demangler *rdm)
55 /* Placeholder. */
56 case 'p':
57 PRINT ("_");
58- return;
59+ goto pass_return;
60
61 /* Unsigned integer types. */
62 case 'h':
63@@ -1200,18 +1209,20 @@ demangle_const (struct rust_demangler *rdm)
64 break;
65
66 default:
67- rdm->errored = 1;
68- return;
69+ goto fail_return;
70 }
71
72- if (rdm->errored)
73- return;
74-
75- if (rdm->verbose)
76+ if (!rdm->errored && rdm->verbose)
77 {
78 PRINT (": ");
79 PRINT (basic_type (ty_tag));
80 }
81+
82+ fail_return:
83+ rdm->errored = 1;
84+ pass_return:
85+ if (rdm->recursion != RUST_NO_RECURSION_LIMIT)
86+ -- rdm->recursion;
87 }
88
89 static void
90--
912.31.1
92
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/hardcoded-paths.patch b/meta-microblaze/recipes-devtools/gcc/gcc/hardcoded-paths.patch
deleted file mode 100644
index f3485858..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/hardcoded-paths.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1Avoid encoding build paths into sources used for floating point on powerpc.
2(MACHINE=qemuppc bitbake libgcc).
3
4Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599882.html]
5Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6
7Index: gcc-12.1.0/libgcc/config/rs6000/t-float128
8===================================================================
9--- gcc-12.1.0.orig/libgcc/config/rs6000/t-float128
10+++ gcc-12.1.0/libgcc/config/rs6000/t-float128
11@@ -103,7 +103,7 @@ $(ibm128_dec_objs) : INTERNAL_CFLAGS +=
12 $(fp128_softfp_src) : $(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@)) $(fp128_dep)
13 @src="$(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@))"; \
14 echo "Create $@"; \
15- (echo "/* file created from $$src */"; \
16+ (echo "/* file created from `basename $$src` */"; \
17 echo; \
18 sed -f $(fp128_sed) < $$src) > $@
19
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/prefix-map-realpath.patch b/meta-microblaze/recipes-devtools/gcc/gcc/prefix-map-realpath.patch
deleted file mode 100644
index 7f1a2dee..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc/prefix-map-realpath.patch
+++ /dev/null
@@ -1,63 +0,0 @@
1Relative paths don't work with -fdebug-prefix-map and friends. This
2can lead to paths which the user wanted to be remapped being missed.
3Setting -fdebug-prefix-map to work with a relative path isn't practical
4either.
5
6Instead, call gcc's realpath function on the incomming path name before
7comparing it with the remapping. This means other issues like symlinks
8are also accounted for and leads to a more consistent remapping experience.
9
10Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599885.html]
11[Also https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599884.html]
12Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
13
14
15Index: gcc-12.1.0/gcc/file-prefix-map.cc
16===================================================================
17--- gcc-12.1.0.orig/gcc/file-prefix-map.cc
18+++ gcc-12.1.0/gcc/file-prefix-map.cc
19@@ -70,19 +70,28 @@ remap_filename (file_prefix_map *maps, c
20 file_prefix_map *map;
21 char *s;
22 const char *name;
23+ char *realname;
24 size_t name_len;
25
26+ if (lbasename (filename) == filename)
27+ return filename;
28+
29+ realname = lrealpath (filename);
30+
31 for (map = maps; map; map = map->next)
32- if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
33+ if (filename_ncmp (realname, map->old_prefix, map->old_len) == 0)
34 break;
35- if (!map)
36+ if (!map) {
37+ free (realname);
38 return filename;
39- name = filename + map->old_len;
40+ }
41+ name = realname + map->old_len;
42 name_len = strlen (name) + 1;
43
44 s = (char *) ggc_alloc_atomic (name_len + map->new_len);
45 memcpy (s, map->new_prefix, map->new_len);
46 memcpy (s + map->new_len, name, name_len);
47+ free (realname);
48 return s;
49 }
50
51Index: gcc-12.1.0/libcpp/macro.cc
52===================================================================
53--- gcc-12.1.0.orig/libcpp/macro.cc
54+++ gcc-12.1.0/libcpp/macro.cc
55@@ -563,7 +563,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi
56 if (!name)
57 abort ();
58 }
59- if (pfile->cb.remap_filename)
60+ if (pfile->cb.remap_filename && !pfile->state.in_directive)
61 name = pfile->cb.remap_filename (name);
62 len = strlen (name);
63 buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc_12.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc_12.2.bb
deleted file mode 100644
index c1996ab1..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc_12.2.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1require recipes-devtools/gcc/gcc-${PV}.inc
2require gcc-target.inc
3
4# Building with thumb enabled on armv4t armv5t fails with
5# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
6# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output
7ARM_INSTRUCTION_SET:armv4 = "arm"
8ARM_INSTRUCTION_SET:armv5 = "arm"
9
10ARMFPARCHEXT:armv6 = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
11ARMFPARCHEXT:armv7a = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
12ARMFPARCHEXT:armv7ve = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
13
14#BBCLASSEXTEND = "nativesdk"
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc_13.%.bbappend
deleted file mode 100644
index d1df2061..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc_13.%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require microblaze-block.inc
diff --git a/meta-microblaze/recipes-devtools/gcc/libgcc-common.inc b/meta-microblaze/recipes-devtools/gcc/libgcc-common.inc
deleted file mode 100644
index ac0a5a7b..00000000
--- a/meta-microblaze/recipes-devtools/gcc/libgcc-common.inc
+++ /dev/null
@@ -1,163 +0,0 @@
1BPN = "libgcc"
2
3require gcc-configure-common.inc
4
5INHIBIT_DEFAULT_DEPS = "1"
6
7do_configure () {
8 install -d ${D}${base_libdir} ${D}${libdir}
9 mkdir -p ${B}/${BPN}
10 mkdir -p ${B}/${TARGET_SYS}/${BPN}/
11 cd ${B}/${BPN}
12 chmod a+x ${S}/${BPN}/configure
13 ${S}/${BPN}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
14}
15EXTRACONFFUNCS += "extract_stashed_builddir"
16do_configure[depends] += "${COMPILERDEP}"
17
18do_compile () {
19 cd ${B}/${BPN}
20 oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/${BPN}/
21}
22
23do_install () {
24 cd ${B}/${BPN}
25 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/${BPN}/ install
26
27 # Move libgcc_s into /lib
28 mkdir -p ${D}${base_libdir}
29 if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then
30 mv ${D}${libdir}/nof/libgcc* ${D}${base_libdir}
31 else
32 mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true
33 fi
34
35 # install the runtime in /usr/lib/ not in /usr/lib/gcc on target
36 # so that cross-gcc can find it in the sysroot
37
38 mv ${D}${libdir}/gcc/* ${D}${libdir}
39 rm -rf ${D}${libdir}/gcc/
40 # unwind.h is installed here which is shipped in gcc-cross
41 # as well as target gcc and they are identical so we dont
42 # ship one with libgcc here
43 rm -rf ${D}${libdir}/${TARGET_SYS}/${BINV}/include
44}
45
46do_install:append:libc-baremetal () {
47 if [ "${base_libdir}" != "${libdir}" ]; then
48 rmdir ${D}${base_libdir}
49 fi
50}
51do_install:append:libc-newlib () {
52 if [ "${base_libdir}" != "${libdir}" ]; then
53 rmdir ${D}${base_libdir}
54 fi
55}
56
57# No rpm package is actually created but -dev depends on it, avoid dnf error
58DEV_PKG_DEPENDENCY:libc-baremetal = ""
59DEV_PKG_DEPENDENCY:libc-newlib = ""
60
61#BBCLASSEXTEND = "nativesdk"
62
63addtask multilib_install after do_install before do_package do_populate_sysroot
64# this makes multilib gcc files findable for target gcc
65# e.g.
66# /usr/lib/i586-pokymllib32-linux/4.7/
67# by creating this symlink to it
68# /usr/lib64/x86_64-poky-linux/4.7/32
69
70fakeroot python do_multilib_install() {
71 import re
72
73 multilibs = d.getVar('MULTILIB_VARIANTS')
74 if not multilibs or bb.data.inherits_class('nativesdk', d):
75 return
76
77 binv = d.getVar('BINV')
78
79 mlprefix = d.getVar('MLPREFIX')
80 if ('%slibgcc' % mlprefix) != d.getVar('PN'):
81 return
82
83 if mlprefix:
84 orig_tune = d.getVar('DEFAULTTUNE_MULTILIB_ORIGINAL')
85 orig_tune_params = get_tune_parameters(orig_tune, d)
86 orig_tune_baselib = orig_tune_params['baselib']
87 orig_tune_bitness = orig_tune_baselib.replace('lib', '')
88 if not orig_tune_bitness:
89 orig_tune_bitness = '32'
90
91 src = '../../../' + orig_tune_baselib + '/' + \
92 d.getVar('TARGET_SYS_MULTILIB_ORIGINAL') + '/' + binv + '/'
93
94 dest = d.getVar('D') + d.getVar('libdir') + '/' + \
95 d.getVar('TARGET_SYS') + '/' + binv + '/' + orig_tune_bitness
96
97 if os.path.lexists(dest):
98 os.unlink(dest)
99 os.symlink(src, dest)
100 return
101
102
103 for ml in multilibs.split():
104 tune = d.getVar('DEFAULTTUNE:virtclass-multilib-' + ml)
105 if not tune:
106 bb.warn('DEFAULTTUNE:virtclass-multilib-%s is not defined. Skipping...' % ml)
107 continue
108
109 tune_parameters = get_tune_parameters(tune, d)
110 tune_baselib = tune_parameters['baselib']
111 if not tune_baselib:
112 bb.warn("Tune %s doesn't have a baselib set. Skipping..." % tune)
113 continue
114
115 tune_arch = tune_parameters['arch']
116 tune_bitness = tune_baselib.replace('lib', '')
117 if not tune_bitness:
118 tune_bitness = '32' # /lib => 32bit lib
119
120 tune_abiextension = tune_parameters['abiextension']
121 if tune_abiextension:
122 libcextension = '-gnu' + tune_abiextension
123 else:
124 libcextension = ''
125
126 src = '../../../' + tune_baselib + '/' + \
127 tune_arch + d.getVar('TARGET_VENDOR') + 'ml' + ml + \
128 '-' + d.getVar('TARGET_OS') + libcextension + '/' + binv + '/'
129
130 dest = d.getVar('D') + d.getVar('libdir') + '/' + \
131 d.getVar('TARGET_SYS') + '/' + binv + '/' + tune_bitness
132
133 if os.path.lexists(dest):
134 os.unlink(dest)
135 os.symlink(src, dest)
136}
137
138def get_original_os(d):
139 vendoros = d.expand('${TARGET_ARCH}${ORIG_TARGET_VENDOR}-${TARGET_OS}')
140 for suffix in [d.getVar('ABIEXTENSION'), d.getVar('LIBCEXTENSION')]:
141 if suffix and vendoros.endswith(suffix):
142 vendoros = vendoros[:-len(suffix)]
143 # Arm must use linux-gnueabi not linux as only the former is accepted by gcc
144 if vendoros.startswith("arm-") and not vendoros.endswith("-gnueabi"):
145 vendoros = vendoros + "-gnueabi"
146 return vendoros
147
148ORIG_TARGET_VENDOR := "${TARGET_VENDOR}"
149BASETARGET_SYS = "${@get_original_os(d)}"
150
151addtask extra_symlinks after do_multilib_install before do_package do_populate_sysroot
152fakeroot python do_extra_symlinks() {
153 if bb.data.inherits_class('nativesdk', d):
154 return
155
156 targetsys = d.getVar('BASETARGET_SYS')
157
158 if targetsys != d.getVar('TARGET_SYS'):
159 dest = d.getVar('D') + d.getVar('libdir') + '/' + targetsys
160 src = d.getVar('TARGET_SYS')
161 if not os.path.lexists(dest) and os.path.lexists(d.getVar('D') + d.getVar('libdir')):
162 os.symlink(src, dest)
163}
diff --git a/meta-microblaze/recipes-devtools/gcc/libgcc-initial.inc b/meta-microblaze/recipes-devtools/gcc/libgcc-initial.inc
deleted file mode 100644
index 8251e3c2..00000000
--- a/meta-microblaze/recipes-devtools/gcc/libgcc-initial.inc
+++ /dev/null
@@ -1,58 +0,0 @@
1#
2# Notes on the way the OE cross toolchain now works
3#
4# We need a libgcc to build glibc. Tranditionally we therefore built
5# a non-threaded and non-shared compiler (gcc-cross-initial), then use
6# that to build libgcc-initial which is used to build glibc which we can
7# then build gcc-cross and libgcc against.
8#
9# We were able to drop the glibc dependency from gcc-cross, with two tweaks:
10
11# a) specify the minimum glibc version to support in a configure option
12# b) create a dummy limits.h file so that later when glibc creates one,
13# the headers structure has support for it. We can do this with a simple
14# empty file
15#
16# Once gcc-cross is libc independent, we can use it to build both
17# libgcc-initial and then later libgcc.
18#
19# libgcc-initial is tricky as we need to imitate the non-threaded and
20# non-shared case. We can do that by hacking the threading mode back to
21# "single" even if gcc reports "posix" and disable libc presence for the
22# libgcc-intial build. We have to create the dummy limits.h to avoid
23# compiler errors from a missing header.
24#
25# glibc will fail to link with libgcc-initial due to a missing "exception
26# handler" capable libgcc (libgcc_eh.a). Since we know glibc doesn't need
27# any exception handler, we can safely symlink to libgcc.a.
28#
29
30require libgcc-common.inc
31
32DEPENDS = "virtual/${TARGET_PREFIX}gcc"
33
34LICENSE = "GPL-3.0-with-GCC-exception"
35
36PACKAGES = ""
37
38EXTRA_OECONF += "--disable-shared"
39
40inherit nopackages
41
42# We really only want this built by things that need it, not any recrdeptask
43deltask do_build
44
45do_configure:prepend () {
46 install -d ${STAGING_INCDIR}
47 touch ${STAGING_INCDIR}/limits.h
48 sed -i -e 's#INHIBIT_LIBC_CFLAGS =.*#INHIBIT_LIBC_CFLAGS = -Dinhibit_libc#' ${B}/gcc/libgcc.mvars
49 sed -i -e 's#inhibit_libc = false#inhibit_libc = true#' ${B}/gcc/Makefile
50}
51
52do_configure:append () {
53 sed -i -e 's#thread_header = .*#thread_header = gthr-single.h#' ${B}/${BPN}/Makefile
54}
55
56do_install:append () {
57 ln -s libgcc.a ${D}${libdir}/${TARGET_SYS}/${BINV}/libgcc_eh.a
58}
diff --git a/meta-microblaze/recipes-devtools/gcc/libgcc-initial_12.2.bb b/meta-microblaze/recipes-devtools/gcc/libgcc-initial_12.2.bb
deleted file mode 100644
index a259082b..00000000
--- a/meta-microblaze/recipes-devtools/gcc/libgcc-initial_12.2.bb
+++ /dev/null
@@ -1,5 +0,0 @@
1require recipes-devtools/gcc/gcc-${PV}.inc
2require libgcc-initial.inc
3
4# Building with thumb enabled on armv6t fails
5ARM_INSTRUCTION_SET:armv6 = "arm"
diff --git a/meta-microblaze/recipes-devtools/gcc/libgcc-initial_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/libgcc-initial_13.%.bbappend
deleted file mode 100644
index d1df2061..00000000
--- a/meta-microblaze/recipes-devtools/gcc/libgcc-initial_13.%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require microblaze-block.inc
diff --git a/meta-microblaze/recipes-devtools/gcc/libgcc.inc b/meta-microblaze/recipes-devtools/gcc/libgcc.inc
deleted file mode 100644
index 84a2d930..00000000
--- a/meta-microblaze/recipes-devtools/gcc/libgcc.inc
+++ /dev/null
@@ -1,53 +0,0 @@
1require libgcc-common.inc
2
3DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ virtual/${MLPREFIX}libc"
4
5do_install:append:class-target () {
6 if [ "${TCLIBC}" != "glibc" ]; then
7 case "${TARGET_OS}" in
8 "linux-musl" | "linux-*spe") extra_target_os="linux";;
9 "linux-musleabi") extra_target_os="linux-gnueabi";;
10 *) extra_target_os="linux";;
11 esac
12 if [ ! -e ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os ]; then
13 ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
14 fi
15 fi
16 if [ -n "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" ]; then
17 case "${TARGET_OS}" in
18 "linux-musleabi") extra_target_os="linux-musleabihf";;
19 "linux-gnueabi") extra_target_os="linux-gnueabihf";;
20 esac
21 if [ ! -e ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os ]; then
22 ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
23 fi
24 fi
25}
26
27PACKAGES = "\
28 ${PN} \
29 ${PN}-dev \
30 ${PN}-dbg \
31"
32
33# All libgcc source is marked with the exception.
34#
35LICENSE:${PN} = "GPL-3.0-with-GCC-exception"
36LICENSE:${PN}-dev = "GPL-3.0-with-GCC-exception"
37LICENSE:${PN}-dbg = "GPL-3.0-with-GCC-exception"
38
39
40FILES:${PN}-dev = "\
41 ${base_libdir}/libgcc*.so \
42 ${@oe.utils.conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
43 ${libdir}/${TARGET_SYS}/${BINV}* \
44 ${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \
45"
46
47do_package[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
48do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
49do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
50do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
51
52INSANE_SKIP:${PN}-dev = "staticdev"
53
diff --git a/meta-microblaze/recipes-devtools/gcc/libgcc_12.2.bb b/meta-microblaze/recipes-devtools/gcc/libgcc_12.2.bb
deleted file mode 100644
index f88963b0..00000000
--- a/meta-microblaze/recipes-devtools/gcc/libgcc_12.2.bb
+++ /dev/null
@@ -1,5 +0,0 @@
1require recipes-devtools/gcc/gcc-${PV}.inc
2require libgcc.inc
3
4# Building with thumb enabled on armv6t fails
5ARM_INSTRUCTION_SET:armv6 = "arm"
diff --git a/meta-microblaze/recipes-devtools/gcc/libgcc_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/libgcc_13.%.bbappend
deleted file mode 100644
index d1df2061..00000000
--- a/meta-microblaze/recipes-devtools/gcc/libgcc_13.%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require microblaze-block.inc
diff --git a/meta-microblaze/recipes-devtools/gcc/libgfortran.inc b/meta-microblaze/recipes-devtools/gcc/libgfortran.inc
deleted file mode 100644
index 99fdd89c..00000000
--- a/meta-microblaze/recipes-devtools/gcc/libgfortran.inc
+++ /dev/null
@@ -1,88 +0,0 @@
1require gcc-configure-common.inc
2
3EXTRA_OECONF_PATHS = "\
4 --with-sysroot=/not/exist \
5 --with-build-sysroot=${STAGING_DIR_TARGET} \
6"
7
8# An arm hard float target like raspberrypi4 won't build
9# as CFLAGS don't make it to the fortran compiler otherwise
10# (the configure script sets FC to $GFORTRAN unconditionally)
11export GFORTRAN = "${FC}"
12
13do_configure () {
14 for target in libbacktrace libgfortran
15 do
16 rm -rf ${B}/${TARGET_SYS}/$target/
17 mkdir -p ${B}/${TARGET_SYS}/$target/
18 cd ${B}/${TARGET_SYS}/$target/
19 chmod a+x ${S}/$target/configure
20 relpath=${@os.path.relpath("${S}", "${B}/${TARGET_SYS}")}
21 ../$relpath/$target/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
22 # Easiest way to stop bad RPATHs getting into the library since we have a
23 # broken libtool here
24 sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/${TARGET_SYS}/$target/libtool
25 done
26}
27EXTRACONFFUNCS += "extract_stashed_builddir"
28do_configure[depends] += "${COMPILERDEP}"
29
30do_compile () {
31 for target in libbacktrace libgfortran
32 do
33 cd ${B}/${TARGET_SYS}/$target/
34 oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$target/
35 done
36}
37
38do_install () {
39 cd ${B}/${TARGET_SYS}/libgfortran/
40 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/libgfortran/ install
41 if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then
42 rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
43 fi
44 if [ -d ${D}${infodir} ]; then
45 rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
46 fi
47 chown -R root:root ${D}
48}
49
50INHIBIT_DEFAULT_DEPS = "1"
51DEPENDS = "gcc-runtime gcc-cross-${TARGET_ARCH}"
52
53#BBCLASSEXTEND = "nativesdk"
54
55PACKAGES = "\
56 ${PN}-dbg \
57 libgfortran \
58 libgfortran-dev \
59 libgfortran-staticdev \
60"
61
62LICENSE:${PN} = "GPL-3.0-with-GCC-exception"
63LICENSE:${PN}-dev = "GPL-3.0-with-GCC-exception"
64LICENSE:${PN}-dbg = "GPL-3.0-with-GCC-exception"
65
66FILES:${PN} = "${libdir}/libgfortran.so.*"
67FILES:${PN}-dev = "\
68 ${libdir}/libgfortran*.so \
69 ${libdir}/libgfortran.spec \
70 ${libdir}/libgfortran.la \
71 ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
72 ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \
73 ${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude/ \
74 ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ \
75"
76FILES:${PN}-staticdev = "${libdir}/libgfortran.a"
77
78INSANE_SKIP:${MLPREFIX}libgfortran-dev = "staticdev"
79
80do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
81do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
82do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
83
84python __anonymous () {
85 f = d.getVar("FORTRAN")
86 if "fortran" not in f:
87 raise bb.parse.SkipRecipe("libgfortran needs fortran support to be enabled in the compiler")
88}
diff --git a/meta-microblaze/recipes-devtools/gcc/libgfortran_12.2.bb b/meta-microblaze/recipes-devtools/gcc/libgfortran_12.2.bb
deleted file mode 100644
index 71dd8b4b..00000000
--- a/meta-microblaze/recipes-devtools/gcc/libgfortran_12.2.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require recipes-devtools/gcc/gcc-${PV}.inc
2require libgfortran.inc
3
diff --git a/meta-microblaze/recipes-devtools/gcc/libgfortran_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/libgfortran_13.%.bbappend
deleted file mode 100644
index d1df2061..00000000
--- a/meta-microblaze/recipes-devtools/gcc/libgfortran_13.%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require microblaze-block.inc
diff --git a/meta-microblaze/recipes-devtools/gcc/microblaze-block.inc b/meta-microblaze/recipes-devtools/gcc/microblaze-block.inc
deleted file mode 100644
index 67c40845..00000000
--- a/meta-microblaze/recipes-devtools/gcc/microblaze-block.inc
+++ /dev/null
@@ -1 +0,0 @@
1COMPATIBLE_HOST:microblaze = "^$"