--- lisp-kernel/darwinx8664/Makefile.orig	(revision 16167)
+++ lisp-kernel/darwinx8664/Makefile	(revision 16544)
@@ -51,4 +51,20 @@
 M4FLAGS = -DDARWIN -DX86 -DX8664 -DTCR_IN_GPR
 ASFLAGS = -arch x86_64 -g
+
+# In Xcode 7, the clang integrated assember complains that .stabs
+# directives are unsupported.  Work around this by using the system
+# assembler.  (Apparently, we'll have to quit using .stabs directives
+# at some point soon.)
+
+# Since Xcode 7 only runs on Yosemite and later, use OS version as a
+# heuristic to detect whether the -Q flag is available.  It seems to
+# be available as far back as Lion, but on Snow Leopard, "as" doesn't
+# know about -Q.
+
+yosemite_plus := $(shell uname -r | awk -F. '{ if ($$1 >= 14) print "t" }')
+ifeq ($(yosemite_plus),t)
+ASFLAGS += -Q
+endif
+
 CDEFINES = -DDARWIN -DX86 -DX8664 -DTCR_IN_GPR -DSVN_REVISION=$(SVN_REVISION) \
 	   -D_DARWIN_NO_64_BIT_INODE -DUSE_DTRACE
--- lisp-kernel/darwinx8632/Makefile.orig	(revision 16133)
+++ lisp-kernel/darwinx8632/Makefile	(revision 16544)
@@ -30,4 +30,20 @@
 M4FLAGS = -DDARWIN -DX86 -DX8632
 ASFLAGS = -arch i386 -g
+
+# In Xcode 7, the clang integrated assember complains that .stabs
+# directives are unsupported.  Work around this by using the system
+# assembler.  (Apparently, we'll have to quit using .stabs directives
+# at some point soon.)
+
+# Since Xcode 7 only runs on Yosemite and later, use OS version as a
+# heuristic to detect whether the -Q flag is available.  It seems to
+# be available as far back as Lion, but on Snow Leopard, "as" doesn't
+# know about -Q.
+
+yosemite_plus := $(shell uname -r | awk -F. '{ if ($$1 >= 14) print "t" }')
+ifeq ($(yosemite_plus),t)
+ASFLAGS += -Q
+endif
+
 CDEFINES = -DDARWIN -DX86 -DX8632 -DSVN_REVISION=$(SVN_REVISION) -D_DARWIN_NO_64_BIT_INODE -DUSE_DTRACE
 CDEBUG = -g
