git » cross-a64.git » commit 54aafaf

cross-a64 is reborn

author Urja (ARMLFS builder)
2024-07-12 17:09:42 UTC
committer Urja (ARMLFS builder)
2024-07-12 17:09:42 UTC
parent 61455443ac7207edfc8f1ee061eb3991c63c16e9

cross-a64 is reborn

(and armlfs-rust is no longer needed
as we build all of buildcore64 from ARMLFS.)

armlfs-rust/0001-bootstrap-Change-libexec-dir.patch +0 -36
armlfs-rust/0002-bootstrap-Change-bash-completion-dir.patch +0 -26
armlfs-rust/0003-compiler-Change-LLVM-targets.patch +0 -84
armlfs-rust/0004-compiler-Use-wasm-ld-for-wasm-targets.patch +0 -24
armlfs-rust/PKGBUILD +0 -267
armlfs-rust/keys/pgp/108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE.asc +0 -85
bc64.sh +4 -0
binutils.sh +2 -2
common.inc +18 -1
gcc.sh +6 -6
inject-to-buildhost.sh +15 -13
prep.sh +6 -8

diff --git a/armlfs-rust/0001-bootstrap-Change-libexec-dir.patch b/armlfs-rust/0001-bootstrap-Change-libexec-dir.patch
deleted file mode 100644
index ebc8f2f..0000000
--- a/armlfs-rust/0001-bootstrap-Change-libexec-dir.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
-Date: Thu, 6 May 2021 20:14:58 +0200
-Subject: [PATCH] bootstrap: Change libexec dir
-
----
- src/bootstrap/src/core/build_steps/dist.rs | 2 +-
- src/bootstrap/src/core/build_steps/tool.rs | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
-index f50026368dab..6940e0c50752 100644
---- a/src/bootstrap/src/core/build_steps/dist.rs
-+++ b/src/bootstrap/src/core/build_steps/dist.rs
-@@ -423,7 +423,7 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
-                 },
-                 builder.kind,
-             ) {
--                builder.install(&ra_proc_macro_srv, &image.join("libexec"), 0o755);
-+                builder.install(&ra_proc_macro_srv, &image.join("lib"), 0o755);
-             }
- 
-             let libdir_relative = builder.libdir_relative(compiler);
-diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs
-index 5d8d10a7debc..f52315416bd4 100644
---- a/src/bootstrap/src/core/build_steps/tool.rs
-+++ b/src/bootstrap/src/core/build_steps/tool.rs
-@@ -682,7 +682,7 @@ fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
- 
-         // Copy `rust-analyzer-proc-macro-srv` to `<sysroot>/libexec/`
-         // so that r-a can use it.
--        let libexec_path = builder.sysroot(self.compiler).join("libexec");
-+        let libexec_path = builder.sysroot(self.compiler).join("lib");
-         t!(fs::create_dir_all(&libexec_path));
-         builder.copy(&path, &libexec_path.join("rust-analyzer-proc-macro-srv"));
- 
diff --git a/armlfs-rust/0002-bootstrap-Change-bash-completion-dir.patch b/armlfs-rust/0002-bootstrap-Change-bash-completion-dir.patch
deleted file mode 100644
index d0e8b43..0000000
--- a/armlfs-rust/0002-bootstrap-Change-bash-completion-dir.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
-Date: Thu, 13 Jul 2023 21:16:53 +0200
-Subject: [PATCH] bootstrap: Change bash-completion dir
-
----
- src/bootstrap/src/core/build_steps/dist.rs | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
-index 6940e0c50752..d45daad3a829 100644
---- a/src/bootstrap/src/core/build_steps/dist.rs
-+++ b/src/bootstrap/src/core/build_steps/dist.rs
-@@ -1071,7 +1071,11 @@ fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
- 
-         tarball.add_file(&cargo, "bin", 0o755);
-         tarball.add_file(etc.join("_cargo"), "share/zsh/site-functions", 0o644);
--        tarball.add_renamed_file(etc.join("cargo.bashcomp.sh"), "etc/bash_completion.d", "cargo");
-+        tarball.add_renamed_file(
-+            etc.join("cargo.bashcomp.sh"),
-+            "share/bash-completion/completions",
-+            "cargo",
-+        );
-         tarball.add_dir(etc.join("man"), "share/man/man1");
-         tarball.add_legal_and_readme_to("share/doc/cargo");
- 
diff --git a/armlfs-rust/0003-compiler-Change-LLVM-targets.patch b/armlfs-rust/0003-compiler-Change-LLVM-targets.patch
deleted file mode 100644
index 26df177..0000000
--- a/armlfs-rust/0003-compiler-Change-LLVM-targets.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
-Date: Fri, 12 Mar 2021 17:31:56 +0100
-Subject: [PATCH] compiler: Change LLVM targets
-
- - Change x86_64-unknown-linux-gnu to use x86_64-pc-linux-gnu
- - Change i686-unknown-linux-gnu to use i686-pc-linux-gnu
-
-Reintroduce the aliasing that was removed in 1.52.0 and alias the -pc-
-triples to the -unknown- triples. This avoids defining proper -pc-
-targets, as things break when this is done:
-
- - The crate ecosystem expects the -unknown- targets. Making -pc-
-   rustc's host triple (and thus default target) would break various
-   crates.
- - Firefox's build breaks when the host triple (from
-   `rustc --version --verbose`) is different from the target triple
-   (from `rustc --print target-list`) that best matches autoconf.
----
- compiler/rustc_session/src/config.rs                     | 2 +-
- compiler/rustc_target/src/spec/mod.rs                    | 9 +++++++++
- .../src/spec/targets/i686_unknown_linux_gnu.rs           | 2 +-
- .../src/spec/targets/x86_64_unknown_linux_gnu.rs         | 2 +-
- 4 files changed, 12 insertions(+), 3 deletions(-)
-
-diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
-index d35f951e2aea..7841c4d19094 100644
---- a/compiler/rustc_session/src/config.rs
-+++ b/compiler/rustc_session/src/config.rs
-@@ -2221,7 +2221,7 @@ pub fn parse_target_triple(early_dcx: &EarlyDiagCtxt, matches: &getopts::Matches
-                 early_dcx.early_fatal(format!("target file {path:?} does not exist"))
-             })
-         }
--        Some(target) => TargetTriple::TargetTriple(target),
-+        Some(target) => TargetTriple::from_alias(target),
-         _ => TargetTriple::from_triple(host_triple()),
-     }
- }
-diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index 6c698c5b01dd..4a1c2dd18b8d 100644
---- a/compiler/rustc_target/src/spec/mod.rs
-+++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -3453,6 +3453,15 @@ pub fn from_path(path: &Path) -> Result<Self, io::Error> {
-         Ok(TargetTriple::TargetJson { path_for_rustdoc: canonicalized_path, triple, contents })
-     }
- 
-+    /// Creates a target triple from its alias
-+    pub fn from_alias(triple: String) -> Self {
-+        match triple.as_str() {
-+            "x86_64-pc-linux-gnu" => TargetTriple::from_triple("x86_64-unknown-linux-gnu"),
-+            "i686-pc-linux-gnu" => TargetTriple::from_triple("i686-unknown-linux-gnu"),
-+            _ => TargetTriple::TargetTriple(triple),
-+        }
-+    }
-+
-     /// Returns a string triple for this target.
-     ///
-     /// If this target is a path, the file name (without extension) is returned.
-diff --git a/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs
-index 9bc38a72f4d3..a7a36eb3c9d6 100644
---- a/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs
-+++ b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs
-@@ -9,7 +9,7 @@ pub fn target() -> Target {
-     base.stack_probes = StackProbeType::Inline;
- 
-     Target {
--        llvm_target: "i686-unknown-linux-gnu".into(),
-+        llvm_target: "i686-pc-linux-gnu".into(),
-         pointer_width: 32,
-         data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
-             i128:128-f64:32:64-f80:32-n8:16:32-S128"
-diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs
-index 2296b58f45dc..a54dbf573dd6 100644
---- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs
-+++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs
-@@ -17,7 +17,7 @@ pub fn target() -> Target {
-     base.supports_xray = true;
- 
-     Target {
--        llvm_target: "x86_64-unknown-linux-gnu".into(),
-+        llvm_target: "x86_64-pc-linux-gnu".into(),
-         pointer_width: 64,
-         data_layout:
-             "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
diff --git a/armlfs-rust/0004-compiler-Use-wasm-ld-for-wasm-targets.patch b/armlfs-rust/0004-compiler-Use-wasm-ld-for-wasm-targets.patch
deleted file mode 100644
index 3528899..0000000
--- a/armlfs-rust/0004-compiler-Use-wasm-ld-for-wasm-targets.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
-Date: Sat, 6 Nov 2021 22:42:06 +0100
-Subject: [PATCH] compiler: Use wasm-ld for wasm targets
-
-We don't ship rust-lld.
----
- compiler/rustc_target/src/spec/base/wasm.rs | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/compiler/rustc_target/src/spec/base/wasm.rs b/compiler/rustc_target/src/spec/base/wasm.rs
-index 4b4d2aca26e4..b4918c8fdda2 100644
---- a/compiler/rustc_target/src/spec/base/wasm.rs
-+++ b/compiler/rustc_target/src/spec/base/wasm.rs
-@@ -88,8 +88,7 @@ macro_rules! args {
-         // arguments just yet
-         limit_rdylib_exports: false,
- 
--        // we use the LLD shipped with the Rust toolchain by default
--        linker: Some("rust-lld".into()),
-+        linker: Some("wasm-ld".into()),
-         linker_flavor: LinkerFlavor::WasmLld(Cc::No),
- 
-         pre_link_args,
diff --git a/armlfs-rust/PKGBUILD b/armlfs-rust/PKGBUILD
deleted file mode 100644
index 05f42ff..0000000
--- a/armlfs-rust/PKGBUILD
+++ /dev/null
@@ -1,267 +0,0 @@
-# Maintainer: Johannes Löthberg <johannes@kyriasis.com>
-# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
-# Contributor: Alexander F Rødseth <xyproto@archlinux.org>
-# Contributor: Daniel Micay <danielmicay@gmail.com>
-# Contributor: userwithuid <userwithuid@gmail.com>
-
-# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
-#  - remove lib32, musl, and wasm packages and related bits
-#  - add a link to g++ to compensate for broken cross-compiler decisions
-#  - build v6/v7 with -j2 - RAM constraints
-#  - set llvm-config in config.toml for ARM architectures
-#  - set debuginfo-level = 0 in config.toml - RAM constraints
-#  - build aarch64 with 16k page support
-
-highmem=1
-
-pkgbase=rust
-pkgname=(
-  rust
-  rust-src
-)
-epoch=1
-pkgver=1.77.2
-pkgrel=1
-pkgdesc="Systems programming language focused on safety, speed and concurrency"
-url=https://www.rust-lang.org/
-arch=(armv7h aarch64)
-license=("Apache-2.0 OR MIT")
-options=(
-  !emptydirs
-  !lto
-)
-depends=(
-  curl
-  gcc
-  gcc-libs
-  libssh2
-  llvm-libs
-)
-makedepends=(
-  cmake
-  libffi
-  lld
-  llvm
-  ninja
-  perl
-  python
-  rust
-)
-checkdepends=(
-  gdb
-  procps-ng
-)
-source=(
-  "https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz"{,.asc}
-  0001-bootstrap-Change-libexec-dir.patch
-  0002-bootstrap-Change-bash-completion-dir.patch
-  0003-compiler-Change-LLVM-targets.patch
-  0004-compiler-Use-wasm-ld-for-wasm-targets.patch
-)
-b2sums=('cf9fd96580d2c696e8d2992a5b4ee285824648bfa721212dd7691d63c876cf8fda1d50e924bec891af2c721e3746c4227fd23a0bed48e0b505fcd328936f5a35'
-        'SKIP'
-        'd3ed7043e288c78ac4007b267448457db0972905037754b67249d81be0889f47c4d93573c24d730907c31ec44e80ce696fbf50f98521eadee92c003d2324a1a3'
-        '6afaf5bff729618aa35d84f20b1447694c887b84a406f55344864b9e8dce72f80467412c128b5309d5b962b605ca396b77a52f275dd35681ab50cbedc68f873a'
-        '18ca47c350373d9a095aff9a658c61816a542bb391a2a8ddf582f25795a21e9fc344b3e71a2eed7b094610bb61d9658e5360ef2ace9441fd21e4193746d45be7'
-        '23f399d5ea776df5dba1ec42a96020a7ae3b18f5a83121d90ca0256a90027529135bac751373a31480860c0dbad30598833a7da43d1e7f25ce5b6d5d945ce550')
-validpgpkeys=(
-  108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE  # Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>
-)
-
-prepare() {
-  cd rustc-$pkgver-src
-
-  # Patch bootstrap so that rust-analyzer-proc-macro-srv
-  # is in /usr/lib instead of /usr/libexec
-  patch -Np1 -i ../0001-bootstrap-Change-libexec-dir.patch
-
-  # Put bash completions where they belong
-  patch -Np1 -i ../0002-bootstrap-Change-bash-completion-dir.patch
-
-  # Use our *-pc-linux-gnu targets, making LTO with clang simpler
-  patch -Np1 -i ../0003-compiler-Change-LLVM-targets.patch
-
-  # Use our wasm-ld
-  patch -Np1 -i ../0004-compiler-Use-wasm-ld-for-wasm-targets.patch
-
-  cat >config.toml <<END
-profile = "user"
-change-id = 118703
-
-[llvm]
-link-shared = true
-
-[build]
-cargo = "/usr/bin/cargo"
-rustc = "/usr/bin/rustc"
-rustfmt = "/usr/bin/rustfmt"
-locked-deps = true
-vendor = true
-tools = [
-  "cargo",
-  "clippy",
-  "rustdoc",
-  "rustfmt",
-  "rust-analyzer-proc-macro-srv",
-  "analysis",
-  "src",
-  "rust-demangler",
-]
-sanitizers = false
-profiler = true
-
-# Generating docs fails with the wasm32-* targets
-docs = false
-
-[install]
-prefix = "/usr"
-
-[rust]
-debuginfo-level-std = 0
-channel = "stable"
-description = "ARMLFS $pkgbase $epoch:$pkgver-$pkgrel"
-rpath = false
-backtrace-on-ice = true
-jemalloc = true
-
-# Causes "error: --remap-path-prefix must contain '=' between FROM and TO"
-# even after creating the missing ~/.cargo/registry/src dir.
-# https://github.com/rust-lang/rust/issues/117885
-remap-debuginfo = false
-
-# LLVM crashes when passing an object through ThinLTO twice.  This is triggered
-# when using rust code in cross-language LTO if libstd was built using ThinLTO.
-# http://blog.llvm.org/2019/09/closing-gap-cross-language-lto-between.html
-# https://github.com/rust-lang/rust/issues/54872
-codegen-units-std = 1
-
-# musl target produces warnings
-deny-warnings = false
-
-[dist]
-compression-formats = ["gz"]
-
-[target.x86_64-unknown-linux-gnu]
-cc = "/usr/bin/gcc"
-cxx = "/usr/bin/g++"
-ar = "/usr/bin/gcc-ar"
-ranlib = "/usr/bin/gcc-ranlib"
-llvm-config = "/usr/bin/llvm-config"
-
-[target.i686-unknown-linux-gnu]
-cc = "/usr/bin/gcc"
-cxx = "/usr/bin/g++"
-ar = "/usr/bin/gcc-ar"
-ranlib = "/usr/bin/gcc-ranlib"
-
-[target.aarch64-unknown-linux-gnu]
-cc = "/usr/bin/gcc"
-cxx = "/usr/bin/g++"
-ar = "/usr/bin/gcc-ar"
-ranlib = "/usr/bin/gcc-ranlib"
-llvm-config = "/usr/bin/llvm-config"
-
-[target.armv7-unknown-linux-gnueabihf]
-cc = "/usr/cross-a64/bin/gcc"
-cxx = "/usr/cross-a64/bin/g++"
-ar = "/usr/cross-a64/bin/ar"
-ranlib = "/usr/cross-a64/bin/ranlib"
-llvm-config = "/usr/bin/llvm-config"
-
-
-[target.arm-unknown-linux-gnueabihf]
-cc = "/usr/bin/gcc"
-cxx = "/usr/bin/g++"
-ar = "/usr/bin/gcc-ar"
-ranlib = "/usr/bin/gcc-ranlib"
-llvm-config = "/usr/bin/llvm-config"
-END
-  # This is a huge hack, but the build host is volatile, so who cares lol
-#  su -c "mv /usr/libexec/gcc /usr/libexec/gcc32"
-#  su -c "ln -s ../cross-a64/libexec/gcc /usr/libexec/gcc"
- # export PATH=/usr/cross-a64/bin:$PATH
-  if [[ $CARCH == armv7h ]]; then
-    mkdir path
-    ln -s /usr/bin/g++ path/arm-linux-gnueabihf-g++
-    export PATH="$srcdir/path:$PATH"
-  fi
-  if [[ $CARCH == armv7h || $CARCH == armv6h ]]; then
-    jobs="-j 2"
-  fi
-}
-
-_pick() {
-  local p="$1" f d; shift
-  for f; do
-    d="$srcdir/$p/$f"
-    mkdir -p "$(dirname "$d")"
-    mv "$f" "$d"
-    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
-  done
-}
-
-build() {
-  cd rustc-$pkgver-src
-
-  [[ $CARCH == "aarch64" ]] && export JEMALLOC_SYS_WITH_LG_PAGE=16
-  export RUST_BACKTRACE=1
-
-  DESTDIR="$srcdir/dest-rust" python ./x.py install -j "$(nproc)"
-
-  cd ../dest-rust
-
-  # delete unnecessary files, e.g. files only used for the uninstall script
-  rm usr/bin/*.old
-  rm usr/lib/rustlib/{components,install.log,rust-installer-version,uninstall.sh}
-  rm usr/lib/rustlib/manifest-*
-
-  # rustbuild always installs copies of the shared libraries to /usr/lib,
-  # overwrite them with symlinks to the per-architecture versions
-  #mkdir -p usr/lib32
-  #ln -srft usr/lib   usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/*.so
-  #ln -srft usr/lib32 usr/lib/rustlib/i686-unknown-linux-gnu/lib/*.so
-
-  mkdir -p usr/share/licenses/rust
-  mv -t usr/share/licenses/rust usr/share/doc/rust/{COPYRIGHT,LICENSE*}
-
-  #_pick dest-i686 usr/lib/rustlib/i686-unknown-linux-gnu usr/lib32
-  #_pick dest-musl usr/lib/rustlib/x86_64-unknown-linux-musl
-  #_pick dest-wasm usr/lib/rustlib/wasm32-*
-  _pick dest-src  usr/lib/rustlib/src
-}
-
-package_rust() {
-  optdepends=(
-    'gdb: rust-gdb script'
-    'lldb: rust-lldb script'
-  )
-  provides=(
-    cargo
-    rustfmt
-  )
-  conflicts=(
-    cargo
-    'rust-docs<1:1.56.1-3'
-    rustfmt
-  )
-  replaces=(
-    cargo
-    cargo-tree
-    'rust-docs<1:1.56.1-3'
-    rustfmt
-  )
-
-  cp -a dest-rust/* "$pkgdir"
-}
-
-package_rust-src() {
-  pkgdesc="Source code for the Rust standard library"
-  depends=(rust)
-
-  cp -a dest-src/* "$pkgdir"
-
-  mkdir -p "$pkgdir/usr/share/licenses"
-  ln -s rust "$pkgdir/usr/share/licenses/$pkgname"
-}
-
-# vim:set ts=2 sw=2 et:
diff --git a/armlfs-rust/keys/pgp/108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE.asc b/armlfs-rust/keys/pgp/108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE.asc
deleted file mode 100644
index 678f146..0000000
--- a/armlfs-rust/keys/pgp/108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE.asc
+++ /dev/null
@@ -1,85 +0,0 @@
------BEGIN PGP PUBLIC KEY BLOCK-----
-
-mQINBFJEwMkBEADlPACa2K7reD4x5zd8afKx75QYKmxqZwywRbgeICeD4bKiQoJZ
-dUjmn1LgrGaXuBMKXJQhyA34e/1YZel/8et+HPE5XpljBfNYXWbVocE1UMUTnFU9
-CKXa4AhJ33f7we2/QmNRMUifw5adPwGMg4D8cDKXk02NdnqQlmFByv0vSaArR5kn
-gZKnLY6o0zZ9Buyy761Im/ShXqv4ATUgYiFc48z33G4j+BDmn0ryGr1aFdP58tHp
-gjWtLZs0iWeFNRDYDje6ODyu/MjOyuAWb2pYDH47Xu7XedMZzenH2TLM9yt/hyOV
-xReDPhvoGkaO8xqHioJMoPQi1gBjuBeewmFyTSPS4deASukhCFOcTsw/enzJagiS
-ZAq6Imehduke+peAL1z4PuRmzDPO2LPhVS7CDXtuKAYqUV2YakTq8MZUempVhw5n
-LqVaJ5/XiyOcv405PnkT25eIVVVghxAgyz6bOU/UMjGQYlkUxI7YZ9tdreLlFyPR
-OUL30E8q/aCd4PG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uf58hcyu036kkiWHh2OGgJqlo2WI
-raPXx1cGw1Ey+U6exbtrZfE5kM9pZzRG7ZY83CXpYWMpkyVXNWmf9JcIWWBrXvJm
-Mi0FDvtgg3Pt1tnoxqdilk6yhieFc8LqBn6CZgFUBk0tNSaWk3PsN0N6Ut8VXY6s
-ai7MJ0Gih1gE1xadWj2zfZ9sLGyt2jZ6wK++U881YeXAryaGKJ8sIs182hwQb4qN
-7eiUHzLtIh8oVBHo8Q4BJSat88E5/gOD6IQIpxc42iRLT+oNZw1hdwNyPOT1GMkk
-n86l3o7klwmQUWCPm6vl1aHp3omo+GHC63PpNFO5RncJIlo3aBKKmoE5lDSMGE8K
-Fso5awTo9z9QnVPkRsk6qeBYit9xE3x3S+iwjcSg0nieaAkc0N00nc9V9jfPvt4z
-/5A5vjHh+NhFwH5h2vBJVPdsz6k=
-=jRHo
------END PGP PUBLIC KEY BLOCK-----
diff --git a/bc64.sh b/bc64.sh
new file mode 100755
index 0000000..52ea9df
--- /dev/null
+++ b/bc64.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+setarch aarch64 systemd-nspawn -a -M pkg-builder64 --bind=/sources \
+--bind=/build-core:/mnt/armlfs \
+-D /buildcore64 /bin/bash -c "cd `pwd`; exec bash -"
diff --git a/binutils.sh b/binutils.sh
index 8e575f3..0abeabc 100755
--- a/binutils.sh
+++ b/binutils.sh
@@ -26,9 +26,9 @@ cd binutils-build
     --enable-64-bit-bfd \
     --enable-default-hash-style=gnu \
     "${_cross_flags[@]:?_cross_flags unset}"
-
+read dummy
 make -j3 2>&1 | tee ../binutils-build.log
 echo "Enter to install, Ctrl-C to abort"
 read dummy
-sudo make install
+su -c "make install"
 cd ..
diff --git a/common.inc b/common.inc
index 822eb56..3d2933c 100755
--- a/common.inc
+++ b/common.inc
@@ -6,7 +6,9 @@ PREFIX=/usr/cross-a64
 TARGET=armv7l-unknown-linux-gnueabihf
 
 export PATH=$PREFIX/bin:$PATH
-ARMLFS=$(realpath ../..)
+ARMLFS=/mnt/armlfs
+BLD=/sources/cross-a64/bld
+SRC=/sources/archives/core
 
 _cross_flags=(
 	--host=$HOST
@@ -15,3 +17,18 @@ _cross_flags=(
 	--prefix=$PREFIX
 	--with-sysroot=/mnt/armlfs
 )
+
+if [ ! -e "$BLD" ]; then
+	mkdir -p "$BLD"
+	chown -R builder:builder "$BLD"
+fi
+
+if [ "$(whoami)" != "builder" ]; then
+	echo "Will re-exec self ($0) as builder"
+	sleep 1s
+	L="$@"
+	exec su builder -c "$0 $L"
+fi
+
+cd "$BLD"
+
diff --git a/gcc.sh b/gcc.sh
index 7f09ebc..b2d543c 100755
--- a/gcc.sh
+++ b/gcc.sh
@@ -1,8 +1,8 @@
 #!/bin/sh
 . ./common.inc
 
-export CFLAGS_FOR_TARGET="-march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -mtune=cortex-a17 -O2 -pipe"
-export CXXFLAGS_FOR_TARGET="-march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -mtune=cortex-a17 -O2 -pipe"
+export CFLAGS_FOR_TARGET="-march=armv7ve -mfloat-abi=hard -mfpu=neon-vfpv4 -mtune=cortex-a17 -O2 -pipe"
+export CXXFLAGS_FOR_TARGET="-march=armv7ve -mfloat-abi=hard -mfpu=neon-vfpv4 -mtune=cortex-a17 -O2 -pipe"
 
 _confflags=(
       --with-bugurl=https://social.treehouse.systems/@urja
@@ -27,9 +27,9 @@ _confflags=(
       --disable-libstdcxx-pch
       --disable-multilib
       --disable-werror
-      --with-arch=armv7-a
+      --with-arch=armv7ve
       --with-float=hard
-      --with-fpu=vfpv3-d16
+      --with-fpu=neon-vfpv4
   )
   _confflags=(${_confflags[@]} ${_cross_flags[@]})
 
@@ -40,8 +40,8 @@ cd gcc-build
     --disable-bootstrap \
     "${_confflags[@]:?_confflags unset}"
 
-make -j3 2>&1 | tee ../gcc-build.log
+make -j4 2>&1 | tee ../gcc-build.log
 echo "Enter to install, Ctrl-C to abort"
 read dummy
-sudo make install
+su -c "make install"
 cd ..
diff --git a/inject-to-buildhost.sh b/inject-to-buildhost.sh
index 6c722e7..c59099d 100755
--- a/inject-to-buildhost.sh
+++ b/inject-to-buildhost.sh
@@ -2,24 +2,26 @@
 . ./common.inc
 set +x
 
-if [ -z "$1" ]; then
-	echo "Usage: $0 <buildhost>"
-	exit 1
-fi
-
-BUILDHOST=$(realpath "$1")
+BUILDHOST=/mnt/armlfs
 echo $BUILDHOST$PREFIX
+#read dummy
 LIBS=$(ldd $PREFIX/bin/* | grep "/usr/lib/" | cut -d ' ' -f 1 | sort | uniq | grep -v 'ld-linux')
-sudo mkdir -p $BUILDHOST$PREFIX
-sudo cp -av $PREFIX/* $BUILDHOST$PREFIX/
+LIBS="$(echo $LIBS)"
+su -c "mkdir -p $BUILDHOST$PREFIX"
+su -c "cp -av $PREFIX/* $BUILDHOST$PREFIX/"
+#echo $LIBS
+#read dummy
 cd /usr/lib
 set +e
-sudo mkdir -p $BUILDHOST/usr/lib/aarch64
-sudo cp -vLpn $LIBS $BUILDHOST/usr/lib/aarch64
-sudo cp -vLpn /lib/ld-linux-aarch64.so.1 $BUILDHOST/lib/
+su -c "mkdir -p $BUILDHOST/usr/lib/aarch64"
+su -c "cp -vLpn $LIBS $BUILDHOST/usr/lib/aarch64"
+su -c "cp -vLpn /lib/ld-linux-aarch64.so.1 $BUILDHOST/lib/"
 cd $BUILDHOST$PREFIX/bin
+#echo $TARGET-*
+#read dummy
 for f in $(echo $TARGET-*); do
-	sudo ln -vs $f ${f/#$TARGET-/}
+	su -c "ln -vs $f ${f/#$TARGET-/}"
 done
 cd $BUILDHOST/mnt
-sudo ln -s / armlfs
+su -c "ln -s / armlfs"
+echo "Done."
diff --git a/prep.sh b/prep.sh
index 27ff49b..47128d6 100755
--- a/prep.sh
+++ b/prep.sh
@@ -2,24 +2,22 @@
 # Prep done just once
 . ./common.inc
 
-sudo mkdir -p /mnt/armlfs
-sudo mount --bind $ARMLFS /mnt/armlfs
-sudo mkdir -p $PREFIX/bin
+su -c "mkdir -p $PREFIX/bin"
 
-tar xf ../binutils-*.tar.*
+tar xf $SRC/binutils-*.tar.*
 mv binutils-* binutils
 mkdir -p binutils-build
 
 # Turn off development mode (-Werror, gas run-time checks, date in sonames)
 sed -i '/^development=/s/true/false/' binutils/bfd/development.sh
 
-tar xf ../gcc-*.tar.*
+tar xf $SRC/gcc-*.tar.*
 mv gcc-* gcc
-tar -xf ../mpfr-4.2.1.tar.xz
+tar -xf $SRC/mpfr-4.2.1.tar.xz
 mv -v mpfr-4.2.1 gcc/mpfr
-tar -xf ../gmp-6.3.0.tar.xz
+tar -xf $SRC/gmp-6.3.0.tar.xz
 mv -v gmp-6.3.0 gcc/gmp
-tar -xf ../mpc-1.3.1.tar.gz
+tar -xf $SRC/mpc-1.3.1.tar.gz
 mv -v mpc-1.3.1 gcc/mpc
 mkdir -p gcc-build