From 150dfc5c4efe1ee835b5414fabc4a1b5b4c9cb3b Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 18 Nov 2016 09:01:39 -0700 Subject: [PATCH] Add binutils --- .gitmodules | 3 +++ Makefile | 18 ++++++++++++++++-- programs/binutils | 1 + programs/extrautils | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) create mode 160000 programs/binutils diff --git a/.gitmodules b/.gitmodules index 187ed86..3335d1a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -52,3 +52,6 @@ [submodule "libstd_real/openlibm"] path = libstd/openlibm url = https://github.com/redox-os/openlibm.git +[submodule "programs/binutils"] + path = programs/binutils + url = https://github.com/redox-os/binutils.git diff --git a/Makefile b/Makefile index 82d5e11..24ad33a 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ CARGO=RUSTC="$(RUSTC)" RUSTDOC="$(RUSTDOC)" cargo CARGOFLAGS=--target $(TARGET).json --release -- # Default targets -.PHONY: all clean doc ref test update qemu bochs drivers schemes coreutils extrautils netutils userutils wireshark FORCE +.PHONY: all clean doc ref test update qemu bochs drivers schemes binutils coreutils extrautils netutils userutils wireshark FORCE all: $(KBUILD)/harddrive.bin @@ -38,6 +38,7 @@ clean: cargo clean --manifest-path programs/contain/Cargo.toml cargo clean --manifest-path programs/init/Cargo.toml cargo clean --manifest-path programs/ion/Cargo.toml + cargo clean --manifest-path programs/binutils/Cargo.toml cargo clean --manifest-path programs/coreutils/Cargo.toml cargo clean --manifest-path programs/extrautils/Cargo.toml cargo clean --manifest-path programs/netutils/Cargo.toml @@ -74,6 +75,7 @@ doc-std: $(BUILD)/libstd.rlib FORCE ref: FORCE rm -rf filesystem/ref/ mkdir -p filesystem/ref/ + cargo run --manifest-path crates/docgen/Cargo.toml -- programs/binutils/src/bin/ filesystem/ref/ cargo run --manifest-path crates/docgen/Cargo.toml -- programs/coreutils/src/bin/ filesystem/ref/ cargo run --manifest-path crates/docgen/Cargo.toml -- programs/extrautils/src/bin/ filesystem/ref/ cargo run --manifest-path crates/docgen/Cargo.toml -- programs/netutils/src/ filesystem/ref/ @@ -91,6 +93,7 @@ test: cargo test --manifest-path programs/contain/Cargo.toml cargo test --manifest-path programs/init/Cargo.toml cargo test --manifest-path programs/ion/Cargo.toml + cargo test --manifest-path programs/binutils/Cargo.toml cargo test --manifest-path programs/coreutils/Cargo.toml cargo test --manifest-path programs/extrautils/Cargo.toml cargo test --manifest-path programs/netutils/Cargo.toml @@ -122,6 +125,7 @@ update: cargo update --manifest-path programs/contain/Cargo.toml cargo update --manifest-path programs/init/Cargo.toml cargo update --manifest-path programs/ion/Cargo.toml + cargo update --manifest-path programs/binutils/Cargo.toml cargo update --manifest-path programs/coreutils/Cargo.toml cargo update --manifest-path programs/extrautils/Cargo.toml cargo update --manifest-path programs/netutils/Cargo.toml @@ -373,6 +377,12 @@ filesystem/bin/%: programs/%/Cargo.toml programs/%/src/** $(BUILD)/libstd.rlib filesystem/bin/sh: filesystem/bin/ion cp $< $@ +filesystem/bin/%: programs/binutils/Cargo.toml programs/binutils/src/bin/%.rs $(BUILD)/libstd.rlib + mkdir -p filesystem/bin + $(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@ + strip $@ + rm $@.d + filesystem/bin/%: programs/coreutils/Cargo.toml programs/coreutils/src/bin/%.rs $(BUILD)/libstd.rlib mkdir -p filesystem/bin $(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@ @@ -420,6 +430,11 @@ drivers: \ filesystem/bin/e1000d \ filesystem/bin/rtl8168d +binutils: \ + filesystem/bin/hex \ + filesystem/bin/hexdump \ + filesystem/bin/strings + coreutils: \ filesystem/bin/basename \ filesystem/bin/cat \ @@ -464,7 +479,6 @@ extrautils: \ filesystem/bin/cksum \ filesystem/bin/cur \ filesystem/bin/grep \ - filesystem/bin/hexdump \ filesystem/bin/less \ filesystem/bin/man \ filesystem/bin/mdless \ diff --git a/programs/binutils b/programs/binutils new file mode 160000 index 0000000..5599724 --- /dev/null +++ b/programs/binutils @@ -0,0 +1 @@ +Subproject commit 5599724eab8b28705f6b2b66145fdcb7e4ce2d4d diff --git a/programs/extrautils b/programs/extrautils index b3d8bf6..63f27dc 160000 --- a/programs/extrautils +++ b/programs/extrautils @@ -1 +1 @@ -Subproject commit b3d8bf61860cd4c7c2263b2798779aa182cab1d6 +Subproject commit 63f27dccc12184a4eb73efa0a065fea65650c664