From 143b7505a2cc505e94bde9b82cad4f695d15433d Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 10 Sep 2014 22:18:55 +0200 Subject: nptl: rephrase *.sym handling Avoids circular dependency warning from make by generating the .h directly from the .sym files, elimination intermediate files. Signed-off-by: Bernhard Reutner-Fischer --- libpthread/nptl/Makefile.in | 20 +++++---------- libpthread/nptl/sysdeps/Makefile.commonarch | 18 ++++++-------- .../sysdeps/unix/sysv/linux/Makefile.commonarch | 29 ++++++---------------- 3 files changed, 20 insertions(+), 47 deletions(-) diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in index 000882289..c619f982c 100644 --- a/libpthread/nptl/Makefile.in +++ b/libpthread/nptl/Makefile.in @@ -92,19 +92,12 @@ $(top_builddir)lib/libpthread.a: $(libpthread-a-y) $(Q)$(RM) $@ $(do_ar) -# -# Create 'pthread-errnos.h' header file. -# -CFLAGS-gen_pthread-errnos.c = -S - -$(libpthread_OUT)/gen_pthread-errnos.c: $(libpthread_DIR)/pthread-errnos.sym | $(libpthread_OUT) - $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ - -$(libpthread_OUT)/gen_pthread-errnos.s: $(libpthread_OUT)/gen_pthread-errnos.c | headers - $(compile.c) -libpthread-generated-y += $(libpthread_OUT)/gen_pthread-errnos.s -$(libpthread_OUT)/pthread-errnos.h: $(libpthread_OUT)/gen_pthread-errnos.s - $(do_sed) $(PTHREAD_GENERATE_MANGLE) $< > $@ +$(libpthread_OUT)/pthread-errnos.h: $(top_srcdir)extra/scripts/gen-as-const.awk | headers +$(libpthread_OUT)/pthread-errnos.h: $(libpthread_DIR)/pthread-errnos.sym + @$(disp_gen) + $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< \ + | $(CC) $(CFLAGS) -x c - -S -o - \ + | $(SED) $(PTHREAD_GENERATE_MANGLE) > $@ @if test ! -s $@ ; then rm -f $@ ; false ; fi pregen-headers-$(UCLIBC_HAS_THREADS_NATIVE) += $(libpthread_OUT)/pthread-errnos.h @@ -132,7 +125,6 @@ headers_clean-y += HEADERCLEAN_libpthread/nptl HEADERCLEAN_libpthread/nptl: $(do_rm) $(nptl_headers_bootstrap) \ - $(addprefix $(libpthread_OUT)/gen_pthread-errnos., c s) \ $(libpthread_OUT)/pthread-errnos.h CLEAN_libpthread/nptl: diff --git a/libpthread/nptl/sysdeps/Makefile.commonarch b/libpthread/nptl/sysdeps/Makefile.commonarch index 8f5d61dcd..a5952a67b 100644 --- a/libpthread/nptl/sysdeps/Makefile.commonarch +++ b/libpthread/nptl/sysdeps/Makefile.commonarch @@ -40,15 +40,12 @@ librt_arch_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(librt_arch_CSRC)) librt_arch_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(librt_arch_SSRC)) librt_arch_OBJS = $(librt_arch_COBJ) $(librt_arch_SOBJ) -CFLAGS-gen_tcb-offsets.c = -S -$(libpthread_arch_OUT)/gen_tcb-offsets.c: $(libpthread_arch_DIR)/tcb-offsets.sym | $(libpthread_arch_OUT) - $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ - -$(libpthread_arch_OUT)/gen_tcb-offsets.s: $(libpthread_arch_OUT)/gen_tcb-offsets.c | headers - $(compile.c) -libpthread-generated-y += $(libpthread_arch_OUT)/gen_tcb-offsets.s -$(libpthread_arch_OUT)/tcb-offsets.h: $(libpthread_arch_OUT)/gen_tcb-offsets.s - $(do_sed) $(PTHREAD_GENERATE_MANGLE) $< > $@ +$(libpthread_arch_OUT)/tcb-offsets.h: $(top_srcdir)extra/scripts/gen-as-const.awk | headers +$(libpthread_arch_OUT)/tcb-offsets.h: $(libpthread_arch_DIR)/tcb-offsets.sym + @$(disp_gen) + $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< \ + | $(CC) $(CFLAGS) -x c - -S -o - \ + | $(SED) $(PTHREAD_GENERATE_MANGLE) > $@ @if test ! -s $@ ; then rm -f $@ ; false ; fi pregen-headers-$(UCLIBC_HAS_THREADS_NATIVE) += $(libpthread_arch_OUT)/tcb-offsets.h @@ -59,8 +56,7 @@ headers_clean-y+= HEADERCLEAN_$(subst $(top_builddir),,$(libpthread_arch_OUT)) CLEAN_$(subst $(top_builddir),,$(libpthread_arch_OUT)): $(do_rm) $(addprefix $(libpthread_arch_OUT)/*., o os oS) HEADERCLEAN_$(subst $(top_builddir),,$(libpthread_arch_OUT)): - $(do_rm) $(libpthread_arch_OUT)/tcb-offsets.h \ - $(addprefix $(libpthread_arch_OUT)/gen_tcb-offsets., c h s) + $(do_rm) $(libpthread_arch_OUT)/tcb-offsets.h ifneq ($(TARGET_SUBARCH),) objclean-y += CLEAN_$(subst $(top_builddir),,$(libpthread_subarch_OUT)) CLEAN_$(subst $(top_builddir),,$(libpthread_subarch_OUT)): diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch index 337221432..a63e3fd66 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch @@ -166,29 +166,15 @@ CFLAGS-OMIT-timer_settime.c = -DIS_IN_libpthread #ASFLAGS-write.S = -D_LIBC_REENTRANT #ASFLAGS-waitpid.S = -D_LIBC_REENTRANT -# -# Create header files. -# -CFLAGS-gen_lowlevelbarrier.c = -S -CFLAGS-gen_lowlevelcond.c = -S -CFLAGS-gen_lowlevelrobustlock.c = -S -CFLAGS-gen_lowlevelrwlock.c = -S -CFLAGS-gen_pthread-pi-defines.c = -S -CFLAGS-gen_structsem.c = -S -CFLAGS-gen_unwindbuf.c = -S - PTHREAD_LINUX_SYM := $(notdir $(wildcard $(libpthread_linux_DIR)/*.sym)) -PTHREAD_LINUX_SYM_C := $(addprefix $(libpthread_linux_OUT)/gen_,$(PTHREAD_LINUX_SYM:.sym=.c)) -PTHREAD_LINUX_SYM_S := $(PTHREAD_LINUX_SYM_C:.c=.s) PTHREAD_LINUX_SYM_H := $(addprefix $(libpthread_linux_OUT)/,$(PTHREAD_LINUX_SYM:.sym=.h)) -$(PTHREAD_LINUX_SYM_C): $(libpthread_linux_OUT)/gen_%.c: $(libpthread_linux_DIR)/%.sym | $(libpthread_linux_OUT) - $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ -$(PTHREAD_LINUX_SYM_S): $(libpthread_linux_OUT)/gen_%.s: $(libpthread_linux_OUT)/gen_%.c | headers - $(compile.c) -libpthread-generated-y += $(PTHREAD_LINUX_SYM_S) -$(PTHREAD_LINUX_SYM_H): $(libpthread_linux_OUT)/%.h: $(libpthread_linux_OUT)/gen_%.s - $(do_sed) $(PTHREAD_GENERATE_MANGLE) $< > $@ +$(PTHREAD_LINUX_SYM_H): $(top_srcdir)extra/scripts/gen-as-const.awk | headers +$(PTHREAD_LINUX_SYM_H): $(libpthread_linux_OUT)/%.h: $(libpthread_linux_DIR)/%.sym + @$(disp_gen) + $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< \ + | $(CC) $(CFLAGS) -x c - -S -o - \ + | $(SED) $(PTHREAD_GENERATE_MANGLE) > $@ @if test ! -s $@ ; then rm -f $@ ; false ; fi pregen-headers-$(UCLIBC_HAS_THREADS_NATIVE) += $(PTHREAD_LINUX_SYM_H) @@ -200,8 +186,7 @@ $(ALL_HEADERS_BITS_PTHREAD): $(top_builddir)include/bits/%: | $(top_builddir)inc $(do_ln) $(call rel_srcdir)$(libpthread_linux_DIR)/bits/$(@F) $@ HEADERCLEAN_libpthread/nptl/sysdeps/unix/sysv/linux: - $(do_rm) $(PTHREAD_LINUX_SYM_C) $(PTHREAD_LINUX_SYM_S) \ - $(PTHREAD_LINUX_SYM_H) + $(do_rm) $(PTHREAD_LINUX_SYM_H) CLEAN_libpthread/nptl/sysdeps/unix/sysv/linux: $(do_rm) $(addprefix $(libpthread_linux_OUT)/*., o os oS) -- cgit v1.2.3 From 41537a770b46f2376e74af58ba4885749339e81e Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 15 Sep 2014 22:13:07 +0200 Subject: buildsys: fix IS_IN_lib* define NOT_IN_libc / IS_IN_libxxx appropriately to fix pthread_once Signed-off-by: Bernhard Reutner-Fischer --- Makerules | 32 ++++++++++++++++++++-- Rules.mak | 10 +++++-- ldso/ldso/Makefile.in | 17 ++++-------- ldso/libdl/Makefile.in | 4 +-- libc/Makefile.in | 4 +-- libc/inet/Makefile.in | 2 +- libc/inet/rpc/Makefile.in | 2 +- libc/sysdeps/linux/Makefile.commonarch | 12 ++++++-- libc/sysdeps/linux/common/Makefile.in | 2 ++ libc/sysdeps/linux/x86_64/crt1.S | 4 ++- libm/Makefile.in | 2 -- libm/metag/Makefile.arch | 2 +- libm/powerpc/e500/fpu/Makefile.arch | 2 -- libpthread/linuxthreads.old/Makefile.in | 4 +-- libpthread/linuxthreads.old_db/Makefile.in | 2 +- libpthread/linuxthreads/Makefile.in | 6 +--- libpthread/linuxthreads_db/Makefile.in | 2 +- libpthread/nptl/Makefile.in | 11 ++++---- libpthread/nptl/sysdeps/metag/Makefile.arch | 2 -- libpthread/nptl/sysdeps/pthread/Makefile.in | 4 +-- .../sysdeps/unix/sysv/linux/Makefile.commonarch | 8 ------ .../sysdeps/unix/sysv/linux/i386/Makefile.arch | 13 ++++----- .../sysdeps/unix/sysv/linux/mips/Makefile.arch | 2 -- .../sysdeps/unix/sysv/linux/powerpc/Makefile.arch | 7 ++--- .../nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch | 24 ++-------------- .../sysdeps/unix/sysv/linux/sparc/Makefile.arch | 4 +-- .../sysdeps/unix/sysv/linux/x86_64/Makefile.arch | 14 +++------- libpthread/nptl_db/Makefile.in | 8 ++++-- libubacktrace/Makefile.in | 5 ---- 29 files changed, 94 insertions(+), 117 deletions(-) diff --git a/Makerules b/Makerules index 05d9548cb..85f21ea1a 100644 --- a/Makerules +++ b/Makerules @@ -26,6 +26,27 @@ $(lib-a-y): | $(top_builddir)lib endif objs: all_objs +# apply unconditional per-directory flags +define add_IS_IN_lib +ifneq ($(strip $(2)),) +__add_IS_IN_lib := $(subst $(top_builddir),,$(2)) +$$(__add_IS_IN_lib): CFLAGS-for-library-members:=$(CFLAGS-$(1)) -DIN_LIB=$(word 1,$(subst /, ,$(1))) +endif +endef +$(eval $(call add_IS_IN_lib,rtld,$(ldso-y))) +$(eval $(call add_IS_IN_lib,libc,$(libc-y) $(libc-static-y) $(libc-y:.o=.os) $(libc-shared-y) $(libc-nonshared-y))) +$(eval $(call add_IS_IN_lib,libcrypt,$(libcrypt-a-y) $(libcrypt-so-y))) +$(eval $(call add_IS_IN_lib,libdl,$(libdl-a-y) $(libdl-so-y))) +$(eval $(call add_IS_IN_lib,libintl,$(libintl-a-y) $(libintl-so-y))) +$(eval $(call add_IS_IN_lib,libm,$(libm-a-y) $(libm-so-y))) +$(eval $(call add_IS_IN_lib,libnsl,$(libnsl-a-y) $(libnsl-so-y))) +$(eval $(call add_IS_IN_lib,libpthread/$(PTNAME),$(libpthread-a-y) $(libpthread-so-y) $(libpthread-nonshared-y))) +$(eval $(call add_IS_IN_lib,libpthread/$(PTNAME)_db,$(libthread_db-a-y) $(libthread_db-so-y))) +$(eval $(call add_IS_IN_lib,libresolv,$(libresolv-a-y) $(libresolv-so-y))) +$(eval $(call add_IS_IN_lib,librt,$(librt-a-y) $(librt-so-y))) +$(eval $(call add_IS_IN_lib,libutil,$(libutil-a-y) $(libutil-so-y))) +$(eval $(call add_IS_IN_lib,libubacktrace,$(libubacktrace-a-y) $(libubacktrace-so-y))) + shared_objs = $(libc-y:.o=.os) $(libc-shared-y) $(libc-nonshared-y) \ $(libcrypt-so-y) $(libdl-so-y) \ $(libintl-so-y) $(libm-so-y) $(libnsl-so-y) \ @@ -228,14 +249,19 @@ maybe_exec = \ #collect_multi_flags = $(CFLAGS-$(notdir $(d))) $(CFLAGS-$(notdir $(patsubst %/,%,$(dir $(d))))) collect_multi_flags = $(CFLAGS-$(notdir $(patsubst %/,%,$(dir $(d))))) +#sub_srcdir = $(word 1,$(filter-out lib extra locale libpthread,$(wordlist 1,2,$(subst /, ,$(subst $(top_srcdir),,$(dir $<)))))) + CFLAGS_gen.dep = -MT $@ -MD -MP -MF $(dir $@).$(notdir $@).dep -cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) \ +cmd_compile.c = $(CC) -c $< -o $@ \ + $(filter-out $(CFLAGS-OMIT-$(notdir $<)), \ + $(CFLAGS) \ + $(CFLAGS-for-library-members) \ $(CFLAGS-$(suffix $@)) \ - $(filter-out $(CFLAGS-OMIT-$(notdir $<)),$(CFLAGS-$(notdir $( .text diff --git a/libm/Makefile.in b/libm/Makefile.in index 23a55b369..751170678 100644 --- a/libm/Makefile.in +++ b/libm/Makefile.in @@ -220,8 +220,6 @@ endif ifeq ($(UCLIBC_HAS_FPU),y) ifeq ($(DO_C99_MATH),y) ifneq ($(strip $(libm_ARCH_OBJS)),) -CFLAGS-libm/$(TARGET_ARCH)/ := $(CFLAGS-libm) -CFLAGS-libm/$(TARGET_ARCH)/$(TARGET_SUBARCH)/ := $(CFLAGS-libm) # remove generic sources, if arch specific version is present ifneq ($(strip $(libm_ARCH_SRC)),) diff --git a/libm/metag/Makefile.arch b/libm/metag/Makefile.arch index 4cc5a6b46..bcae0e27a 100644 --- a/libm/metag/Makefile.arch +++ b/libm/metag/Makefile.arch @@ -9,7 +9,7 @@ ifeq ($(UCLIBC_HAS_FENV),y) ifeq ($(CONFIG_META_2_1),y) libm_ARCH_SRC:=$(wildcard $(libm_ARCH_DIR)/*.c) libm_ARCH_OBJ:=$(patsubst $(libm_ARCH_DIR)/%.c,$(libm_ARCH_OUT)/%.o,$(libm_ARCH_SRC)) -CFLAGS-libm += -Wa,-mfpu=metac21 +CFLAGS-y-libm/metag := -Wa,-mfpu=metac21 endif endif diff --git a/libm/powerpc/e500/fpu/Makefile.arch b/libm/powerpc/e500/fpu/Makefile.arch index 1bb4f3a0f..904561e91 100644 --- a/libm/powerpc/e500/fpu/Makefile.arch +++ b/libm/powerpc/e500/fpu/Makefile.arch @@ -11,8 +11,6 @@ libm_ARCH_SRC:=$(wildcard $(libm_ARCH_fpu_DIR)/*.c) libm_ARCH_OBJ:=$(patsubst $(libm_ARCH_fpu_DIR)/%.c,$(libm_ARCH_fpu_OUT)/%.o,$(libm_ARCH_SRC)) endif -CFLAGS-libm/$(TARGET_ARCH)/$(TARGET_SUBARCH)/fpu/ := $(CFLAGS-libm) - libm_ARCH_OBJS:=$(libm_ARCH_OBJ) ifeq ($(DOPIC),y) diff --git a/libpthread/linuxthreads.old/Makefile.in b/libpthread/linuxthreads.old/Makefile.in index 48b273e7a..6be2099d2 100644 --- a/libpthread/linuxthreads.old/Makefile.in +++ b/libpthread/linuxthreads.old/Makefile.in @@ -9,9 +9,7 @@ subdirs += libpthread/linuxthreads.old CFLAGS-dir_linuxthreads.old := -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-linuxthreads.old := $(CFLAGS-dir_linuxthreads.old) $(SSP_ALL_CFLAGS) - -CFLAGS-libpthread/linuxthreads.old/sysdeps/$(TARGET_ARCH)/ := $(CFLAGS-linuxthreads.old) +CFLAGS-libpthread/linuxthreads.old := $(CFLAGS-dir_linuxthreads.old) $(SSP_ALL_CFLAGS) ifeq ($(PTHREADS_DEBUG_SUPPORT),y) LDFLAGS-libpthread.so := $(LDFLAGS_NOSTRIP) -Wl,-z,defs diff --git a/libpthread/linuxthreads.old_db/Makefile.in b/libpthread/linuxthreads.old_db/Makefile.in index 8741eab7c..cf0ceb394 100644 --- a/libpthread/linuxthreads.old_db/Makefile.in +++ b/libpthread/linuxthreads.old_db/Makefile.in @@ -8,7 +8,7 @@ subdirs += libpthread/linuxthreads.old_db # Get the thread include dependencies and shared object name -CFLAGS-linuxthreads.old_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(ABI_VERSION)\"" +CFLAGS-libpthread/linuxthreads.old_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(ABI_VERSION)\"" LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(if $(call check_ld,--warn-unresolved-symbols),-Wl$(comma)--warn-unresolved-symbols) ifeq ($(DOSTRIP),y) diff --git a/libpthread/linuxthreads/Makefile.in b/libpthread/linuxthreads/Makefile.in index 697371b08..4a499f78e 100644 --- a/libpthread/linuxthreads/Makefile.in +++ b/libpthread/linuxthreads/Makefile.in @@ -11,11 +11,7 @@ subdirs += libpthread/linuxthreads/sysdeps/unix/sysv/linux subdirs += libpthread/linuxthreads/sysdeps/pthread CFLAGS-dir_linuxthreads := -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-linuxthreads := $(CFLAGS-dir_linuxthreads) $(SSP_ALL_CFLAGS) - -CFLAGS-libpthread/linuxthreads/sysdeps/$(TARGET_ARCH)/ := $(CFLAGS-linuxthreads) -CFLAGS-libpthread/linuxthreads/sysdeps/unix/sysv/linux/ := $(CFLAGS-linuxthreads) -CFLAGS-libpthread/linuxthreads/sysdeps/pthread/ := $(CFLAGS-linuxthreads) +CFLAGS-libpthread/linuxthreads := $(CFLAGS-dir_linuxthreads) $(SSP_ALL_CFLAGS) # This stuff will not compile without at least -O1 # psm: can't handle this here, could maybe search for -O0 in CFLAGS diff --git a/libpthread/linuxthreads_db/Makefile.in b/libpthread/linuxthreads_db/Makefile.in index 060bea3a3..52cc7c838 100644 --- a/libpthread/linuxthreads_db/Makefile.in +++ b/libpthread/linuxthreads_db/Makefile.in @@ -8,7 +8,7 @@ subdirs += libpthread/linuxthreads_db # Get the thread include dependencies and shared object name -CFLAGS-linuxthreads_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(ABI_VERSION)\"" +CFLAGS-libpthread/linuxthreads_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(ABI_VERSION)\"" LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(if $(call check_ld,--warn-unresolved-symbols),-Wl$(comma)--warn-unresolved-symbols) ifeq ($(DOSTRIP),y) diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in index c619f982c..cdf07cf45 100644 --- a/libpthread/nptl/Makefile.in +++ b/libpthread/nptl/Makefile.in @@ -141,7 +141,8 @@ LDFLAGS-libpthread.so += $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so $( LIBS-libpthread.so := $(LIBS) -CFLAGS-nptl = -DNOT_IN_libc -DIS_IN_libpthread $(SSP_ALL_CFLAGS) +CFLAGS-dir_nptl := -DNOT_IN_libc -DIS_IN_libpthread +CFLAGS-libpthread/nptl := $(CFLAGS-dir_nptl) $(SSP_ALL_CFLAGS) # Since cancellation handling is in large parts handled using exceptions # we have to compile some files with exception handling enabled, some @@ -212,7 +213,7 @@ CFLAGS-pthread_barrierattr_getpshared.c = -D_GNU_SOURCE CFLAGS-pthread_barrierattr_setpshared.c = -D_GNU_SOURCE CFLAGS-sem_open.c = -D_GNU_SOURCE -CFLAGS-OMIT-alloca_cutoff.c = $(CFLAGS-nptl) -CFLAGS-OMIT-forward.c = $(CFLAGS-nptl) -CFLAGS-OMIT-libc-lowlevelock.c = $(CFLAGS-nptl) -CFLAGS-OMIT-libc-cancellation.c = $(CFLAGS-nptl) +CFLAGS-OMIT-alloca_cutoff.c = $(CFLAGS-dir_nptl) +CFLAGS-OMIT-forward.c = $(CFLAGS-dir_nptl) +CFLAGS-OMIT-libc-lowlevelock.c = $(CFLAGS-dir_nptl) +CFLAGS-OMIT-libc-cancellation.c = $(CFLAGS-dir_nptl) diff --git a/libpthread/nptl/sysdeps/metag/Makefile.arch b/libpthread/nptl/sysdeps/metag/Makefile.arch index 0a42e686a..bc19f6b22 100644 --- a/libpthread/nptl/sysdeps/metag/Makefile.arch +++ b/libpthread/nptl/sysdeps/metag/Makefile.arch @@ -12,6 +12,4 @@ ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread ASFLAGS-pthread_spin_lock.c += -D_GNU_SOURCE -CFLAGS-metag = $(SSP_ALL_CFLAGS) - libc_arch_a_CSRC := libc-tls.c diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in index add3a8e5f..84adfe0c6 100644 --- a/libpthread/nptl/sysdeps/pthread/Makefile.in +++ b/libpthread/nptl/sysdeps/pthread/Makefile.in @@ -34,7 +34,7 @@ libpthread_pthread_CSRC = \ pthread_spin_unlock.c \ pt-longjmp.c \ tpp.c -CFLAGS-pthread = $(SSP_ALL_CFLAGS) -DNOT_IN_libc -DIS_IN_libpthread + CFLAGS-pthread_barrier_wait.c = -D_GNU_SOURCE CFLAGS-pthread_spin_destroy.c = -D_GNU_SOURCE CFLAGS-pthread_spin_init.c = -D_GNU_SOURCE @@ -54,7 +54,7 @@ librt-pt-routines-y = librt-cancellation.c librt-pt-shared-only-routines-y = rt-unwind-resume.c ifeq ($(UCLIBC_CTOR_DTOR),y) -CFLAGS-OMIT-pt-initfini.c = $(CFLAGS-pthread) +CFLAGS-OMIT-pt-initfini.c = $(CFLAGS-y-libpthread/nptl/sysdeps/pthread) CFLAGS-pt-initfini.c = -S -g0 $(PICFLAG) -fno-inline-functions \ $(call check_gcc,-fno-unit-at-a-time,) \ $(SSP_DISABLE_FLAGS) \ diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch index a63e3fd66..1fa3045c7 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch @@ -134,8 +134,6 @@ ifneq ($(UCLIBC_HAS_BACKTRACE),) CFLAGS-raise.c = -fasynchronous-unwind-tables endif -CFLAGS-linux = -DNOT_IN_libc -DIS_IN_libpthread $(SSP_ALL_CFLAGS) - CFLAGS-OMIT-libc_pthread_init.c = -DNOT_IN_libc -DIS_IN_libpthread CFLAGS-OMIT-libc_multiple_threads.c = -DNOT_IN_libc -DIS_IN_libpthread CFLAGS-OMIT-register-atfork.c = -DNOT_IN_libc -DIS_IN_libpthread @@ -160,12 +158,6 @@ CFLAGS-OMIT-timer_gettime.c = -DIS_IN_libpthread CFLAGS-OMIT-timer_routines.c = -DIS_IN_libpthread CFLAGS-OMIT-timer_settime.c = -DIS_IN_libpthread -#ASFLAGS-open.S = -D_LIBC_REENTRANT -#ASFLAGS-close.S = -D_LIBC_REENTRANT -#ASFLAGS-read.S = -D_LIBC_REENTRANT -#ASFLAGS-write.S = -D_LIBC_REENTRANT -#ASFLAGS-waitpid.S = -D_LIBC_REENTRANT - PTHREAD_LINUX_SYM := $(notdir $(wildcard $(libpthread_linux_DIR)/*.sym)) PTHREAD_LINUX_SYM_H := $(addprefix $(libpthread_linux_OUT)/,$(PTHREAD_LINUX_SYM:.sym=.h)) diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch index 9a34595f1..3f5c33d0a 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch @@ -14,15 +14,12 @@ libc_linux_arch_SSRC = clone.S vfork.S ASFLAGS += -DUSE___THREAD CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT -ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT -ASFLAGS-lowlevelrobustlock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT -ASFLAGS-pthread_once.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT -ASFLAGS-pthread_spin_unlock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT +ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread +ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread +ASFLAGS-lowlevelrobustlock.S = -DNOT_IN_libc -DIS_IN_libpthread +ASFLAGS-pthread_once.S = -DNOT_IN_libc -DIS_IN_libpthread +ASFLAGS-pthread_spin_unlock.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-clone.S = -D_LIBC_REENTRANT -ASFLAGS-vfork.S = -D_LIBC_REENTRANT -ASFLAGS-libc-lowlevellock.S = -D_LIBC_REENTRANT ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__ endif diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch index fc26a8e13..afae6cd56 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch @@ -23,5 +23,3 @@ CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread CFLAGS-pt-__syscall_rt_sigaction.c = -DNOT_IN_libc -DIS_IN_libpthread ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-clone.S = -D_LIBC_REENTRANT -ASFLAGS-vfork.S = -D_LIBC_REENTRANT diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch index 8581aea6f..23c0210d5 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch @@ -19,12 +19,9 @@ ASFLAGS += -DUSE___THREAD CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT -#ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT +ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread +#ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -#ASFLAGS-libc-lowlevellock.S = -D_LIBC_REENTRANT -ASFLAGS-clone.S = -D_LIBC_REENTRANT -ASFLAGS-vfork.S = -D_LIBC_REENTRANT ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__ endif diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch index a8249e0f4..fa1a365ea 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch @@ -17,30 +17,12 @@ libc_linux_arch_SSRC = libc-lowlevellock.S clone.S vfork.S ASFLAGS += -DUSE___THREAD -ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT -ASFLAGS-pthread_once.S = -D_LIBC_REENTRANT -ASFLAGS-pthread_rwlock_wrlock.S = -D_LIBC_REENTRANT -ASFLAGS-pthread_rwlock_rdlock.S = -D_LIBC_REENTRANT -ASFLAGS-pthread_rwlock_unlock.S = -D_LIBC_REENTRANT -ASFLAGS-pthread_barrier_wait.S = -D_LIBC_REENTRANT -ASFLAGS-pthread_cond_broadcast.S = -D_LIBC_REENTRANT -ASFLAGS-pthread_cond_signal.S = -D_LIBC_REENTRANT -ASFLAGS-pthread_cond_wait.S = -D_LIBC_REENTRANT -ASFLAGS-pthread_cond_timedwait.S = -D_LIBC_REENTRANT -ASFLAGS-pthread_rwlock_timedwrlock.S = -D_LIBC_REENTRANT -ASFLAGS-pthread_rwlock_timedrdlock.S = -D_LIBC_REENTRANT -ASFLAGS-sem_post.S = -D_LIBC_REENTRANT -ASFLAGS-sem_timedwait.S = -D_LIBC_REENTRANT -ASFLAGS-sem_trywait.S = -D_LIBC_REENTRANT -ASFLAGS-sem_wait.S = -D_LIBC_REENTRANT +ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-libc-lowlevellock.S = -D_LIBC_REENTRANT -ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT -ASFLAGS-lowlevelrobustlock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT +ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread +ASFLAGS-lowlevelrobustlock.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-clone.S = -D_LIBC_REENTRANT -ASFLAGS-vfork.S = -D_LIBC_REENTRANT ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__ endif diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch index 102c0dad1..978f3c748 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch @@ -17,13 +17,11 @@ librt_linux_arch_CSRC = pt-__syscall_error.c ASFLAGS += -DUSE___THREAD -ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT +ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-clone.S = -D_LIBC_REENTRANT -ASFLAGS-vfork.S = -D_LIBC_REENTRANT ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__ endif diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch index 71df9861d..abc48e9e9 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch @@ -21,17 +21,11 @@ librt_linux_arch_SSRC = librt-cancellation.S ASFLAGS += -DUSE___THREAD CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT -ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT -ASFLAGS-pthread_once.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT -ASFLAGS-cancellation.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT -ASFLAGS-pthread_cond_timedwait.S = -D_LIBC_REENTRANT -ASFLAGS-pthread_cond_wait.S = -D_LIBC_REENTRANT +ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread +ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread +ASFLAGS-pthread_once.S = -DNOT_IN_libc -DIS_IN_libpthread +ASFLAGS-cancellation.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-clone.S = -D_LIBC_REENTRANT -ASFLAGS-vfork.S = -D_LIBC_REENTRANT -ASFLAGS-libc-lowlevellock.S = -D_LIBC_REENTRANT -ASFLAGS-libc-cancellation.S = -D_LIBC_REENTRANT ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__ endif diff --git a/libpthread/nptl_db/Makefile.in b/libpthread/nptl_db/Makefile.in index b1585299a..76102e65f 100644 --- a/libpthread/nptl_db/Makefile.in +++ b/libpthread/nptl_db/Makefile.in @@ -8,9 +8,11 @@ subdirs += libpthread/nptl_db # Get the thread include dependencies and shared object name -CFLAGS-nptl_db := -DLIBPTHREAD_SO="\"libpthread.so.$(ABI_VERSION)\"" -CFLAGS-nptl_db += -I$(top_srcdir)libpthread/nptl -D_GNU_SOURCE -CFLAGS-nptl_db += -DIS_IN_libthread_db=1 -DNOT_IN_libc -std=gnu99 -I$(top_srcdir)ldso/include +CFLAGS-libpthread/nptl_db := -DNOT_IN_libc \ + -DLIBPTHREAD_SO="\"libpthread.so.$(ABI_VERSION)\"" \ + -std=gnu99 -D_GNU_SOURCE \ + -I$(top_srcdir)libpthread/nptl \ + -I$(top_srcdir)ldso/include LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(if $(call check_ld,--warn-unresolved-symbols),-Wl$(comma)--warn-unresolved-symbols) LIBS-libthread_db.so := $(LIBS) diff --git a/libubacktrace/Makefile.in b/libubacktrace/Makefile.in index 1cd5f8385..311f1e31c 100644 --- a/libubacktrace/Makefile.in +++ b/libubacktrace/Makefile.in @@ -37,11 +37,6 @@ endif # -fasynchronous-unwind-tables is required for backtrace to work using dwarf2 CFLAGS-backtrace.c := -fasynchronous-unwind-tables -# pass common flags to arch dirs -ifneq ($(strip $(libubacktrace_ARCH_OBJS)),) -CFLAGS-libubacktrace/$(TARGET_ARCH)/ := $(CFLAGS-libubacktrace) -endif - libubacktrace_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SRC-y)) libubacktrace_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.o,$(libubacktrace_SRCS)) -- cgit v1.2.3 From cce3af55b325650f7ac50eb2e7a5f79800d60377 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 16 Sep 2014 21:36:54 +0200 Subject: libc: silence missing prototype warning Signed-off-by: Bernhard Reutner-Fischer --- libc/stdlib/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c index 8c5d25d51..3ef9a8b1c 100644 --- a/libc/stdlib/system.c +++ b/libc/stdlib/system.c @@ -18,6 +18,7 @@ #include #endif +extern __typeof(system) __libc_system; #if !defined __UCLIBC_HAS_THREADS_NATIVE__ /* uClinux-2.0 has vfork, but Linux 2.0 doesn't */ #include @@ -25,7 +26,6 @@ # define vfork fork #endif -extern __typeof(system) __libc_system; int __libc_system(const char *command) { int wait_val, pid; -- cgit v1.2.3 From 95acdd4b30d856f46e3dd908a934eaeb68c9b572 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 16 Sep 2014 22:07:12 +0200 Subject: buildsys: remove now redundant lib placement defines Signed-off-by: Bernhard Reutner-Fischer --- libpthread/nptl/sysdeps/arc/Makefile.arch | 5 --- libpthread/nptl/sysdeps/arm/Makefile.arch | 7 ---- libpthread/nptl/sysdeps/metag/Makefile.arch | 5 --- libpthread/nptl/sysdeps/mips/Makefile.arch | 8 +---- libpthread/nptl/sysdeps/sh/Makefile.arch | 3 -- .../sysdeps/unix/sysv/linux/Makefile.commonarch | 38 ++++------------------ .../nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch | 17 ---------- .../nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch | 12 ------- .../sysdeps/unix/sysv/linux/i386/Makefile.arch | 11 ------- .../sysdeps/unix/sysv/linux/metag/Makefile.arch | 13 -------- .../sysdeps/unix/sysv/linux/mips/Makefile.arch | 8 ----- .../sysdeps/unix/sysv/linux/powerpc/Makefile.arch | 9 ----- .../nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch | 9 ----- .../sysdeps/unix/sysv/linux/sparc/Makefile.arch | 10 ------ .../sysdeps/unix/sysv/linux/x86_64/Makefile.arch | 10 ------ 15 files changed, 8 insertions(+), 157 deletions(-) diff --git a/libpthread/nptl/sysdeps/arc/Makefile.arch b/libpthread/nptl/sysdeps/arc/Makefile.arch index 1c728847e..08ec7e7d9 100644 --- a/libpthread/nptl/sysdeps/arc/Makefile.arch +++ b/libpthread/nptl/sysdeps/arc/Makefile.arch @@ -5,9 +5,4 @@ # Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. # -CFLAGS-pt-raise.c = -DNOT_IN_libc -DIS_IN_libpthread - -ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread - libc_arch_a_CSRC = libc-tls.c diff --git a/libpthread/nptl/sysdeps/arm/Makefile.arch b/libpthread/nptl/sysdeps/arm/Makefile.arch index fbe497583..62a2822df 100644 --- a/libpthread/nptl/sysdeps/arm/Makefile.arch +++ b/libpthread/nptl/sysdeps/arm/Makefile.arch @@ -7,11 +7,4 @@ # librt_arch_SSRC = aeabi_read_tp.S thumb_atomics.S - -CFLAGS-pt-raise.c = -DNOT_IN_libc -DIS_IN_libpthread - -ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-aeabi_read_tp.S = -DNOT_IN_libc=1 - libc_arch_a_CSRC = libc-tls.c diff --git a/libpthread/nptl/sysdeps/metag/Makefile.arch b/libpthread/nptl/sysdeps/metag/Makefile.arch index bc19f6b22..ed5b52c5e 100644 --- a/libpthread/nptl/sysdeps/metag/Makefile.arch +++ b/libpthread/nptl/sysdeps/metag/Makefile.arch @@ -5,11 +5,6 @@ # Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. # -CFLAGS-pthread_spin_init.c = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pthread_spin_unlock.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread - ASFLAGS-pthread_spin_lock.c += -D_GNU_SOURCE libc_arch_a_CSRC := libc-tls.c diff --git a/libpthread/nptl/sysdeps/mips/Makefile.arch b/libpthread/nptl/sysdeps/mips/Makefile.arch index 2762a2fe0..10f8abf3b 100644 --- a/libpthread/nptl/sysdeps/mips/Makefile.arch +++ b/libpthread/nptl/sysdeps/mips/Makefile.arch @@ -5,13 +5,7 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -CFLAGS-pt-raise.c = -DNOT_IN_libc -DIS_IN_libpthread - -ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-nptl-sysdep.S = -DNOT_IN_libc -DIS_IN_libpthread \ - -D_LIBC_REENTRANT \ - -I$(top_srcdir)libc/sysdeps/linux/mips +ASFLAGS-nptl-sysdep.S = -I$(top_srcdir)libc/sysdeps/linux/mips libc_arch_a_CSRC = libc-tls.c diff --git a/libpthread/nptl/sysdeps/sh/Makefile.arch b/libpthread/nptl/sysdeps/sh/Makefile.arch index 411622adc..b50dd51e0 100644 --- a/libpthread/nptl/sysdeps/sh/Makefile.arch +++ b/libpthread/nptl/sysdeps/sh/Makefile.arch @@ -5,9 +5,6 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -ASFLAGS-pthread_spin_unlock.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread - CFLAGS-pthread_spin_lock.c += -D_GNU_SOURCE libc_arch_a_CSRC := libc-tls.c diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch index 1fa3045c7..e4a5fc55d 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch @@ -122,42 +122,18 @@ headers_clean-y += HEADERCLEAN_libpthread/nptl/sysdeps/unix/sysv/linux CFLAGS-pthread_getcpuclockid.c = -I$(top_srcdir)librt CFLAGS-pt-pread_pwrite.c = -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \ -I$(top_srcdir)libc/sysdeps/linux/common -CFLAGS-mq_notify.c = -I$(top_srcdir)librt -DIS_IN_librt -CFLAGS-timer_create.c = -I$(top_srcdir)librt -DIS_IN_librt -CFLAGS-timer_delete.c = -I$(top_srcdir)librt -DIS_IN_librt -CFLAGS-timer_getoverr.c = -I$(top_srcdir)librt -DIS_IN_librt -CFLAGS-timer_gettime.c = -I$(top_srcdir)librt -DIS_IN_librt -CFLAGS-timer_routines.c = -I$(top_srcdir)librt -DIS_IN_librt -CFLAGS-timer_settime.c = -I$(top_srcdir)librt -DIS_IN_librt +CFLAGS-mq_notify.c = -I$(top_srcdir)librt +CFLAGS-timer_create.c = -I$(top_srcdir)librt +CFLAGS-timer_delete.c = -I$(top_srcdir)librt +CFLAGS-timer_getoverr.c = -I$(top_srcdir)librt +CFLAGS-timer_gettime.c = -I$(top_srcdir)librt +CFLAGS-timer_routines.c = -I$(top_srcdir)librt +CFLAGS-timer_settime.c = -I$(top_srcdir)librt ifneq ($(UCLIBC_HAS_BACKTRACE),) CFLAGS-raise.c = -fasynchronous-unwind-tables endif -CFLAGS-OMIT-libc_pthread_init.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-OMIT-libc_multiple_threads.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-OMIT-register-atfork.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-OMIT-unregister-atfork.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-OMIT-getpid.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-OMIT-raise.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-OMIT-sleep.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-OMIT-jmp-unwind.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread - -#CFLAGS-OMIT-close.S = -DNOT_IN_libc -DIS_IN_libpthread -#CFLAGS-OMIT-open.S = -DNOT_IN_libc -DIS_IN_libpthread -#CFLAGS-OMIT-read.S = -DNOT_IN_libc -DIS_IN_libpthread -#CFLAGS-OMIT-write.S = -DNOT_IN_libc -DIS_IN_libpthread -#CFLAGS-OMIT-waitpid.S = -DNOT_IN_libc -DIS_IN_libpthread - -CFLAGS-OMIT-mq_notify.c = -DIS_IN_libpthread -CFLAGS-OMIT-timer_create.c = -DIS_IN_libpthread -CFLAGS-OMIT-timer_delete.c = -DIS_IN_libpthread -CFLAGS-OMIT-timer_getoverr.c = -DIS_IN_libpthread -CFLAGS-OMIT-timer_gettime.c = -DIS_IN_libpthread -CFLAGS-OMIT-timer_routines.c = -DIS_IN_libpthread -CFLAGS-OMIT-timer_settime.c = -DIS_IN_libpthread - PTHREAD_LINUX_SYM := $(notdir $(wildcard $(libpthread_linux_DIR)/*.sym)) PTHREAD_LINUX_SYM_H := $(addprefix $(libpthread_linux_OUT)/,$(PTHREAD_LINUX_SYM:.sym=.h)) diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch index 25e6fadbf..8e3c7b0bc 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch @@ -13,20 +13,3 @@ libc_linux_arch_CSRC = fork.c libc-lowlevellock.c libc_linux_arch_SSRC = clone.S vfork.S libc_linux_arch_SSRC-OMIT = waitpid.S -CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-pt-__syscall_rt_sigaction.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread - -ASFLAGS-vfork.S = -DIS_IN_libc -DNOT_IN_libpthread -ASFLAGS-clone.S = -DIS_IN_libc -DNOT_IN_libpthread - -ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) -CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__ -endif -CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread -# We always compile it in arm mode because of SAVE_PID macro -# This macro should be alternatively implemented in THUMB -# assembly. diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch index 329d8a94e..c8d5d4ab5 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch @@ -14,18 +14,6 @@ libc_linux_arch_CSRC = fork.c libc-lowlevellock.c libc_linux_arch_SSRC = clone.S vfork.S libc_linux_arch_SSRC-OMIT = waitpid.S - -CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-pt-__syscall_rt_sigaction.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -marm - -ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) -CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__ -endif -CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread # We always compile it in arm mode because of SAVE_PID macro # This macro should be alternatively implemented in THUMB # assembly. diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch index 3f5c33d0a..fff0dae89 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch @@ -13,14 +13,3 @@ libc_linux_arch_SSRC = clone.S vfork.S ASFLAGS += -DUSE___THREAD -CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-lowlevelrobustlock.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pthread_once.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pthread_spin_unlock.S = -DNOT_IN_libc -DIS_IN_libpthread - -ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) -CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__ -endif -CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch index df9887596..4d02d0c9a 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch @@ -16,16 +16,3 @@ libc_linux_arch_SSRC-OMIT = waitpid.S CFLAGS += $(SSP_ALL_CFLAGS) -CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-pt-__syscall_rt_sigaction.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-vfork.S = -DIS_IN_libc -DNOT_IN_libpthread -ASFLAGS-clone.S = -DIS_IN_libc -DNOT_IN_libpthread -ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread - -ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) -CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__ -endif -CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch index afae6cd56..4a3d0f248 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch @@ -15,11 +15,3 @@ libc_linux_arch_SSRC-OMIT = waitpid.S endif ASFLAGS += -DUSE___THREAD -CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread -ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) -CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__ -endif -CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-pt-__syscall_rt_sigaction.c = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread - diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch index 23c0210d5..21b9b7239 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch @@ -16,12 +16,3 @@ librt_linux_arch_CSRC = pt-__syscall_error.c ASFLAGS += -DUSE___THREAD -CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -#ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread - -ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) -CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__ -endif diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch index fa1a365ea..154dd6e66 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch @@ -17,12 +17,3 @@ libc_linux_arch_SSRC = libc-lowlevellock.S clone.S vfork.S ASFLAGS += -DUSE___THREAD -ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread - - -ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-lowlevelrobustlock.S = -DNOT_IN_libc -DIS_IN_libpthread - -ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) -CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__ -endif diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch index 978f3c748..2b2b5f579 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch @@ -17,13 +17,3 @@ librt_linux_arch_CSRC = pt-__syscall_error.c ASFLAGS += -DUSE___THREAD -ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread - -ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) -CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__ -endif -CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread -CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch index abc48e9e9..ebd506047 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch @@ -20,13 +20,3 @@ librt_linux_arch_SSRC = librt-cancellation.S ASFLAGS += -DUSE___THREAD -CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-pthread_once.S = -DNOT_IN_libc -DIS_IN_libpthread -ASFLAGS-cancellation.S = -DNOT_IN_libc -DIS_IN_libpthread - -ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) -CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__ -endif -CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread -- cgit v1.2.3 From 56824024e4f3fa8b5c6f696934c51fbc86946a80 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Sun, 7 Sep 2014 12:01:33 -0300 Subject: powerpc: update ptrace.h to latest from glibc Update sys/ptrace.h to latest glibc release for a lot of missing definitions. Signed-off-by: Gustavo Zacarias Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/powerpc/sys/ptrace.h | 93 ++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 2 deletions(-) diff --git a/libc/sysdeps/linux/powerpc/sys/ptrace.h b/libc/sysdeps/linux/powerpc/sys/ptrace.h index 02c303c24..dd81efc28 100644 --- a/libc/sysdeps/linux/powerpc/sys/ptrace.h +++ b/libc/sysdeps/linux/powerpc/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #define _SYS_PTRACE_H 1 #include +#include __BEGIN_DECLS @@ -78,8 +79,96 @@ enum __ptrace_request #define PT_DETACH PTRACE_DETACH /* Continue and stop at the next (return from) syscall. */ - PTRACE_SYSCALL = 24 + PTRACE_SYSCALL = 24, #define PT_SYSCALL PTRACE_SYSCALL + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + PTRACE_PEEKSIGINFO = 0x4209 +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO +}; + + +/* Flag for PTRACE_LISTEN. */ +enum __ptrace_flags +{ + PTRACE_SEIZE_DEVEL = 0x80000000 +}; + +/* Options set using PTRACE_SETOPTIONS. */ +enum __ptrace_setoptions +{ + PTRACE_O_TRACESYSGOOD = 0x00000001, + PTRACE_O_TRACEFORK = 0x00000002, + PTRACE_O_TRACEVFORK = 0x00000004, + PTRACE_O_TRACECLONE = 0x00000008, + PTRACE_O_TRACEEXEC = 0x00000010, + PTRACE_O_TRACEVFORKDONE = 0x00000020, + PTRACE_O_TRACEEXIT = 0x00000040, + PTRACE_O_TRACESECCOMP = 0x00000080, + PTRACE_O_EXITKILL = 0x00100000, + PTRACE_O_MASK = 0x001000ff +}; + +/* Wait extended result codes for the above trace options. */ +enum __ptrace_eventcodes +{ + PTRACE_EVENT_FORK = 1, + PTRACE_EVENT_VFORK = 2, + PTRACE_EVENT_CLONE = 3, + PTRACE_EVENT_EXEC = 4, + PTRACE_EVENT_VFORK_DONE = 5, + PTRACE_EVENT_EXIT = 6, + PTRACE_EVENT_SECCOMP = 7 +}; + +/* Arguments for PTRACE_PEEKSIGINFO. */ +struct __ptrace_peeksiginfo_args +{ + __uint64_t off; /* From which siginfo to start. */ + __uint32_t flags; /* Flags for peeksiginfo. */ + __int32_t nr; /* How many siginfos to take. */ +}; + +enum __ptrace_peeksiginfo_flags +{ + /* Read signals from a shared (process wide) queue. */ + PTRACE_PEEKSIGINFO_SHARED = (1 << 0) }; /* Perform process tracing functions. REQUEST is one of the values -- cgit v1.2.3 From 085465e5c507822b25daec6c0fc1a78da48bff9e Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Sun, 7 Sep 2014 12:01:34 -0300 Subject: sparc: update ptrace.h to latest from glibc Update sys/ptrace.h to latest glibc release for a lot of missing definitions. Signed-off-by: Gustavo Zacarias Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/sparc/sys/ptrace.h | 97 +++++++++++++++++++++++++++++++++-- 1 file changed, 92 insertions(+), 5 deletions(-) diff --git a/libc/sysdeps/linux/sparc/sys/ptrace.h b/libc/sysdeps/linux/sparc/sys/ptrace.h index 26fa4b38d..0f6c2ccae 100644 --- a/libc/sysdeps/linux/sparc/sys/ptrace.h +++ b/libc/sysdeps/linux/sparc/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/SPARC version. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,7 +20,7 @@ #define _SYS_PTRACE_H 1 #include - +#include #include /* Linux/SPARC kernels up to 2.3.18 do not care much @@ -147,12 +147,11 @@ enum __ptrace_request #endif /* Continue and stop at the next (return from) syscall. */ - PTRACE_SYSCALL = 24 + PTRACE_SYSCALL = 24, #define PTRACE_SYSCALL PTRACE_SYSCALL #if __WORDSIZE == 64 - , /* Get all floating point registers used by a processes. This is not supported on all machines. */ PTRACE_GETFPREGS = 25, @@ -160,10 +159,98 @@ enum __ptrace_request /* Set all floating point registers used by a processes. This is not supported on all machines. */ - PTRACE_SETFPREGS = 26 + PTRACE_SETFPREGS = 26, #define PT_SETFPREGS PTRACE_SETFPREGS #endif + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + PTRACE_PEEKSIGINFO = 0x4209 +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO +}; + + +/* Flag for PTRACE_LISTEN. */ +enum __ptrace_flags +{ + PTRACE_SEIZE_DEVEL = 0x80000000 +}; + +/* Options set using PTRACE_SETOPTIONS. */ +enum __ptrace_setoptions +{ + PTRACE_O_TRACESYSGOOD = 0x00000001, + PTRACE_O_TRACEFORK = 0x00000002, + PTRACE_O_TRACEVFORK = 0x00000004, + PTRACE_O_TRACECLONE = 0x00000008, + PTRACE_O_TRACEEXEC = 0x00000010, + PTRACE_O_TRACEVFORKDONE = 0x00000020, + PTRACE_O_TRACEEXIT = 0x00000040, + PTRACE_O_TRACESECCOMP = 0x00000080, + PTRACE_O_EXITKILL = 0x00100000, + PTRACE_O_MASK = 0x001000ff +}; + +/* Wait extended result codes for the above trace options. */ +enum __ptrace_eventcodes +{ + PTRACE_EVENT_FORK = 1, + PTRACE_EVENT_VFORK = 2, + PTRACE_EVENT_CLONE = 3, + PTRACE_EVENT_EXEC = 4, + PTRACE_EVENT_VFORK_DONE = 5, + PTRACE_EVENT_EXIT = 6, + PTRACE_EVENT_SECCOMP = 7 +}; + +/* Arguments for PTRACE_PEEKSIGINFO. */ +struct __ptrace_peeksiginfo_args +{ + __uint64_t off; /* From which siginfo to start. */ + __uint32_t flags; /* Flags for peeksiginfo. */ + __int32_t nr; /* How many siginfos to take. */ +}; + +enum __ptrace_peeksiginfo_flags +{ + /* Read signals from a shared (process wide) queue. */ + PTRACE_PEEKSIGINFO_SHARED = (1 << 0) }; /* Perform process tracing functions. REQUEST is one of the values -- cgit v1.2.3 From a9bdc5d28e692c04f51bcea1bb8e87f9c72ad09f Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 17 Sep 2014 20:45:26 +0200 Subject: m68k: libc: add fmovem* mcffpu condition add fmovem{x,.d,.*} ISA conditional Fixes assembler errors for 5206. isa_a, isa_b (or a+, don't remember) do not have emx, use em.d there. Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/m68k/__longjmp.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libc/sysdeps/linux/m68k/__longjmp.S b/libc/sysdeps/linux/m68k/__longjmp.S index 5033f02b4..a93d92bff 100644 --- a/libc/sysdeps/linux/m68k/__longjmp.S +++ b/libc/sysdeps/linux/m68k/__longjmp.S @@ -15,7 +15,9 @@ __longjmp: movel #1, %d0 1: moveml %a0@(JB_REGS), %d2-%d7/%a2-%a7 -#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__ +#if defined __mcffpu__ && defined __UCLIBC_HAS_FPU__ + fmovem %a0@(JB_FPREGS), %fp2-%fp7 +#elif defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__ fmovemx %a0@(JB_FPREGS), %fp2-%fp7 #endif movel %a0@(JB_PC), %sp@ -- cgit v1.2.3