diff options
-rw-r--r-- | Rules.mak | 8 | ||||
-rwxr-xr-x | extra/scripts/initfini.awk | 4 | ||||
-rw-r--r-- | libc/Makefile | 5 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/Makefile | 12 |
4 files changed, 16 insertions, 13 deletions
@@ -166,12 +166,12 @@ endif # Add a bunch of extra pedantic annoyingly strict checks -XWARNINGS=-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing +XWARNINGS=$(subst ",, $(strip $(WARNINGS))) -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing +XARCH_CFLAGS=$(subst ",, $(strip $(ARCH_CFLAGS))) CPU_CFLAGS=$(subst ",, $(strip $(CPU_CFLAGS-y))) # Some nice CFLAGS to work with -CFLAGS:=$(subst ",, $(strip $(WARNINGS))) $(XWARNINGS) $(OPTIMIZATION) \ - -fno-builtin -nostdinc $(CPUFLAGS) -D_LIBC $(CPU_CFLAGS) \ - $(subst ",, $(strip $(ARCH_CFLAGS))) -I$(TOPDIR)include -I. +CFLAGS:=$(XWARNINGS) $(OPTIMIZATION) $(XARCH_CFLAGS) $(CPU_CFLAGS) \ + -fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)include -I. ifeq ($(DODEBUG),y) CFLAGS += -g diff --git a/extra/scripts/initfini.awk b/extra/scripts/initfini.awk index 3f0bb5e26..818cfa26f 100755 --- a/extra/scripts/initfini.awk +++ b/extra/scripts/initfini.awk @@ -13,7 +13,7 @@ BEGIN \ omitcrti=0; omitcrtn=0; glb_idx = 0; - while(getline < "initfini.s") + while(getline < "initfini.S") { if(/\.endp/) {endp=1} if(/\.end/) {end=1} if(/\.align/) {alignval=$2} @@ -27,7 +27,7 @@ BEGIN \ } last = $1; } - close("initfini.s"); + close("initfini.S"); } # special rules for the SuperH targets (They do nothing on other targets) /SH_GLB_BEGINS/ && glb_idx==0 {omitcrti +=1} diff --git a/libc/Makefile b/libc/Makefile index 4a5110f0e..04f8e674e 100644 --- a/libc/Makefile +++ b/libc/Makefile @@ -45,12 +45,15 @@ VERSION_SCRIPT:=${shell if [ -f sysdeps/linux/$(TARGET_ARCH)/libc.map ] ; then \ all: halfclean subdirs $(LIBNAME) $(DO_SHARED) -$(LIBNAME): subdirs +ar-target: $(CROSS)ranlib $(LIBNAME) install -d $(TOPDIR)lib rm -f $(TOPDIR)lib/$(LIBNAME) install -m 644 $(LIBNAME) $(TOPDIR)lib +$(LIBNAME): subdirs ar-target + + shared: $(TOPDIR)lib/$(LIBNAME) @rm -rf tmp @mkdir tmp diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile index e6828cd17..c4e63766e 100644 --- a/libc/sysdeps/linux/common/Makefile +++ b/libc/sysdeps/linux/common/Makefile @@ -41,7 +41,7 @@ MOBJ=$(shell ./list_syscalls.sh) ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y) CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o -SAFECFLAGS=$(WARNINGS) $(CPU_CFLAGS-y) $(OPTIMIZATION) -fno-builtin +SAFECFLAGS=$(XWARNINGS) $(OPTIMIZATION) $(XARCH_CFLAGS) $(CPU_CFLAGS) -fno-builtin ifeq ($(strip $(DOPIC)),y) SAFECFLAGS+=-fPIC endif @@ -64,11 +64,11 @@ $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ $(STRIPTOOL) -x -R .note -R .comment $*.o -initfini.s: initfini.c - $(CC) $(SAFECFLAGS) -I$(TOPDIR)include -c initfini.c -S -o initfini.s +initfini.S: initfini.c + $(CC) $(SAFECFLAGS) -I$(TOPDIR)include -c initfini.c -S -o initfini.S -crti.S crtn.S: initfini.s $(TOPDIR)/extra/scripts/initfini.awk - $(AWK) -f $(TOPDIR)extra/scripts/initfini.awk initfini.s +crti.S crtn.S: initfini.S $(TOPDIR)/extra/scripts/initfini.awk + $(AWK) -f $(TOPDIR)extra/scripts/initfini.awk initfini.S crti.o: crti.S $(CC) $(SAFECFLAGS) -c crti.S -o crti.o @@ -85,5 +85,5 @@ $(TOPDIR)lib/crtn.o: crtn.o cp crtn.o $(TOPDIR)lib/ clean: - rm -f *.[oa] *~ core crt[in].* initfini.s + rm -f *.[oa] *~ core crt[in].* *.S |