Skip to content
Snippets Groups Projects
Verified Commit 27cebdd6 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Build librelibc without incremental support, gc-sections for ld.so

parent ba50c94c
No related branches found
No related tags found
Loading
......@@ -94,7 +94,7 @@ $(BUILD)/debug/libc.so: $(BUILD)/debug/librelibc.patched.a $(BUILD)/pthreads-emb
$(CC) -nostdlib -shared -Wl,--whole-archive $^ -Wl,--no-whole-archive -o $@
$(BUILD)/debug/librelibc.a: $(SRC)
$(CARGO) rustc $(CARGOFLAGS) -- --emit link=$@ $(RUSTCFLAGS)
CARGO_INCREMENTAL=0 $(CARGO) rustc $(CARGOFLAGS) -- --emit link=$@ $(RUSTCFLAGS)
touch $@
$(BUILD)/debug/librelibc.patched.a: $(BUILD)/debug/librelibc.a
......@@ -119,7 +119,7 @@ $(BUILD)/debug/ld_so.o: $(SRC)
touch $@
$(BUILD)/debug/ld_so: $(BUILD)/debug/ld_so.o $(BUILD)/debug/crti.o $(BUILD)/debug/libc.a $(BUILD)/debug/crtn.o
$(LD) $^ -o $@
$(LD) --gc-sections $^ -o $@
# Release targets
......@@ -136,7 +136,7 @@ $(BUILD)/release/libc.so: $(BUILD)/release/librelibc.patched.a $(BUILD)/pthreads
$(CC) -nostdlib -shared -Wl,--whole-archive $^ -Wl,--no-whole-archive -o $@
$(BUILD)/release/librelibc.a: $(SRC)
$(CARGO) rustc --release $(CARGOFLAGS) -- --emit link=$@ $(RUSTCFLAGS)
CARGO_INCREMENTAL=0 $(CARGO) rustc --release $(CARGOFLAGS) -- --emit link=$@ $(RUSTCFLAGS)
touch $@
$(BUILD)/release/librelibc.patched.a: $(BUILD)/release/librelibc.a
......@@ -161,7 +161,7 @@ $(BUILD)/release/ld_so.o: $(SRC)
touch $@
$(BUILD)/release/ld_so: $(BUILD)/release/ld_so.o $(BUILD)/release/crti.o $(BUILD)/release/libc.a $(BUILD)/release/crtn.o
$(LD) $^ -o $@
$(LD) --gc-sections $^ -o $@
# Other targets
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment