Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

[target.x86_64-unknown-redox]
linker = "x86_64-unknown-redox-gcc"
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"

[env]
# See feat_external_libstdbuf in src/uu/stdbuf/Cargo.toml
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
- name: Install/setup prerequisites
shell: bash
run: |
sudo apt-get -y update ; sudo apt-get -y install libselinux1-dev
sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu libselinux1-dev
- name: Initialize workflow variables
id: vars
shell: bash
Expand Down Expand Up @@ -269,6 +269,8 @@ jobs:
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
target: aarch64-unknown-linux-gnu
- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
- name: Install/setup prerequisites
Expand All @@ -287,7 +289,9 @@ jobs:
if [[ -d target ]]; then
mv -T target target.cache
fi
# Actually do the build
# Check that we don't cross-build uudoc
make install-manpages PREFIX=/tmp/usr UTILS=true RUSTC_ARCH="--target aarch64-unknown-linux-gnu"
# build (host)
make build
echo "Check that target directory will be ignored by backup tools"
test -f target/CACHEDIR.TAG
Expand Down
14 changes: 8 additions & 6 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ RM := rm -rf
# Binaries
CARGO ?= cargo
CARGOFLAGS ?=
RUSTC_ARCH ?= # should be empty except for cross-build, not --target $(shell rustc -vV | sed -n 's/host: //p')

# Install directories
PREFIX ?= /usr/local
Expand Down Expand Up @@ -342,14 +343,14 @@ use_default := 1
build-pkgs:
ifneq (${MULTICALL}, y)
ifdef BUILD_SPEC_FEATURE
${CARGO} build ${CARGOFLAGS} --features "$(BUILD_SPEC_FEATURE)" ${PROFILE_CMD} $(foreach pkg,$(EXES),-p uu_$(pkg))
${CARGO} build ${CARGOFLAGS} --features "$(BUILD_SPEC_FEATURE)" ${PROFILE_CMD} $(foreach pkg,$(EXES),-p uu_$(pkg)) $(RUSTC_ARCH)
else
${CARGO} build ${CARGOFLAGS} ${PROFILE_CMD} $(foreach pkg,$(EXES),-p uu_$(pkg))
${CARGO} build ${CARGOFLAGS} ${PROFILE_CMD} $(foreach pkg,$(EXES),-p uu_$(pkg)) $(RUSTC_ARCH)
endif
endif

build-coreutils:
${CARGO} build ${CARGOFLAGS} --features "${EXES} $(BUILD_SPEC_FEATURE)" ${PROFILE_CMD} --no-default-features
${CARGO} build ${CARGOFLAGS} --features "${EXES} $(BUILD_SPEC_FEATURE)" ${PROFILE_CMD} --no-default-features $(RUSTC_ARCH)

build: build-coreutils build-pkgs locales

Expand Down Expand Up @@ -400,14 +401,15 @@ busytest: $(BUILDDIR)/busybox $(addprefix test_busybox_,$(filter-out $(SKIP_UTIL
endif

clean:
cargo clean
cd $(DOCSDIR) && $(MAKE) clean
cargo clean $(RUSTC_ARCH)
cd $(DOCSDIR) && $(MAKE) clean $(RUSTC_ARCH)

distclean: clean
$(CARGO) clean $(CARGOFLAGS) && $(CARGO) update $(CARGOFLAGS)
$(CARGO) clean $(CARGOFLAGS) $(RUSTC_ARCH) && $(CARGO) update $(CARGOFLAGS) $(RUSTC_ARCH)

ifeq ($(MANPAGES),y)
build-uudoc:
# Use same PROFILE with coreutils to share crates (if not cross-build)
${CARGO} build ${CARGOFLAGS} --bin uudoc --features "uudoc ${EXES}" ${PROFILE_CMD} --no-default-features

install-manpages: build-uudoc
Expand Down
Loading