summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO1
-rw-r--r--libc/signal/Makefile.in8
-rw-r--r--libc/sysdeps/linux/Makefile.commonarch12
-rw-r--r--libc/sysdeps/linux/alpha/Makefile.arch4
-rw-r--r--libc/sysdeps/linux/arm/Makefile.arch50
-rw-r--r--libc/sysdeps/linux/avr32/Makefile.arch4
-rw-r--r--libc/sysdeps/linux/bfin/Makefile.arch8
-rw-r--r--libc/sysdeps/linux/c6x/Makefile.arch5
-rw-r--r--libc/sysdeps/linux/common/Makefile.in4
-rw-r--r--libc/sysdeps/linux/cris/Makefile.arch8
-rw-r--r--libc/sysdeps/linux/hppa/Makefile.arch4
-rw-r--r--libc/sysdeps/linux/i386/Makefile.arch18
-rw-r--r--libc/sysdeps/linux/ia64/Makefile.arch4
-rw-r--r--libc/sysdeps/linux/m68k/Makefile.arch4
-rw-r--r--libc/sysdeps/linux/microblaze/Makefile.arch4
-rw-r--r--libc/sysdeps/linux/mips/Makefile.arch24
-rw-r--r--libc/sysdeps/linux/nios/Makefile.arch4
-rw-r--r--libc/sysdeps/linux/nios2/Makefile.arch4
-rw-r--r--libc/sysdeps/linux/powerpc/Makefile.arch9
-rw-r--r--libc/sysdeps/linux/sh/Makefile.arch13
-rw-r--r--libc/sysdeps/linux/sh64/Makefile.arch4
-rw-r--r--libc/sysdeps/linux/sparc/Makefile.arch14
-rw-r--r--libc/sysdeps/linux/vax/Makefile.arch4
-rw-r--r--libc/sysdeps/linux/x86_64/Makefile.arch22
-rw-r--r--libc/sysdeps/linux/xtensa/Makefile.arch10
25 files changed, 99 insertions, 147 deletions
diff --git a/TODO b/TODO
index 95cabd584..3e75f3d00 100644
--- a/TODO
+++ b/TODO
@@ -88,6 +88,7 @@ TODO list for the uClibc 1.0.0 release:
*) Cleanup/scrub all the Makefile copyright junk
*) Fix dlopen, for both static and dynamic cases, and make it
fully comply with SuSv3
+ *) check if sched_getcpu is only pulled in where it should be
TODO list for AFTER the uClibc 1.0.0 release:
diff --git a/libc/signal/Makefile.in b/libc/signal/Makefile.in
index c9f74ee13..6c355b5f1 100644
--- a/libc/signal/Makefile.in
+++ b/libc/signal/Makefile.in
@@ -16,12 +16,10 @@ CSRC-$(UCLIBC_HAS_OBSOLETE_BSD_SIGNAL) += \
CSRC-$(UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL) += sysv_signal.c
CSRC-$(UCLIBC_SUSV4_LEGACY) += sigintr.c sigpause.c
-ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
-CSRC-y:=$(filter-out raise.c,$(CSRC-y))
-endif
+CSRC-$(UCLIBC_HAS_THREADS_NATIVE):=$(filter-out raise.c,$(CSRC-y))
-ifneq ($(strip $(ARCH_OBJS)),)
-CSRC-y := $(filter-out $(notdir $(ARCH_OBJS:.o=.c)),$(CSRC-y))
+ifneq ($(strip $(ARCH_OBJS-y)),)
+CSRC-y := $(filter-out $(notdir $(ARCH_OBJS-y:.o=.c)),$(CSRC-y))
endif
ifneq ($(UCLIBC_HAS_BACKTRACE),)
diff --git a/libc/sysdeps/linux/Makefile.commonarch b/libc/sysdeps/linux/Makefile.commonarch
index ac89e7258..a001a44f1 100644
--- a/libc/sysdeps/linux/Makefile.commonarch
+++ b/libc/sysdeps/linux/Makefile.commonarch
@@ -8,15 +8,15 @@
ARCH_DIR := $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)
ARCH_OUT := $(top_builddir)libc/sysdeps/linux/$(TARGET_ARCH)
-ARCH_CSRC := $(patsubst %.c,$(ARCH_DIR)/%.c,$(CSRC))
-ARCH_COBJ := $(patsubst %.c,$(ARCH_OUT)/%.o,$(CSRC))
-ARCH_SSRC = $(patsubst %.s,$(ARCH_DIR)/%.s,$(patsubst %.S,$(ARCH_DIR)/%.S,$(SSRC)))
-ARCH_SOBJ = $(patsubst %.s,$(ARCH_OUT)/%.o,$(patsubst %.S,$(ARCH_OUT)/%.o,$(SSRC)))
+ARCH_CSRC := $(addprefix $(ARCH_DIR)/,$(CSRC-y))
+ARCH_COBJ := $(addprefix $(ARCH_OUT)/,$(CSRC-y:.c=.o))
+ARCH_SSRC = $(addprefix $(ARCH_DIR)/,$(SSRC-y))
+ARCH_SOBJ = $(patsubst %.s,%.o,$(patsubst %.S,%.o,$(addprefix $(ARCH_OUT)/,$(SSRC-y))))
-ARCH_OBJS = $(ARCH_COBJ) $(ARCH_SOBJ)
+ARCH_OBJS-y = $(ARCH_COBJ) $(ARCH_SOBJ)
crt-y := FORCE
-libc-y += $(ARCH_OBJS)
+libc-y += $(ARCH_OBJS-y)
libc-nomulti-y += $(ARCH_SOBJ)
objclean-y += CLEAN_$(subst $(top_builddir),,$(ARCH_OUT))
diff --git a/libc/sysdeps/linux/alpha/Makefile.arch b/libc/sysdeps/linux/alpha/Makefile.arch
index d9defc30d..c87f3cac6 100644
--- a/libc/sysdeps/linux/alpha/Makefile.arch
+++ b/libc/sysdeps/linux/alpha/Makefile.arch
@@ -5,9 +5,9 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := __syscall_error.c sigprocmask.c
+CSRC-y := __syscall_error.c sigprocmask.c
-SSRC := \
+SSRC-y := \
__longjmp.S brk.S bsd-_setjmp.S bsd-setjmp.S clone.S \
divl.S divq.S pipe.S reml.S remq.S __syscall_rt_sigaction.S setjmp.S \
syscall.S
diff --git a/libc/sysdeps/linux/arm/Makefile.arch b/libc/sysdeps/linux/arm/Makefile.arch
index 36d988bfd..3b6c168c8 100644
--- a/libc/sysdeps/linux/arm/Makefile.arch
+++ b/libc/sysdeps/linux/arm/Makefile.arch
@@ -5,46 +5,40 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c ioperm.c iopl.c __syscall_error.c sigaction.c
+CSRC-y := brk.c ioperm.c iopl.c __syscall_error.c sigaction.c
-SSRC := \
+SSRC-y := \
__longjmp.S setjmp.S bsd-setjmp.S \
bsd-_setjmp.S sigrestorer.S mmap64.S \
vfork.S clone.S
-ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
-SSRC += libc-aeabi_read_tp.S libc-thumb_atomics.S
-endif
-
-ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
-CSRC += posix_fadvise.c
-endif
+SSRC-$(UCLIBC_HAS_THREADS_NATIVE) += libc-aeabi_read_tp.S libc-thumb_atomics.S
+CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise.c
+CSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.c
+SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += getcontext.S setcontext.S swapcontext.S
# Is our compiler set up for EABI ?
CC_IS_EABI_CHECK = $(filter-out -include libc-symbols.h,$(CC) $(CFLAGS))
$(eval $(call cache-output-var,IS_EABI,$(CC_IS_EABI_CHECK) -x c - -E -dM </dev/null 2>/dev/null | grep __ARM_EABI__ 2>&1 >/dev/null && echo 'y'))
-ifeq ($(IS_EABI),y)
-CSRC += aeabi_assert.c aeabi_atexit.c aeabi_errno_addr.c \
+CSRC-$(IS_EABI) += aeabi_assert.c aeabi_atexit.c aeabi_errno_addr.c \
aeabi_localeconv.c aeabi_memclr.c aeabi_memcpy.c \
aeabi_memmove.c aeabi_memset.c find_exidx.c
-SSRC += syscall-eabi.S
-ARCH_OBJ_FILTEROUT := syscall.c
-ifeq ($(UCLIBC_HAS_WCHAR),y)
-CSRC += aeabi_mb_cur_max.c
-endif
-else
-CSRC += syscall.c
-endif
-
+SSRC-$(IS_EABI) += syscall-eabi.S
+CSRC-$(if $(IS_EABI),,y)) += syscall.c
+ARCH_OBJ_FILTEROUT-$(IS_EABI) := syscall.c
ifeq ($(IS_EABI),y)
-libc-static-y += $(ARCH_OUT)/aeabi_lcsts.o $(ARCH_OUT)/aeabi_math.o \
- $(ARCH_OUT)/aeabi_sighandlers.o
-libc-nonshared-y += $(ARCH_OUT)/aeabi_lcsts.os $(ARCH_OUT)/aeabi_math.os \
- $(ARCH_OUT)/aeabi_sighandlers.os $(ARCH_OUT)/aeabi_unwind_cpp_pr1.o
+CSRC-$(UCLIBC_HAS_WCHAR) += aeabi_mb_cur_max.c
endif
-ifeq ($(UCLIBC_HAS_CONTEXT_FUNCS),y)
-CSRC += makecontext.c
-SSRC += getcontext.S setcontext.S swapcontext.S
-endif
+libc-static-$(IS_EABI) += $(addprefix $(ARCH_OUT)/, \
+ aeabi_lcsts.o \
+ aeabi_math.o \
+ aeabi_sighandlers.o \
+ )
+libc-nonshared-$(IS_EABI) += $(addprefix $(ARCH_OUT)/, \
+ aeabi_lcsts.os \
+ aeabi_math.os \
+ aeabi_sighandlers.os \
+ aeabi_unwind_cpp_pr1.o \
+ )
diff --git a/libc/sysdeps/linux/avr32/Makefile.arch b/libc/sysdeps/linux/avr32/Makefile.arch
index 98b85a7ce..9bc6a64d6 100644
--- a/libc/sysdeps/linux/avr32/Makefile.arch
+++ b/libc/sysdeps/linux/avr32/Makefile.arch
@@ -5,7 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c clone.c mmap.c prctl.c sigaction.c
+CSRC-y := brk.c clone.c mmap.c prctl.c sigaction.c
-SSRC := __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
+SSRC-y := __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
sigrestorer.S syscall.S vfork.S
diff --git a/libc/sysdeps/linux/bfin/Makefile.arch b/libc/sysdeps/linux/bfin/Makefile.arch
index 15ecfd81e..df76ab08a 100644
--- a/libc/sysdeps/linux/bfin/Makefile.arch
+++ b/libc/sysdeps/linux/bfin/Makefile.arch
@@ -5,13 +5,11 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := bsdsetjmp.c clone.c \
+CSRC-y := bsdsetjmp.c clone.c \
sram-alloc.c sram-free.c dma-memcpy.c
-ifeq ($(UCLIBC_LINUX_SPECIFIC),y)
-CSRC += cacheflush.c
-endif
+SSRC-y := __longjmp.S setjmp.S bsd-_setjmp.S
-SSRC := __longjmp.S setjmp.S bsd-_setjmp.S
+CSRC-$(UCLIBC_LINUX_SPECIFIC) += cacheflush.c
ARCH_HEADERS := bfin_fixed_code.h bfin_l1layout.h bfin_sram.h
diff --git a/libc/sysdeps/linux/c6x/Makefile.arch b/libc/sysdeps/linux/c6x/Makefile.arch
index 5f8aaec20..29c3b5ddf 100644
--- a/libc/sysdeps/linux/c6x/Makefile.arch
+++ b/libc/sysdeps/linux/c6x/Makefile.arch
@@ -5,7 +5,6 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c syscall.c prctl.c
-#CSRC :=
+CSRC-y := brk.c syscall.c prctl.c
-SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S _vfork.S
+SSRC-y := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S _vfork.S
diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
index 7a5fb59df..7d9a08d99 100644
--- a/libc/sysdeps/linux/common/Makefile.in
+++ b/libc/sysdeps/linux/common/Makefile.in
@@ -100,8 +100,8 @@ CSRC-y := $(filter-out $(libc_a_CSRC) $(notdir $(libpthread_libc_OBJS:.o=.c)),$(
SSRC := $(filter-out $(libc_a_SSRC) $(notdir $(libpthread_libc_OBJS:.o=.S)),$(SSRC))
# fails for some reason
-ifneq ($(strip $(ARCH_OBJS)),)
-CSRC-y := $(filter-out $(notdir $(ARCH_OBJS:.o=.c)) $(ARCH_OBJ_FILTEROUT),$(CSRC-y))
+ifneq ($(strip $(ARCH_OBJS-y)),)
+CSRC-y := $(filter-out $(notdir $(ARCH_OBJS-y:.o=.c)) $(ARCH_OBJ_FILTEROUT-y),$(CSRC-y))
endif
CFLAGS-ssp.c := $(SSP_DISABLE_FLAGS)
diff --git a/libc/sysdeps/linux/cris/Makefile.arch b/libc/sysdeps/linux/cris/Makefile.arch
index 8a682b0b6..178294215 100644
--- a/libc/sysdeps/linux/cris/Makefile.arch
+++ b/libc/sysdeps/linux/cris/Makefile.arch
@@ -5,9 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := __init_brk.c brk.c sbrk.c
+CSRC-y := __init_brk.c brk.c sbrk.c
-SSRC := setjmp.S __longjmp.S clone.S sysdep.S syscall.S vfork.S
-ifeq ($(UNIFIED_SYSCALL),y)
-SSRC += __uClibc_syscall.S
-endif
+SSRC-y := setjmp.S __longjmp.S clone.S sysdep.S syscall.S vfork.S
+SSRC-$(UNIFIED_SYSCALL) += __uClibc_syscall.S
diff --git a/libc/sysdeps/linux/hppa/Makefile.arch b/libc/sysdeps/linux/hppa/Makefile.arch
index f155cc8f3..621a5b314 100644
--- a/libc/sysdeps/linux/hppa/Makefile.arch
+++ b/libc/sysdeps/linux/hppa/Makefile.arch
@@ -5,7 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := __syscall_error.c brk.c syscall.c
+CSRC-y := __syscall_error.c brk.c syscall.c
-SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S \
+SSRC-y := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S \
add_n.s lshift.s rshift.s sub_n.s udiv_qrnnd.s
diff --git a/libc/sysdeps/linux/i386/Makefile.arch b/libc/sysdeps/linux/i386/Makefile.arch
index e7fd28eea..e1739e193 100644
--- a/libc/sysdeps/linux/i386/Makefile.arch
+++ b/libc/sysdeps/linux/i386/Makefile.arch
@@ -5,20 +5,12 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c __syscall_error.c sigaction.c
+CSRC-y := brk.c __syscall_error.c sigaction.c
-SSRC := \
+SSRC-y := \
__longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
sync_file_range.S syscall.S mmap.S mmap64.S
-ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
-SSRC += posix_fadvise64.S
-endif
-
-ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
-SSRC += vfork.S clone.S
-endif
-
-ifeq ($(UCLIBC_HAS_CONTEXT_FUNCS),y)
-SSRC += makecontext.S setcontext.S getcontext.S swapcontext.S
-endif
+SSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.S
+SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += vfork.S clone.S
+SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.S setcontext.S getcontext.S swapcontext.S
diff --git a/libc/sysdeps/linux/ia64/Makefile.arch b/libc/sysdeps/linux/ia64/Makefile.arch
index 223f9ef7c..e95e86873 100644
--- a/libc/sysdeps/linux/ia64/Makefile.arch
+++ b/libc/sysdeps/linux/ia64/Makefile.arch
@@ -5,8 +5,8 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := __syscall_error.c
+CSRC-y := __syscall_error.c
-SSRC := \
+SSRC-y := \
__longjmp.S brk.S bsd-setjmp.S bsd-_setjmp.S clone2.S fork.S \
pipe.S setjmp.S syscall.S vfork.S
diff --git a/libc/sysdeps/linux/m68k/Makefile.arch b/libc/sysdeps/linux/m68k/Makefile.arch
index bde54c5bb..88caa116f 100644
--- a/libc/sysdeps/linux/m68k/Makefile.arch
+++ b/libc/sysdeps/linux/m68k/Makefile.arch
@@ -5,6 +5,6 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c __syscall_error.c
+CSRC-y := brk.c __syscall_error.c
-SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
+SSRC-y := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
diff --git a/libc/sysdeps/linux/microblaze/Makefile.arch b/libc/sysdeps/linux/microblaze/Makefile.arch
index 0a19f5e72..8f14fb94f 100644
--- a/libc/sysdeps/linux/microblaze/Makefile.arch
+++ b/libc/sysdeps/linux/microblaze/Makefile.arch
@@ -5,8 +5,8 @@
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-CSRC := clone.c fixdfsi.c
+CSRC-y := clone.c fixdfsi.c
-SSRC := setjmp.S __longjmp.S vfork.S
+SSRC-y := setjmp.S __longjmp.S vfork.S
ARCH_HEADERS := floatlib.h
diff --git a/libc/sysdeps/linux/mips/Makefile.arch b/libc/sysdeps/linux/mips/Makefile.arch
index 00b933149..00e32695d 100644
--- a/libc/sysdeps/linux/mips/Makefile.arch
+++ b/libc/sysdeps/linux/mips/Makefile.arch
@@ -5,29 +5,19 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := \
+CSRC-y := \
__longjmp.c brk.c setjmp_aux.c \
pread_write.c sigaction.c _test_and_set.c
-ifeq ($(UCLIBC_LINUX_SPECIFIC),y)
-CSRC += cacheflush.c readahead.c sysmips.c
-endif
+SSRC-y := bsd-_setjmp.S bsd-setjmp.S setjmp.S syscall.S pipe.S syscall_error.S
-SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S syscall.S pipe.S syscall_error.S
-
-ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
-CSRC += posix_fadvise.c posix_fadvise64.c
-endif
-
-ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
-SSRC += vfork.S clone.S
-endif
+CSRC-$(UCLIBC_LINUX_SPECIFIC) += cacheflush.c readahead.c sysmips.c
+CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise.c posix_fadvise64.c
+SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += vfork.S clone.S
+SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.S setcontext.S getcontext.S \
+ swapcontext.S
ASFLAGS-syscall_error.S += -D_LIBC_REENTRANT
ARCH_HEADERS := sgidefs.h
# regdef.h
-
-ifeq ($(UCLIBC_HAS_CONTEXT_FUNCS),y)
-SSRC += makecontext.S setcontext.S getcontext.S swapcontext.S
-endif
diff --git a/libc/sysdeps/linux/nios/Makefile.arch b/libc/sysdeps/linux/nios/Makefile.arch
index 6a2c3235b..75f40796e 100644
--- a/libc/sysdeps/linux/nios/Makefile.arch
+++ b/libc/sysdeps/linux/nios/Makefile.arch
@@ -5,8 +5,8 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c crtbegin.c crtend.c
+CSRC-y := brk.c crtbegin.c crtend.c
-SSRC := \
+SSRC-y := \
__longjmp.S bsd-_setjmp.S bsd-setjmp.S setjmp.S \
clone.S vfork.S
diff --git a/libc/sysdeps/linux/nios2/Makefile.arch b/libc/sysdeps/linux/nios2/Makefile.arch
index a0c485aae..e36e06b52 100644
--- a/libc/sysdeps/linux/nios2/Makefile.arch
+++ b/libc/sysdeps/linux/nios2/Makefile.arch
@@ -5,8 +5,8 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c syscall.c
+CSRC-y := brk.c syscall.c
-SSRC := \
+SSRC-y := \
__longjmp.S bsd-_setjmp.S bsd-setjmp.S setjmp.S \
vfork.S clone.S
diff --git a/libc/sysdeps/linux/powerpc/Makefile.arch b/libc/sysdeps/linux/powerpc/Makefile.arch
index 62dbe3b64..7830ce3a9 100644
--- a/libc/sysdeps/linux/powerpc/Makefile.arch
+++ b/libc/sysdeps/linux/powerpc/Makefile.arch
@@ -5,14 +5,13 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := __syscall_error.c pread_write.c ioctl.c
+CSRC-y := __syscall_error.c pread_write.c ioctl.c
-SSRC := \
+SSRC-y := \
__longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
__uClibc_syscall.S syscall.S
-ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
-SSRC += clone.S vfork.S
-endif
+
+SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += clone.S vfork.S
ifeq ($(CONFIG_E500),y)
ARCH_HEADERS := fenv.h
diff --git a/libc/sysdeps/linux/sh/Makefile.arch b/libc/sysdeps/linux/sh/Makefile.arch
index 3ec8cbd3f..99a77213b 100644
--- a/libc/sysdeps/linux/sh/Makefile.arch
+++ b/libc/sysdeps/linux/sh/Makefile.arch
@@ -6,15 +6,10 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := \
+CSRC-y := \
pipe.c __init_brk.c brk.c sbrk.c pread_write.c
-ifeq ($(UCLIBC_LINUX_SPECIFIC),y)
-CSRC += cacheflush.c
-endif
+SSRC-y := setjmp.S __longjmp.S ___fpscr_values.S
-SSRC := setjmp.S __longjmp.S ___fpscr_values.S
-
-ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
-SSRC += clone.S vfork.S
-endif
+CSRC-$(UCLIBC_LINUX_SPECIFIC) += cacheflush.c
+SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += clone.S vfork.S
diff --git a/libc/sysdeps/linux/sh64/Makefile.arch b/libc/sysdeps/linux/sh64/Makefile.arch
index 4e12532bc..02fcd0b18 100644
--- a/libc/sysdeps/linux/sh64/Makefile.arch
+++ b/libc/sysdeps/linux/sh64/Makefile.arch
@@ -5,6 +5,6 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := __init_brk.c brk.c sbrk.c syscall.c
+CSRC-y := __init_brk.c brk.c sbrk.c syscall.c
-SSRC := setjmp.S __longjmp.S
+SSRC-y := setjmp.S __longjmp.S
diff --git a/libc/sysdeps/linux/sparc/Makefile.arch b/libc/sysdeps/linux/sparc/Makefile.arch
index aa587563e..0173effbf 100644
--- a/libc/sysdeps/linux/sparc/Makefile.arch
+++ b/libc/sysdeps/linux/sparc/Makefile.arch
@@ -5,25 +5,23 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c __syscall_error.c sigaction.c
+CSRC-y := brk.c __syscall_error.c sigaction.c
-SSRC := \
+SSRC-y := \
__longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
syscall.S urem.S udiv.S umul.S sdiv.S rem.S pipe.S
-ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
-SSRC += fork.S vfork.S clone.S
-endif
+SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += fork.S vfork.S clone.S
# check weather __LONG_DOUBLE_128__ is defined (long double support)
UCLIBC_SPARC_HAS_LONG_DOUBLE=$(shell if [ "x`$(CC) -E -dM -xc /dev/null 2>&1 | grep __LONG_DOUBLE_128__`" != "x" ]; then echo "y"; fi)
ifeq ($(UCLIBC_SPARC_HAS_LONG_DOUBLE),y)
-CSRC += $(foreach f, \
+CSRC-y += $(addprefix soft-fp/, \
q_div.c q_fle.c q_mul.c q_qtoll.c q_stoq.c \
mp_clz_tab.c q_dtoq.c q_flt.c q_neg.c q_qtos.c q_sub.c \
q_add.c q_feq.c q_fne.c q_qtod.c q_qtou.c q_ulltoq.c \
q_cmp.c q_fge.c q_itoq.c q_qtoull.c q_util.c \
- q_cmpe.c q_fgt.c q_lltoq.c q_qtoi.c q_sqrt.c q_utoq.c, soft-fp/$(f))
+ q_cmpe.c q_fgt.c q_lltoq.c q_qtoi.c q_sqrt.c q_utoq.c)
else
-CSRC += qp_ops.c
+CSRC-y += qp_ops.c
endif
diff --git a/libc/sysdeps/linux/vax/Makefile.arch b/libc/sysdeps/linux/vax/Makefile.arch
index 4f805a8b3..04ed10174 100644
--- a/libc/sysdeps/linux/vax/Makefile.arch
+++ b/libc/sysdeps/linux/vax/Makefile.arch
@@ -6,5 +6,5 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c
-SSRC := __longjmp.S setjmp.S _setjmp.S clone.S
+CSRC-y := brk.c
+SSRC-y := __longjmp.S setjmp.S _setjmp.S clone.S
diff --git a/libc/sysdeps/linux/x86_64/Makefile.arch b/libc/sysdeps/linux/x86_64/Makefile.arch
index 93b825911..2bc838f0e 100644
--- a/libc/sysdeps/linux/x86_64/Makefile.arch
+++ b/libc/sysdeps/linux/x86_64/Makefile.arch
@@ -5,23 +5,15 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c __syscall_error.c sigaction.c
+CSRC-y := brk.c __syscall_error.c sigaction.c
-SSRC := \
+SSRC-y := \
__longjmp.S setjmp.S syscall.S bsd-setjmp.S bsd-_setjmp.S
-ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
-SSRC += vfork.S clone.S
-endif
-
+SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += vfork.S clone.S
+ARCH_OBJ_FILTEROUT-$(UCLIBC_LINUX_SPECIFIC) := sched_getcpu.c
ifeq ($(UCLIBC_LINUX_SPECIFIC),y)
-ARCH_OBJ_FILTEROUT = sched_getcpu.c
-ifeq ($(UCLIBC_HAS_TLS),y)
-SSRC += sched_getcpu.S
-endif
-endif
-
-ifeq ($(UCLIBC_HAS_CONTEXT_FUNCS),y)
-CSRC += makecontext.c
-SSRC += setcontext.S getcontext.S swapcontext.S __start_context.S
+SSRC-$(UCLIBC_HAS_TLS) += sched_getcpu.S
endif
+CSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.c
+SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += setcontext.S getcontext.S swapcontext.S __start_context.S
diff --git a/libc/sysdeps/linux/xtensa/Makefile.arch b/libc/sysdeps/linux/xtensa/Makefile.arch
index 13387f2ff..0aaa26bc1 100644
--- a/libc/sysdeps/linux/xtensa/Makefile.arch
+++ b/libc/sysdeps/linux/xtensa/Makefile.arch
@@ -5,11 +5,9 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c fork.c pread_write.c sigaction.c __syscall_error.c
+CSRC-y := brk.c fork.c pread_write.c sigaction.c __syscall_error.c
-ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
- CSRC += posix_fadvise.c
-endif
-
-SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S \
+SSRC-y := bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S \
sigrestorer.S syscall.S mmap.S windowspill.S __longjmp.S vfork.S
+
+CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise.c