# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/rustc/arch-i3486.patch.prepatch # Copyright (C) 2020 - 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- Let's add i386 and i486 for embedded, bootloader or other early kernel code. - Signed-off-by: René Rebe --- rustc-1.73.0-src/compiler/rustc_target/src/spec/mod.rs.vanilla 2023-10-07 16:10:45.606034645 +0200 +++ rustc-1.73.0-src/compiler/rustc_target/src/spec/mod.rs 2023-10-07 16:11:18.595034753 +0200 @@ -1270,8 +1270,10 @@ supported_targets! { ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu), ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32), - ("i686-unknown-linux-gnu", i686_unknown_linux_gnu), + ("i386-unknown-linux-gnu", i386_unknown_linux_gnu), + ("i486-unknown-linux-gnu", i486_unknown_linux_gnu), ("i586-unknown-linux-gnu", i586_unknown_linux_gnu), + ("i686-unknown-linux-gnu", i686_unknown_linux_gnu), ("loongarch64-unknown-linux-gnu", loongarch64_unknown_linux_gnu), ("m68k-unknown-linux-gnu", m68k_unknown_linux_gnu), ("csky-unknown-linux-gnuabiv2", csky_unknown_linux_gnuabiv2), --- rustc-1.73.0-src/src/tools/build-manifest/src/main.rs.vanilla 2023-10-07 16:09:54.671034477 +0200 +++ rustc-1.73.0-src/src/tools/build-manifest/src/main.rs 2023-10-07 16:10:21.075034564 +0200 @@ -88,6 +88,8 @@ "bpfel-unknown-none", "i386-apple-ios", "i586-pc-windows-msvc", + "i386-unknown-linux-gnu", + "i486-unknown-linux-gnu", "i586-unknown-linux-gnu", "i586-unknown-linux-musl", "i686-apple-darwin", --- /dev/null +++ a/compiler/rustc_target/src/spec/targets/i386_unknown_linux_gnu.rs @@ -0,0 +1,8 @@ +use crate::spec::Target; + +pub(crate) fn target() -> Target { + let mut base = super::i686_unknown_linux_gnu::target(); + base.cpu = "i386".into(); + base.llvm_target = "i386-unknown-linux-gnu".into(); + base +} --- /dev/null +++ a/compiler/rustc_target/src/spec/targets/i486_unknown_linux_gnu.rs @@ -0,0 +1,8 @@ +use crate::spec::Target; + +pub(crate) fn target() -> Target { + let mut base = super::i686_unknown_linux_gnu::target(); + base.cpu = "i486".into(); + base.llvm_target = "i486-unknown-linux-gnu".into(); + base +}