From owner-svn-src-all@FreeBSD.ORG Sun Jul 17 13:50:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BC2A106564A; Sun, 17 Jul 2011 13:50:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02D318FC18; Sun, 17 Jul 2011 13:50:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p6HDoLp1075963; Sun, 17 Jul 2011 13:50:21 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p6HDoLsV075959; Sun, 17 Jul 2011 13:50:21 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201107171350.p6HDoLsV075959@svn.freebsd.org> From: Dimitry Andric Date: Sun, 17 Jul 2011 13:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224131 - in head/sys/boot/i386: . boot2 zfsboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jul 2011 13:50:22 -0000 Author: dim Date: Sun Jul 17 13:50:21 2011 New Revision: 224131 URL: http://svn.freebsd.org/changeset/base/224131 Log: When building some of the boot loaders with clang, and DEBUG_FLAGS or CFLAGS having '-g' in it, clang outputs several assembly directives that are too new for our version of binutils. Therefore, assemble the resulting .s files with clang instead. A more general solution can be implemented when a GNU as-compatible driver for clang's integrated assembler appears. Reported by: dougb Modified: head/sys/boot/i386/Makefile.inc head/sys/boot/i386/boot2/Makefile head/sys/boot/i386/zfsboot/Makefile Modified: head/sys/boot/i386/Makefile.inc ============================================================================== --- head/sys/boot/i386/Makefile.inc Sun Jul 17 12:42:51 2011 (r224130) +++ head/sys/boot/i386/Makefile.inc Sun Jul 17 13:50:21 2011 (r224131) @@ -11,6 +11,7 @@ LDFLAGS+= -nostdlib .if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -m32 -march=i386 +ACFLAGS+= -m32 LDFLAGS+= -m elf_i386_fbsd AFLAGS+= --32 .endif Modified: head/sys/boot/i386/boot2/Makefile ============================================================================== --- head/sys/boot/i386/boot2/Makefile Sun Jul 17 12:42:51 2011 (r224130) +++ head/sys/boot/i386/boot2/Makefile Sun Jul 17 13:50:21 2011 (r224131) @@ -89,6 +89,9 @@ boot2.out: ${BTXCRT} boot2.o sio.o ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} boot2.o: boot2.s +.if ${CC:T:Mclang} == "clang" + ${CC} ${ACFLAGS} -c boot2.s +.endif SRCS= boot2.c boot2.h Modified: head/sys/boot/i386/zfsboot/Makefile ============================================================================== --- head/sys/boot/i386/zfsboot/Makefile Sun Jul 17 12:42:51 2011 (r224130) +++ head/sys/boot/i386/zfsboot/Makefile Sun Jul 17 13:50:21 2011 (r224131) @@ -86,6 +86,9 @@ zfsboot.out: ${BTXCRT} zfsboot.o sio.o d ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} zfsboot.o: zfsboot.s +.if ${CC:T:Mclang} == "clang" + ${CC} ${ACFLAGS} -c zfsboot.s +.endif SRCS= zfsboot.c