From 8370d0a3eb373c37386de32ccd3a8a38ddeb8b02 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 6 Apr 2024 19:46:41 -0400 Subject: build: Statically link libc Signed-off-by: Ian Moffett --- Makefile.in | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index f4336a7..7cc093a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -47,8 +47,9 @@ else override LD = $(shell pwd)/cross/bin/$(ARCH)-hyra-ld endif override AS = $(CC) -override LDSO = $(shell pwd)/base/usr/lib/ld.so -override USER_MKFLGS = CC=$(CC) LD=$(LD) LDSO=$(LDSO) +override USRDIR=$(shell pwd)/base/usr/ +override LIBC = libc.a +override USER_MKFLGS = CC=$(CC) LD=$(LD) LIBC=$(LIBC) USRDIR=$(USRDIR) ########################## # Architecture specifics @@ -71,7 +72,7 @@ override KERNEL_ASMOBJECTS = $(KERNEL_ASMFILES:.S=.S.o) override KERNEL_HEADER_DEPS = $(KERNEL_CFILES:.c=.d) .PHONY: all -all: base lib userland base/usr/lib/ld.so base/boot/hyra-kernel +all: base lib userland base/boot/hyra-kernel rm -f sys/include/machine rm -rf iso_root @@ -87,11 +88,12 @@ base: mkdir -p base/usr/lib/ mkdir -p base/usr/sbin/ mkdir -p base/boot/ + cd base/usr/; ln -sf ../../lib/libc/include/ . .PHONY: lib lib: cd lib/; make $(USER_MKFLGS) - cp lib/libc/build/ld.so base/usr/lib/ + cp lib/libc/build/libc.a base/usr/lib/ .PHONY: run run: @@ -106,8 +108,7 @@ distclean: make clean rm -f $(KERNEL_ASMOBJECTS) $(KERNEL_OBJECTS) $(KERNEL_HEADER_DEPS) rm -f sys/include/machine - rm -f base/usr/lib/ld.so - rm -f base/boot/init + rm -f base/usr/sbin/init cd lib/; make clean .PHONY: clean -- cgit v1.2.3