diff options
Diffstat (limited to 'klibc/MCONFIG')
-rw-r--r-- | klibc/MCONFIG | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/klibc/MCONFIG b/klibc/MCONFIG index ec8b65c0e4..d2aa23626c 100644 --- a/klibc/MCONFIG +++ b/klibc/MCONFIG @@ -3,22 +3,29 @@ # Makefile configuration, without explicit rules # +# Eventually support separate compilation, but we don't have it yet... +OBJROOT = $(SRCROOT) + ARCH = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) CROSS = CC = $(CROSS)gcc LD = $(CROSS)ld KLIBSRC = $(SRCROOT)/klibc -REQFLAGS = $(ARCHREQFLAGS) -nostdinc -iwithprefix include -I$(KLIBSRC) \ - -I$(KLIBSRC)/arch/$(ARCH)/include \ - -I$(KLIBSRC)/include/bits$(BITSIZE) \ - -D__KLIBC__ -DBITSIZE=$(BITSIZE) -I$(KLIBSRC)/include \ - -I$(KERNEL_DIR)/include +KLIBOBJ = $(OBJROOT)/klibc +REQFLAGS = $(ARCHREQFLAGS) -nostdinc -iwithprefix include \ + -D__KLIBC__ -DBITSIZE=$(BITSIZE) \ + -I$(SRCROOT)/include/arch/$(ARCH) \ + -I$(SRCROOT)/include/bits$(BITSIZE) \ + -I$(SRCROOT)/include \ + -I$(SRCROOT)/linux/include -I$(SRCROOT)/linux/include2 + LDFLAGS = AR = $(CROSS)ar RANLIB = $(CROSS)ranlib NM = $(CROSS)nm PERL = perl STRIP = $(CROSS)strip --strip-all -R .comment -R .note +OBJCOPY = $(CROSS)objcopy HOST_CC = gcc HOST_CFLAGS = -g -O @@ -26,13 +33,13 @@ HOST_LDFLAGS = HOST_LIBS = # Static library paths -CRT0 = $(KLIBSRC)/crt0.o -KLIBC = $(KLIBSRC)/libc.a +CRT0 = $(KLIBOBJ)/crt0.o +KLIBC = $(KLIBOBJ)/libc.a LIBGCC = $(shell $(CC) --print-libgcc) # Shared library paths -CRTSHARED = $(KLIBSRC)/interp.o -LIBSHARED = $(KLIBSRC)/libc.so +CRTSHARED = $(KLIBOBJ)/interp.o +LIBSHARED = $(KLIBOBJ)/libc.so # # This indicates the location of the final version of the shared library. @@ -41,7 +48,15 @@ LIBSHARED = $(KLIBSRC)/libc.so # SHLIBDIR = /lib +# Enable this to make perror/strerror return real error messages +# This makes klibc.so and any static binary which uses these functions +# about 4K bigger. +ERRLIST = 1 + # # Include arch-specific rule fragments # include $(KLIBSRC)/arch/$(ARCH)/MCONFIG + +# How to tell the linker main() is the entrypoint +EMAIN ?= -e main |