summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-12-22 18:52:12 +0000
committerEric Andersen <andersen@codepoet.org>2004-12-22 18:52:12 +0000
commit4a56d69f1e77a362a51255c125d471fb468f9517 (patch)
treeac732e2023e9d7e1a688ef65bf771ad5755a43ab
parent05d9958f685e3f0c51be4f1128348645451e51fb (diff)
Patch from Peter S. Mazinger to consistantly use "ASFLAGS"
as the flags for all calls to 'as'
-rw-r--r--Rules.mak2
-rw-r--r--ldso/ldso/Makefile4
-rw-r--r--libc/string/arm/Makefile2
-rw-r--r--libc/string/frv/Makefile2
-rw-r--r--libc/string/mips/Makefile2
-rw-r--r--libc/string/sh64/Makefile2
-rw-r--r--libc/sysdeps/linux/alpha/Makefile9
-rw-r--r--libc/sysdeps/linux/arm/Makefile9
-rw-r--r--libc/sysdeps/linux/cris/Makefile7
-rw-r--r--libc/sysdeps/linux/e1/Makefile9
-rw-r--r--libc/sysdeps/linux/frv/Makefile9
-rw-r--r--libc/sysdeps/linux/h8300/Makefile7
-rw-r--r--libc/sysdeps/linux/i386/Makefile11
-rw-r--r--libc/sysdeps/linux/i960/Makefile9
-rw-r--r--libc/sysdeps/linux/m68k/Makefile11
-rw-r--r--libc/sysdeps/linux/microblaze/Makefile12
-rw-r--r--libc/sysdeps/linux/mips/Makefile9
-rw-r--r--libc/sysdeps/linux/nios/Makefile9
-rw-r--r--libc/sysdeps/linux/nios2/Makefile9
-rw-r--r--libc/sysdeps/linux/powerpc/Makefile11
-rw-r--r--libc/sysdeps/linux/sh/Makefile10
-rw-r--r--libc/sysdeps/linux/sh64/Makefile14
-rw-r--r--libc/sysdeps/linux/sparc/Makefile7
-rw-r--r--libc/sysdeps/linux/v850/Makefile10
-rw-r--r--libpthread/linuxthreads/sysdeps/sh64/Makefile4
25 files changed, 92 insertions, 98 deletions
diff --git a/Rules.mak b/Rules.mak
index 2b804b404..b7b4df385 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -272,6 +272,8 @@ ifeq ($(DOPIC),y)
CFLAGS += $(PICFLAG)
endif
+ASFLAGS = $(CFLAGS)
+
LIBGCC_CFLAGS ?= $(CFLAGS) $(CPU_CFLAGS-y)
LIBGCC:=$(shell $(CC) $(LIBGCC_CFLAGS) -print-libgcc-file-name)
LIBGCC_DIR:=$(dir $(LIBGCC))
diff --git a/ldso/ldso/Makefile b/ldso/ldso/Makefile
index 7822d4c4f..1d71f3fcb 100644
--- a/ldso/ldso/Makefile
+++ b/ldso/ldso/Makefile
@@ -22,6 +22,8 @@ include $(TOPDIR)Rules.mak
LDSO_FULLNAME=ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
SSPFLAGS=$(call check_gcc,-fno-stack-protector,)
+# reset to initial (disabling predefined CFLAGS)
+ASFLAGS=
XXFLAGS=$(XWARNINGS) $(SSPFLAGS)
ifeq ($(DODEBUG),y)
@@ -77,7 +79,7 @@ $(COBJS): %.o : %.c
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(AOBJS): %.o : %.S
- $(CC) $(XXFLAGS) -I../libdl -c $< -o $@
+ $(CC) $(XXFLAGS) $(ASFLAGS) -I../libdl -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
ldso.o: $(CSRC)
diff --git a/libc/string/arm/Makefile b/libc/string/arm/Makefile
index 25adea975..7a4e18454 100644
--- a/libc/string/arm/Makefile
+++ b/libc/string/arm/Makefile
@@ -31,7 +31,7 @@ ar-target: $(SOBJS)
$(AR) $(ARFLAGS) $(LIBC) $(SOBJS)
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
diff --git a/libc/string/frv/Makefile b/libc/string/frv/Makefile
index 5424e9b94..b9cea059a 100644
--- a/libc/string/frv/Makefile
+++ b/libc/string/frv/Makefile
@@ -31,7 +31,7 @@ ar-target: $(OBJS)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
diff --git a/libc/string/mips/Makefile b/libc/string/mips/Makefile
index a17826ea5..805024929 100644
--- a/libc/string/mips/Makefile
+++ b/libc/string/mips/Makefile
@@ -30,7 +30,7 @@ ar-target: $(SOBJS)
$(AR) $(ARFLAGS) $(LIBC) $(SOBJS)
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
diff --git a/libc/string/sh64/Makefile b/libc/string/sh64/Makefile
index 5c82e083f..fcd988f58 100644
--- a/libc/string/sh64/Makefile
+++ b/libc/string/sh64/Makefile
@@ -30,7 +30,7 @@ ar-target: $(SOBJS)
$(AR) $(ARFLAGS) $(LIBC) $(SOBJS)
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
diff --git a/libc/sysdeps/linux/alpha/Makefile b/libc/sysdeps/linux/alpha/Makefile
index c700b7589..d415c24ba 100644
--- a/libc/sysdeps/linux/alpha/Makefile
+++ b/libc/sysdeps/linux/alpha/Makefile
@@ -18,7 +18,6 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
CRT0_SRC = crt0.S
CRT0_OBJ = crt0.o crt1.o
@@ -42,11 +41,11 @@ ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
cp $(CRT0_OBJ) $(TOPDIR)lib/
$(CRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -55,14 +54,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/arm/Makefile b/libc/sysdeps/linux/arm/Makefile
index 6a80686a7..ecc75b350 100644
--- a/libc/sysdeps/linux/arm/Makefile
+++ b/libc/sysdeps/linux/arm/Makefile
@@ -18,7 +18,6 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
CRT0_SRC = crt0.S
CRT0_OBJ = crt0.o crt1.o
@@ -43,11 +42,11 @@ ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
cp $(CRT0_OBJ) $(TOPDIR)lib/
$(CRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -56,14 +55,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/cris/Makefile b/libc/sysdeps/linux/cris/Makefile
index 1b5735e9b..458c512d7 100644
--- a/libc/sysdeps/linux/cris/Makefile
+++ b/libc/sysdeps/linux/cris/Makefile
@@ -18,7 +18,6 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
CRT0_SRC = crt0.c
CRT0_OBJ = crt0.o crt1.o
@@ -48,7 +47,7 @@ $(CRT0_OBJ): $(CRT0_SRC)
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -57,14 +56,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/e1/Makefile b/libc/sysdeps/linux/e1/Makefile
index 3718c8919..da98b902f 100644
--- a/libc/sysdeps/linux/e1/Makefile
+++ b/libc/sysdeps/linux/e1/Makefile
@@ -18,7 +18,6 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
#FIXME -- this arch should include its own crti.S and crtn.S
UCLIBC_CTOR_DTOR=n
@@ -47,11 +46,11 @@ ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
cp $(CRT0_OBJ) $(TOPDIR)lib/$(CRT0_OBJ)
$(CRT0_OBJ): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -60,14 +59,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/frv/Makefile b/libc/sysdeps/linux/frv/Makefile
index 7f3347feb..fc1cf327c 100644
--- a/libc/sysdeps/linux/frv/Makefile
+++ b/libc/sysdeps/linux/frv/Makefile
@@ -19,7 +19,6 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
CRT0_SRC = crt0.S
CRT0_OBJ = crt0.o crt1.o
@@ -49,25 +48,25 @@ ar-target: $(OBJS) $(CRT0_OBJ) $(SCRT0_OBJ) $(CTOR_TARGETS)
cp $(CRT0_OBJ) $(SCRT0_OBJ) $(CTOR_TARGETS) $(TOPDIR)lib/
$(CRT0_OBJ): $(CRT0_SRC) crtreloc.o
- $(CC) $(CFLAGS) -DL_$* -r -nostdlib $< crtreloc.o -o $*.o
+ $(CC) $(ASFLAGS) -DL_$* -r -nostdlib $< crtreloc.o -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
crtreloc.o: crtreloc.c
$(CC) $(CFLAGS) -c $< -o $@
$(SCRT0_OBJ): $(CRT0_SRC) Scrtreloc.o
- $(CC) $(CFLAGS) $(PIEFLAG) -DL_$* -r -nostdlib $< Scrtreloc.o -o $*.o
+ $(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* -r -nostdlib $< Scrtreloc.o -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
Scrtreloc.o: crtreloc.c
$(CC) $(CFLAGS) $(PIEFLAG) -c $< -o $@
$(CTOR_TARGETS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
diff --git a/libc/sysdeps/linux/h8300/Makefile b/libc/sysdeps/linux/h8300/Makefile
index f79069241..9176a2ed2 100644
--- a/libc/sysdeps/linux/h8300/Makefile
+++ b/libc/sysdeps/linux/h8300/Makefile
@@ -18,7 +18,6 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
ifeq ($(DOPIC),y)
ASFLAGS+=-D__PIC__
endif
@@ -47,7 +46,7 @@ ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
cp $(CRT0_OBJ) $(TOPDIR)lib/
$(CRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
@@ -60,14 +59,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/i386/Makefile b/libc/sysdeps/linux/i386/Makefile
index 463dc64ee..6b6a9d6dc 100644
--- a/libc/sysdeps/linux/i386/Makefile
+++ b/libc/sysdeps/linux/i386/Makefile
@@ -18,7 +18,6 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
CRT0_SRC = crt0.S
CRT0_OBJ = crt0.o crt1.o
@@ -53,15 +52,15 @@ endif
endif
$(CRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SCRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -70,14 +69,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/i960/Makefile b/libc/sysdeps/linux/i960/Makefile
index 416084c11..7632e5b2d 100644
--- a/libc/sysdeps/linux/i960/Makefile
+++ b/libc/sysdeps/linux/i960/Makefile
@@ -18,7 +18,6 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
#FIXME -- this arch should include its own crti.S and crtn.S
UCLIBC_CTOR_DTOR=n
@@ -44,11 +43,11 @@ ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
cp $(CRT0_OBJ) $(TOPDIR)lib/
$(CRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -57,14 +56,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/m68k/Makefile b/libc/sysdeps/linux/m68k/Makefile
index b769954e0..8f0a2ba96 100644
--- a/libc/sysdeps/linux/m68k/Makefile
+++ b/libc/sysdeps/linux/m68k/Makefile
@@ -18,7 +18,6 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
# If you're looking for vfork(), it is defined in include/unistd.h
@@ -48,11 +47,15 @@ ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
cp $(CRT0_OBJ) $(TOPDIR)lib/
$(CRT0_OBJ): $(CRT0_SRC)
+ifeq ($(ARCH_HAS_MMU),y)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+else
+ $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
+endif
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -61,14 +64,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/microblaze/Makefile b/libc/sysdeps/linux/microblaze/Makefile
index 895d5318e..b17cb74ef 100644
--- a/libc/sysdeps/linux/microblaze/Makefile
+++ b/libc/sysdeps/linux/microblaze/Makefile
@@ -23,8 +23,8 @@ include $(TOPDIR)Rules.mak
#FIXME -- this arch should include its own crti.S and crtn.S
UCLIBC_CTOR_DTOR=n
-CFLAGS += -I..
-SFLAGS = $(CFLAGS) -D__ASSEMBLER -DASM_GLOBAL_DIRECTIVE=.globl
+CFLAGS+=-I..
+ASFLAGS+=-I.. -D__ASSEMBLER -DASM_GLOBAL_DIRECTIVE=.globl
TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
@@ -49,11 +49,11 @@ ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
cp $(CRT0_OBJ) $(TOPDIR)lib/
$(CRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(SFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -62,14 +62,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/mips/Makefile b/libc/sysdeps/linux/mips/Makefile
index a8e3c460f..2a021dfe9 100644
--- a/libc/sysdeps/linux/mips/Makefile
+++ b/libc/sysdeps/linux/mips/Makefile
@@ -18,7 +18,6 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
CRT0_SRC = crt0.S
CRT0_OBJ = crt0.o crt1.o
@@ -42,11 +41,11 @@ ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
cp $(CRT0_OBJ) $(TOPDIR)lib/
$(CRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -56,14 +55,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/nios/Makefile b/libc/sysdeps/linux/nios/Makefile
index ea56738dc..67ee79e55 100644
--- a/libc/sysdeps/linux/nios/Makefile
+++ b/libc/sysdeps/linux/nios/Makefile
@@ -18,7 +18,6 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
CRT0_SRC = crt0.S
CRT0_OBJ = crt0.o crt1.o
@@ -41,11 +40,11 @@ ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
cp $(CRT0_OBJ) $(TOPDIR)lib/
$(CRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -54,14 +53,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/nios2/Makefile b/libc/sysdeps/linux/nios2/Makefile
index 59b2a8152..942708429 100644
--- a/libc/sysdeps/linux/nios2/Makefile
+++ b/libc/sysdeps/linux/nios2/Makefile
@@ -18,7 +18,6 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
CRT0_SRC = crt0.S
CRT0_OBJ = crt0.o crt1.o
@@ -41,11 +40,11 @@ ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
cp $(CRT0_OBJ) $(TOPDIR)lib/
$(CRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -54,14 +53,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/powerpc/Makefile b/libc/sysdeps/linux/powerpc/Makefile
index de750b460..bc2f7d5d9 100644
--- a/libc/sysdeps/linux/powerpc/Makefile
+++ b/libc/sysdeps/linux/powerpc/Makefile
@@ -18,7 +18,6 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
CRT0_SRC = crt0.S
CRT0_OBJ = crt0.o crt1.o
@@ -53,15 +52,15 @@ endif
endif
$(CRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SCRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -71,14 +70,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/sh/Makefile b/libc/sysdeps/linux/sh/Makefile
index fff757d5a..01e0fb511 100644
--- a/libc/sysdeps/linux/sh/Makefile
+++ b/libc/sysdeps/linux/sh/Makefile
@@ -21,7 +21,7 @@ TOPDIR=../../../../
include $(TOPDIR)Rules.mak
CFLAGS+= -I../
-SFLAGS= $(CFLAGS) -D__ASSEMBLER__
+ASFLAGS+=-I.. -D__ASSEMBLER__
CRT0_SRC = crt0.S
CRT0_OBJ = crt0.o crt1.o
@@ -45,11 +45,11 @@ ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
cp $(CRT0_OBJ) $(TOPDIR)lib/
$(CRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(SFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -58,14 +58,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/sh64/Makefile b/libc/sysdeps/linux/sh64/Makefile
index 3480476da..688df0be0 100644
--- a/libc/sysdeps/linux/sh64/Makefile
+++ b/libc/sysdeps/linux/sh64/Makefile
@@ -21,7 +21,7 @@ TOPDIR=../../../../
include $(TOPDIR)Rules.mak
CFLAGS += -I..
-SFLAGS = $(CFLAGS) -D__ASSEMBLER__ -DASM_GLOBAL_DIRECTIVE=.globl
+ASFLAGS+=-I.. -D__ASSEMBLER__ -DASM_GLOBAL_DIRECTIVE=.globl
TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
@@ -29,7 +29,7 @@ CRT0_SRC = crt0.S
CRT0_OBJ = crt0.o crt1.o
CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC = setjmp.S longjmp.S
+SSRC = setjmp.S longjmp.S
SOBJS = $(patsubst %.S,%.o, $(SSRC))
CSRC = __init_brk.c brk.c sbrk.c syscall.c
@@ -39,18 +39,18 @@ OBJS = $(SOBJS) $(COBJS)
all: $(OBJS) $(LIBC)
-$(LIBC): ar-target
+$(LIBC): ar-target
ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
cp $(CRT0_OBJ) $(TOPDIR)lib/
$(CRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(SFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -59,14 +59,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/sparc/Makefile b/libc/sysdeps/linux/sparc/Makefile
index 01705c024..436785747 100644
--- a/libc/sysdeps/linux/sparc/Makefile
+++ b/libc/sysdeps/linux/sparc/Makefile
@@ -18,7 +18,6 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
CRT0_SRC = crt0.c
CRT0_OBJ = crt0.o crt1.o
@@ -46,7 +45,7 @@ $(CRT0_OBJ): $(CRT0_SRC)
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -55,14 +54,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libc/sysdeps/linux/v850/Makefile b/libc/sysdeps/linux/v850/Makefile
index de7c0919c..160bf25d8 100644
--- a/libc/sysdeps/linux/v850/Makefile
+++ b/libc/sysdeps/linux/v850/Makefile
@@ -21,7 +21,7 @@ TOPDIR=../../../../
include $(TOPDIR)Rules.mak
CFLAGS += -I..
-SFLAGS = $(CFLAGS) -D__ASSEMBLER -DASM_GLOBAL_DIRECTIVE=.globl
+ASFLAGS+=-I.. -D__ASSEMBLER -DASM_GLOBAL_DIRECTIVE=.globl
TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
@@ -46,11 +46,11 @@ ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
cp $(CRT0_OBJ) $(TOPDIR)lib/
$(CRT0_OBJ): $(CRT0_SRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(SFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
@@ -59,14 +59,14 @@ $(COBJS): %.o : %.c
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
crti.o: crti.S
- $(CC) $(CFLAGS) -c crti.S -o crti.o
+ $(CC) $(ASFLAGS) -c crti.S -o crti.o
$(TOPDIR)lib/crti.o: crti.o
$(INSTALL) -d $(TOPDIR)lib/
cp crti.o $(TOPDIR)lib/
crtn.o: crtn.S
- $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) -c crtn.S -o crtn.o
$(TOPDIR)lib/crtn.o: crtn.o
$(INSTALL) -d $(TOPDIR)lib/
diff --git a/libpthread/linuxthreads/sysdeps/sh64/Makefile b/libpthread/linuxthreads/sysdeps/sh64/Makefile
index 375946b8d..11b7cc0b5 100644
--- a/libpthread/linuxthreads/sysdeps/sh64/Makefile
+++ b/libpthread/linuxthreads/sysdeps/sh64/Makefile
@@ -31,13 +31,13 @@ OBJS = $(SOBJS) $(COBJS)
all: $(OBJS) $(LIBC)
-$(LIBC): ar-target
+$(LIBC): ar-target
ar-target: $(OBJS)
$(AR) $(ARFLAGS) $(LIBPTHREAD) $(OBJS)
$(SOBJS): %.o : %.S
- $(CC) $(SFLAGS) -c $< -o $@
+ $(CC) $(ASFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c