Module Name:    src
Committed By:   joerg
Date:           Mon Aug 12 17:15:46 UTC 2013

Modified Files:
        src/lib/libpthread: Makefile
        src/libexec/ld.elf_so: Makefile

Log Message:
Some architectures can't create unwind tables without the frame pointer,
so don't use -fomit-frame-pointer on those.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/lib/libpthread/Makefile
cvs rdiff -u -r1.121 -r1.122 src/libexec/ld.elf_so/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libpthread/Makefile
diff -u src/lib/libpthread/Makefile:1.80 src/lib/libpthread/Makefile:1.81
--- src/lib/libpthread/Makefile:1.80	Thu Mar 21 16:49:11 2013
+++ src/lib/libpthread/Makefile	Mon Aug 12 17:15:46 2013
@@ -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

Index: src/libexec/ld.elf_so/Makefile
diff -u src/libexec/ld.elf_so/Makefile:1.121 src/libexec/ld.elf_so/Makefile:1.122
--- src/libexec/ld.elf_so/Makefile:1.121	Thu Jul 18 21:58:13 2013
+++ src/libexec/ld.elf_so/Makefile	Mon Aug 12 17:15:46 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.121 2013/07/18 21:58:13 matt Exp $
+#	$NetBSD: Makefile,v 1.122 2013/08/12 17:15:46 joerg Exp $
 #
 # NOTE: when changing ld.so, ensure that ldd still compiles.
 #
@@ -98,7 +98,11 @@ CPPFLAGS+=	-DCOMBRELOC
 CPPFLAGS+=	-I${NETBSDSRCDIR}/lib/libexecinfo
 .endif
 #DBG=		-g
-COPTS+=		-O3 -fomit-frame-pointer
+COPTS+=		-O3
+
+.if ${MACHINE_ARCH} != "m68k" && ${MACHINE_CPU} != "sh3" && ${MACHINE_ARCH} != "vax"
+COPTS+=		-fomit-frame-pointer
+.endif
 
 .if ${LDELFSO_MACHINE_ARCH} == "i386" || ${LDELFSO_MACHINE_ARCH} == "x86_64"
 COPTS+=		-mno-3dnow -mno-mmx -mno-sse -mno-sse2 -mno-sse3

Reply via email to