summaryrefslogtreecommitdiff
path: root/libc/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps')
-rw-r--r--libc/sysdeps/linux/alpha/Makefile57
-rw-r--r--libc/sysdeps/linux/arm/Makefile58
-rw-r--r--libc/sysdeps/linux/bfin/Makefile57
-rw-r--r--libc/sysdeps/linux/common/Makefile23
-rw-r--r--libc/sysdeps/linux/cris/Makefile61
-rw-r--r--libc/sysdeps/linux/e1/Makefile61
-rw-r--r--libc/sysdeps/linux/frv/Makefile47
-rw-r--r--libc/sysdeps/linux/h8300/Makefile60
-rw-r--r--libc/sysdeps/linux/i386/Makefile58
-rw-r--r--libc/sysdeps/linux/i960/Makefile59
-rw-r--r--libc/sysdeps/linux/m68k/Makefile66
-rw-r--r--libc/sysdeps/linux/microblaze/Makefile63
-rw-r--r--libc/sysdeps/linux/mips/Makefile58
-rw-r--r--libc/sysdeps/linux/nios/Makefile56
-rw-r--r--libc/sysdeps/linux/nios2/Makefile59
-rw-r--r--libc/sysdeps/linux/powerpc/Makefile59
-rw-r--r--libc/sysdeps/linux/sh/Makefile58
-rw-r--r--libc/sysdeps/linux/sh64/Makefile61
-rw-r--r--libc/sysdeps/linux/sparc/Makefile52
-rw-r--r--libc/sysdeps/linux/v850/Makefile61
-rw-r--r--libc/sysdeps/linux/x86_64/Makefile58
21 files changed, 465 insertions, 727 deletions
diff --git a/libc/sysdeps/linux/alpha/Makefile b/libc/sysdeps/linux/alpha/Makefile
index cee893a3b..ed354d3dc 100644
--- a/libc/sysdeps/linux/alpha/Makefile
+++ b/libc/sysdeps/linux/alpha/Makefile
@@ -19,61 +19,50 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=__longjmp.S brk.S bsd-_setjmp.S bsd-setjmp.S clone.S \
- setjmp.S divl.S reml.S remq.S divq.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S brk.S bsd-_setjmp.S bsd-setjmp.S clone.S \
+ setjmp.S divl.S reml.S remq.S divq.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=sysdep.c #brk.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := sysdep.c #brk.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/arm/Makefile b/libc/sysdeps/linux/arm/Makefile
index 19701e1d9..055dc08f0 100644
--- a/libc/sysdeps/linux/arm/Makefile
+++ b/libc/sysdeps/linux/arm/Makefile
@@ -19,66 +19,54 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-SCRT_OBJ = $(patsubst %,S%, $(CRT_OBJ))
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+SCRT_OBJ := Scrt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=__longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \
+SSRC := __longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \
bsd-_setjmp.S sigrestorer.S mmap64.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=brk.c syscall.c ioperm.c iopl.c sigaction.c __syscall_error.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := brk.c syscall.c ioperm.c iopl.c sigaction.c __syscall_error.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(SCRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(SCRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/bfin/Makefile b/libc/sysdeps/linux/bfin/Makefile
index b43209106..85f3cb910 100644
--- a/libc/sysdeps/linux/bfin/Makefile
+++ b/libc/sysdeps/linux/bfin/Makefile
@@ -19,62 +19,35 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o
-#CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-CTOR_TARGETS=
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o
-SSRC= __longjmp.S setjmp.S bsd-_setjmp.S vfork.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S setjmp.S bsd-_setjmp.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=brk.c bsdsetjmp.c clone.c syscall.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := brk.c bsdsetjmp.c clone.c syscall.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(MOBJ) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
all: $(OBJ_LIST)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -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) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
-
-$(TOPDIR)lib/crtn.o: crtn.o
- $(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
-else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
-endif
headers:
diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile
index 44014979d..e45c58961 100644
--- a/libc/sysdeps/linux/common/Makefile
+++ b/libc/sysdeps/linux/common/Makefile
@@ -19,39 +19,40 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-SRCS = $(wildcard *.c)
+SRCS = $(wildcard *.c)
-ifeq ($(strip $(EXCLUDE_BRK)),y)
+ifeq ($(EXCLUDE_BRK),y)
SRCS := $(filter-out sbrk.c,$(SRCS))
endif
SRCS := $(filter-out ssp-local.c,$(SRCS))
-ifneq ($(strip $(UCLIBC_HAS_SSP)),y)
+ifneq ($(UCLIBC_HAS_SSP),y)
SRCS := $(filter-out ssp.c,$(SRCS))
-NONSHARED_OBJ_LIST=
+NONSHARED_OBJ_LIST :=
else
-NONSHARED_OBJ_LIST=../../../nonshared_obj.sysdeps.common
+NONSHARED_OBJ_LIST := ../../../nonshared_obj.sysdeps.common
ssp.o: CFLAGS += $(SSP_DISABLE_FLAGS)
ssp-local.o: CFLAGS += $(SSP_DISABLE_FLAGS)
endif
-OBJS = $(patsubst %.c,%.o, $(SRCS))
+OBJS := $(patsubst %.c,%.o, $(SRCS))
-NONSHARED_OBJS = ssp-local.o
+NONSHARED_OBJS := ssp-local.o
-OBJ_LIST=../../../obj.sysdeps.common
+OBJ_LIST := ../../../obj.sysdeps.common
all: $(OBJ_LIST) $(NONSHARED_OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, sysdeps/linux/common/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, sysdeps/linux/common/%, $^) > $@
$(NONSHARED_OBJ_LIST): $(NONSHARED_OBJS)
- echo $(patsubst %, sysdeps/linux/common/%, $(NONSHARED_OBJS)) > $(NONSHARED_OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, sysdeps/linux/common/%, $^) > $@
$(OBJS) $(NONSHARED_OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
headers:
$(LN) -fs ../libc/sysdeps/linux/common/fpu_control.h $(TOPDIR)/include/
diff --git a/libc/sysdeps/linux/cris/Makefile b/libc/sysdeps/linux/cris/Makefile
index 9063ff7cf..3c60e01ca 100644
--- a/libc/sysdeps/linux/cris/Makefile
+++ b/libc/sysdeps/linux/cris/Makefile
@@ -19,63 +19,52 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT0_SRC = crt0.c
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt0.c
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC= setjmp.S __longjmp.S clone.S sysdep.S syscall.S
+SSRC = setjmp.S __longjmp.S clone.S sysdep.S syscall.S
ifeq ($(UNIFIED_SYSCALL),y)
- SSRC += __uClibc_syscall.S
+SSRC += __uClibc_syscall.S
endif
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC= __init_brk.c brk.c sbrk.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := __init_brk.c brk.c sbrk.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/e1/Makefile b/libc/sysdeps/linux/e1/Makefile
index e02888ac4..4e37d329f 100644
--- a/libc/sysdeps/linux/e1/Makefile
+++ b/libc/sysdeps/linux/e1/Makefile
@@ -24,61 +24,42 @@ UCLIBC_CTOR_DTOR=n
# If you're looking for vfork(), it is defined in include/unistd.h
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-CRT0=crt0.S
-CRT0_OBJ=$(patsubst %.S,%.o, $(CRT0))
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+# why is crt1.c listed in CSRC ?
+CSRC := crt1.c syscalls.c longjmp.c setjmp.c vfork.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-SSRC=
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-CSRC=crt1.c syscalls.c longjmp.c setjmp.c vfork.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-OBJS=$(SOBJS) $(MOBJ) $(COBJS) $(CRT0_OBJ)
-
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
-
-all: $(OBJ_LIST)
-
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/$(CRT0_OBJ)
-
-$(CRT0_OBJ): %.o : %.S
- $(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(SOBJS): %.o : %.S
+$(CRT_OBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
-
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/frv/Makefile b/libc/sysdeps/linux/frv/Makefile
index bfb127af4..82d7ddf39 100644
--- a/libc/sysdeps/linux/frv/Makefile
+++ b/libc/sysdeps/linux/frv/Makefile
@@ -20,56 +20,51 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-SCRT0_OBJ = $(patsubst %,S%, $(CRT0_OBJ))
-CRT0_DEPS=gmon-start.S
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
+SCRT_OBJ := $(patsubst %,S%, $(CRT_OBJ))
-CTOR_TARGETS = crti.o crtn.o
+CTOR_TARGETS := crti.o crtn.o
-SSRC=__longjmp.S setjmp.S clone.S vfork.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S setjmp.S clone.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=mmap.c sysdep.c syscall.c brk.c sbrk.c __init_brk.c dl-iterate-phdr.c
-CSRC+=xstatconv.c stat.c stat64.c fstat.c fstat64.c lstat.c lstat64.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC = mmap.c sysdep.c syscall.c brk.c sbrk.c __init_brk.c dl-iterate-phdr.c
+CSRC += xstatconv.c stat.c stat64.c fstat.c fstat64.c lstat.c lstat64.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
all: $(OBJ_LIST)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(SCRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(SCRT0_OBJ) $(CTOR_TARGETS) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC) crtreloc.o
- $(CC) $(ASFLAGS) -DL_$* -r -nostdlib $< crtreloc.o -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
+$(CRT_OBJ): $(CRT_SRC) crtreloc.o
+ $(CC) $(ASFLAGS) -DL_$* -r -nostdlib $^ -o $*.o
crtreloc.o: crtreloc.c
$(CC) $(CFLAGS) -c $< -o $@
-$(SCRT0_OBJ): $(CRT0_SRC) Scrtreloc.o
- $(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* -r -nostdlib $< Scrtreloc.o -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
+$(SCRT_OBJ): $(CRT_SRC) Scrtreloc.o
+ $(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* -r -nostdlib $^ -o $*.o
Scrtreloc.o: crtreloc.c
$(CC) $(CFLAGS) $(PIEFLAG) -c $< -o $@
$(CTOR_TARGETS): %.o : %.S
$(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
headers:
$(LN) -fs ../libc/sysdeps/linux/frv/link.h $(TOPDIR)/include/
diff --git a/libc/sysdeps/linux/h8300/Makefile b/libc/sysdeps/linux/h8300/Makefile
index 5403feb01..ceb2c145e 100644
--- a/libc/sysdeps/linux/h8300/Makefile
+++ b/libc/sysdeps/linux/h8300/Makefile
@@ -19,66 +19,56 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
ifeq ($(DOPIC),y)
+# is this not provided by gcc ?
ASFLAGS+=-D__PIC__
endif
#FIXME -- this arch should include its own crti.S and crtn.S
UCLIBC_CTOR_DTOR=n
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=__longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=ptrace.c brk.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := ptrace.c brk.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/i386/Makefile b/libc/sysdeps/linux/i386/Makefile
index e1795e0e5..ea61b8f3a 100644
--- a/libc/sysdeps/linux/i386/Makefile
+++ b/libc/sysdeps/linux/i386/Makefile
@@ -19,66 +19,54 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-SCRT_OBJ = $(patsubst %,S%, $(CRT_OBJ))
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+SCRT_OBJ := Scrt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=__longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \
+SSRC := __longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \
bsd-_setjmp.S syscall.S mmap.S mmap64.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=brk.c sigaction.c __syscall_error.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := brk.c sigaction.c __syscall_error.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(SCRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(SCRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/i960/Makefile b/libc/sysdeps/linux/i960/Makefile
index b4997b9db..7e6311280 100644
--- a/libc/sysdeps/linux/i960/Makefile
+++ b/libc/sysdeps/linux/i960/Makefile
@@ -22,60 +22,43 @@ include $(TOPDIR)Rules.mak
#FIXME -- this arch should include its own crti.S and crtn.S
UCLIBC_CTOR_DTOR=n
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=clone.S _mmap.S setjmp.S vfork.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := clone.S _mmap.S setjmp.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+OBJS := $(SOBJ)
-OBJS=$(SOBJS) $(COBJS)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-all: $(OBJ_LIST)
-
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-$(COBJS): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
-
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/m68k/Makefile b/libc/sysdeps/linux/m68k/Makefile
index 00ad88e6c..5173b2165 100644
--- a/libc/sysdeps/linux/m68k/Makefile
+++ b/libc/sysdeps/linux/m68k/Makefile
@@ -23,72 +23,60 @@ include $(TOPDIR)Rules.mak
ifeq ($(ARCH_HAS_MMU),y)
-CRT0_SRC = crt0.c
+CRT_SRC := crt0.c
else
-CRT0_SRC = crt0.S
+CRT_SRC := crt0.S
endif
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC= __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=ptrace.c brk.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := ptrace.c brk.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(MOBJ) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_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
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
-
headers:
-ifneq ($(strip $(HAVE_ELF)),y)
+ifneq ($(HAVE_ELF),y)
echo "Working around compiler bug in the m68k-pic-coff toolchain"
$(LN) -fs ../libc/sysdeps/linux/m68k/float.h $(TOPDIR)/include/
endif
@@ -96,6 +84,6 @@ endif
clean:
$(RM) *.o *~ core
-ifneq ($(strip $(HAVE_ELF)),y)
+ifneq ($(HAVE_ELF),y)
$(RM) $(TOPDIR)/include/float.h
endif
diff --git a/libc/sysdeps/linux/microblaze/Makefile b/libc/sysdeps/linux/microblaze/Makefile
index 01b91ef71..0c4baa9dc 100644
--- a/libc/sysdeps/linux/microblaze/Makefile
+++ b/libc/sysdeps/linux/microblaze/Makefile
@@ -23,65 +23,54 @@ include $(TOPDIR)Rules.mak
#FIXME -- this arch should include its own crti.S and crtn.S
UCLIBC_CTOR_DTOR=n
-CFLAGS+=-I..
-ASFLAGS+=-I.. -D__ASSEMBLER -DASM_GLOBAL_DIRECTIVE=.globl
+CFLAGS += -I..
+ASFLAGS += -I.. -D__ASSEMBLER -DASM_GLOBAL_DIRECTIVE=.globl
TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC = setjmp.S __longjmp.S vfork.S
-SOBJS = $(patsubst %.S,%.o, $(SSRC))
+SSRC := setjmp.S __longjmp.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC = mmap.c syscall.c clone.c
-COBJS = $(patsubst %.c,%.o, $(CSRC))
+CSRC := mmap.c syscall.c clone.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS = $(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/mips/Makefile b/libc/sysdeps/linux/mips/Makefile
index 3fe6b54a1..a08bfa9f6 100644
--- a/libc/sysdeps/linux/mips/Makefile
+++ b/libc/sysdeps/linux/mips/Makefile
@@ -19,66 +19,54 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-SCRT_OBJ = $(patsubst %,S%, $(CRT_OBJ))
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+SCRT_OBJ := Scrt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S syscall.S pipe.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S syscall.S pipe.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=__longjmp.c brk.c setjmp_aux.c mmap.c __syscall_error.c \
+CSRC := __longjmp.c brk.c setjmp_aux.c mmap.c __syscall_error.c \
cacheflush.c pread_write.c sysmips.c _test_and_set.c sigaction.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(SCRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(SCRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/nios/Makefile b/libc/sysdeps/linux/nios/Makefile
index b2b622329..b1c558fee 100644
--- a/libc/sysdeps/linux/nios/Makefile
+++ b/libc/sysdeps/linux/nios/Makefile
@@ -19,61 +19,35 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
-SSRC= __longjmp.S bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S vfork.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC= brk.c crtbegin.c crtend.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := brk.c crtbegin.c crtend.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(MOBJ) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
all: $(OBJ_LIST)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -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) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
-
-$(TOPDIR)lib/crtn.o: crtn.o
- $(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
-else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
-endif
headers:
$(LN) -fs ../libc/sysdeps/linux/nios/fpu_control.h $(TOPDIR)/include/
diff --git a/libc/sysdeps/linux/nios2/Makefile b/libc/sysdeps/linux/nios2/Makefile
index 0292328f4..4202eb611 100644
--- a/libc/sysdeps/linux/nios2/Makefile
+++ b/libc/sysdeps/linux/nios2/Makefile
@@ -19,60 +19,49 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC= __longjmp.S bsd-_setjmp.S bsd-setjmp.S setjmp.S vfork.S clone.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S setjmp.S vfork.S clone.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC= brk.c syscall.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := brk.c syscall.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(MOBJ) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/powerpc/Makefile b/libc/sysdeps/linux/powerpc/Makefile
index e0d5dcdd2..2a1f9cf89 100644
--- a/libc/sysdeps/linux/powerpc/Makefile
+++ b/libc/sysdeps/linux/powerpc/Makefile
@@ -19,67 +19,54 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-SCRT_OBJ = $(patsubst %,S%, $(CRT_OBJ))
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+SCRT_OBJ := Scrt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=__longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
+SSRC := __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
clone.S __uClibc_syscall.S syscall.S vfork.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=mmap.c __syscall_error.c pread_write.c ioctl.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := mmap.c __syscall_error.c pread_write.c ioctl.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(SCRT_OBJ) $(TOPDIR)lib/
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(SCRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
-
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/sh/Makefile b/libc/sysdeps/linux/sh/Makefile
index d986850ba..00ccb06af 100644
--- a/libc/sysdeps/linux/sh/Makefile
+++ b/libc/sysdeps/linux/sh/Makefile
@@ -20,65 +20,53 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-SCRT_OBJ = $(patsubst %,S%, $(CRT_OBJ))
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+SCRT_OBJ := Scrt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=setjmp.S __longjmp.S vfork.S clone.S ___fpscr_values.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := setjmp.S __longjmp.S vfork.S clone.S ___fpscr_values.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=mmap.c longjmp.c pipe.c __init_brk.c brk.c sbrk.c syscall.c pread_write.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := mmap.c longjmp.c pipe.c __init_brk.c brk.c sbrk.c syscall.c pread_write.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(SCRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(SCRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/sh64/Makefile b/libc/sysdeps/linux/sh64/Makefile
index af49f5f1c..94486deee 100644
--- a/libc/sysdeps/linux/sh64/Makefile
+++ b/libc/sysdeps/linux/sh64/Makefile
@@ -21,64 +21,53 @@ TOPDIR=../../../../
include $(TOPDIR)Rules.mak
CFLAGS += -I..
-ASFLAGS+=-I.. -D__ASSEMBLER__ -DASM_GLOBAL_DIRECTIVE=.globl
+ASFLAGS += -I.. -D__ASSEMBLER__ -DASM_GLOBAL_DIRECTIVE=.globl
TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC = setjmp.S longjmp.S
-SOBJS = $(patsubst %.S,%.o, $(SSRC))
+SSRC := setjmp.S longjmp.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC = __init_brk.c brk.c sbrk.c syscall.c
-COBJS = $(patsubst %.c,%.o, $(CSRC))
+CSRC := __init_brk.c brk.c sbrk.c syscall.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS = $(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/sparc/Makefile b/libc/sysdeps/linux/sparc/Makefile
index de2fe0a4e..579140f08 100644
--- a/libc/sysdeps/linux/sparc/Makefile
+++ b/libc/sysdeps/linux/sparc/Makefile
@@ -19,61 +19,53 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=__longjmp.S fork.S vfork.S clone.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
+SSRC := __longjmp.S fork.S vfork.S clone.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
urem.S udiv.S umul.S sdiv.S rem.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=brk.c __syscall_error.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := brk.c __syscall_error.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(MOBJ) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
crtn.o: crtn.S
$(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/v850/Makefile b/libc/sysdeps/linux/v850/Makefile
index d20bc89c6..2d54cc2e8 100644
--- a/libc/sysdeps/linux/v850/Makefile
+++ b/libc/sysdeps/linux/v850/Makefile
@@ -21,64 +21,53 @@ TOPDIR=../../../../
include $(TOPDIR)Rules.mak
CFLAGS += -I..
-ASFLAGS+=-I.. -D__ASSEMBLER -DASM_GLOBAL_DIRECTIVE=.globl
+ASFLAGS += -I.. -D__ASSEMBLER -DASM_GLOBAL_DIRECTIVE=.globl
TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC = setjmp.S __longjmp.S vfork.S
-SOBJS = $(patsubst %.S,%.o, $(SSRC))
+SSRC := setjmp.S __longjmp.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC = mmap.c syscall.c clone.c
-COBJS = $(patsubst %.c,%.o, $(CSRC))
+CSRC := mmap.c syscall.c clone.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS = $(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/x86_64/Makefile b/libc/sysdeps/linux/x86_64/Makefile
index c38204e4d..9bad495a9 100644
--- a/libc/sysdeps/linux/x86_64/Makefile
+++ b/libc/sysdeps/linux/x86_64/Makefile
@@ -19,65 +19,53 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-SCRT_OBJ = $(patsubst %,S%, $(CRT_OBJ))
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+SCRT_OBJ := Scrt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=__longjmp.S vfork.S setjmp.S syscall.S bsd-setjmp.S bsd-_setjmp.S clone.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S vfork.S setjmp.S syscall.S bsd-setjmp.S bsd-_setjmp.S clone.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=brk.c sigaction.c __syscall_error.c mmap.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := brk.c sigaction.c __syscall_error.c mmap.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(SCRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(SCRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers: