summaryrefslogtreecommitdiff
path: root/lib/libpthread
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2013-08-12 17:15:46 +0000
committerjoerg <joerg@NetBSD.org>2013-08-12 17:15:46 +0000
commit476fb87c7494b74c30e59bdfeb800ccda6949fd3 (patch)
tree619f40b2fbc6c32dfc76b6944b715506490f485b /lib/libpthread
parent5bac017fe8b3b3beb7fde13caa6a4aa4d2fb5d98 (diff)
Some architectures can't create unwind tables without the frame pointer,
so don't use -fomit-frame-pointer on those.
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/libpthread/Makefile b/lib/libpthread/Makefile
index b80c1cc0acd..a63b9efdc37 100644
--- a/lib/libpthread/Makefile
+++ b/lib/libpthread/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.80 2013/03/21 16:49:11 christos Exp $
+# $NetBSD: Makefile,v 1.81 2013/08/12 17:15:46 joerg Exp $
#
WARNS?= 5
@@ -75,21 +75,28 @@ SRCS+= pthread_compat.c
ALIGN_FUNCTIONS= ${${ACTIVE_CC} == "gcc":? -falign-functions=32 :}
+.if ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "m68000" || \
+ ${MACHINE_CPU} == "sh3" || ${MACHINE_ARCH} == "vax"
+OMIT_FRAME_POINTER=
+.else
+OMIT_FRAME_POINTER= -fomit-frame-pointer
+.endif
+
# The TSD routines are used in the implementation of profiling, and so
# can't be profiled themselves.
-COPTS.pthread_specific.c+= -fomit-frame-pointer ${ALIGN_FUNCTIONS}
+COPTS.pthread_specific.c+= ${OMIT_FRAME_POINTER} ${ALIGN_FUNCTIONS}
pthread_specific.po: pthread_specific.o
${_MKTARGET_CREATE}
cp pthread_specific.o pthread_specific.po
# Internal spinlock routines are performance critical. Don't profile them,
# it's incompatibile with -fomit-frame-pointer.
-COPTS.pthread_lock.c+= -fomit-frame-pointer ${ALIGN_FUNCTIONS}
+COPTS.pthread_lock.c+= ${OMIT_FRAME_POINTER} ${ALIGN_FUNCTIONS}
pthread_lock.po: pthread_lock.o
${_MKTARGET_CREATE}
cp pthread_lock.o pthread_lock.po
-COPTS.pthread_mutex.c+= -fomit-frame-pointer ${ALIGN_FUNCTIONS}
+COPTS.pthread_mutex.c+= ${OMIT_FRAME_POINTER} ${ALIGN_FUNCTIONS}
pthread_mutex.po: pthread_mutex.o
${_MKTARGET_CREATE}
cp pthread_mutex.o pthread_mutex.po