From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 12:28:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFCF53AA; Mon, 5 Jan 2015 12:28:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0AB966CE3; Mon, 5 Jan 2015 12:28:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t05CSOq8088878; Mon, 5 Jan 2015 12:28:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05CSN4Z088872; Mon, 5 Jan 2015 12:28:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501051228.t05CSN4Z088872@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 5 Jan 2015 12:28:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276696 - in head/sys: conf modules/bios/smapi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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: Mon, 05 Jan 2015 12:28:25 -0000 Author: imp Date: Mon Jan 5 12:28:22 2015 New Revision: 276696 URL: https://svnweb.freebsd.org/changeset/base/276696 Log: Clang's 3.5 integrated assembler now handles these files correctly (it has support for the .codeXX directives). However, it is desirable, for a time, to allow kernels to be built with clang 3.4. Historically, it has been advantageous to allow stable X-1 to build kernels the old way (so long as the impact of doing so is small), and this restores that ability. Also, centralize the addition of ${ASM_CFLAGS.${.IMPSRC}}, place it in kern.mk rather than kern.pre.mk so that all modules can benefit, and give the same treatment to CFLAGS in kern.mk as well. Modified: head/sys/conf/Makefile.amd64 head/sys/conf/Makefile.i386 head/sys/conf/Makefile.pc98 head/sys/conf/kern.mk head/sys/conf/kern.pre.mk head/sys/modules/bios/smapi/Makefile Modified: head/sys/conf/Makefile.amd64 ============================================================================== --- head/sys/conf/Makefile.amd64 Mon Jan 5 11:40:05 2015 (r276695) +++ head/sys/conf/Makefile.amd64 Mon Jan 5 12:28:22 2015 (r276696) @@ -37,6 +37,9 @@ INCLUDES+= -I$S/contrib/libfdt CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif +ASM_CFLAGS.acpi_wakecode.S= ${CLANG_NO_IAS34} +ASM_CFLAGS.mpboot.S= ${CLANG_NO_IAS34} + %BEFORE_DEPEND %OBJS Modified: head/sys/conf/Makefile.i386 ============================================================================== --- head/sys/conf/Makefile.i386 Mon Jan 5 11:40:05 2015 (r276695) +++ head/sys/conf/Makefile.i386 Mon Jan 5 12:28:22 2015 (r276696) @@ -32,6 +32,9 @@ S= ../../.. INCLUDES+= -I$S/contrib/libfdt +ASM_CFLAGS.acpi_wakecode.S= ${CLANG_NO_IAS34} +ASM_CFLAGS.mpboot.s= ${CLANG_NO_IAS34} + %BEFORE_DEPEND %OBJS Modified: head/sys/conf/Makefile.pc98 ============================================================================== --- head/sys/conf/Makefile.pc98 Mon Jan 5 11:40:05 2015 (r276695) +++ head/sys/conf/Makefile.pc98 Mon Jan 5 12:28:22 2015 (r276696) @@ -30,6 +30,8 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" +ASM_CFLAGS.mpboot.s= ${CLANG_NO_IAS34} + %BEFORE_DEPEND %OBJS Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Mon Jan 5 11:40:05 2015 (r276695) +++ head/sys/conf/kern.mk Mon Jan 5 12:28:22 2015 (r276696) @@ -29,9 +29,16 @@ NO_WSOMETIMES_UNINITIALIZED= -Wno-error- CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body \ -Wno-error-parentheses-equality -Wno-error-unused-function \ -Wno-error-pointer-sign -Wno-error-format -Wno-error-parentheses + +CLANG_NO_IAS= -no-integrated-as +.if ${COMPILER_VERSION} < 30500 +# XXX: clang < 3.5 integrated-as doesn't grok .codeNN directives +CLANG_NO_IAS34= -no-integrated-as +.endif .endif .if ${COMPILER_TYPE} == "gcc" +GCC_MS_EXTENSIONS= -fms-extensions .if ${COMPILER_VERSION} >= 40300 # Catch-all for all the things that are in our tree, but for which we're # not yet ready for this compiler. Note: we likely only really "support" @@ -168,9 +175,8 @@ CFLAGS+= -fstack-protector CFLAGS+= -gdwarf-2 .endif -CFLAGS+= ${CWARNEXTRA} - -CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} +CFLAGS+= ${CWARNEXTRA} ${CWARNFLAGS} ${CWARNFLAGS.${.IMPSRC:T}} +CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} ${CFLAGS.${.IMPSRC}} # Tell bmake not to mistake standard targets for things to be searched for # or expect to ever be up-to-date. @@ -199,6 +205,3 @@ CFLAGS+= -std=iso9899:1999 .else # CSTD CFLAGS+= -std=${CSTD} .endif # CSTD - -# Pull in any CWARNFLAGS the modules have added. -CFLAGS+= ${CWARNFLAGS} ${CWARNFLAGS.${.IMPSRC:T}} Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Mon Jan 5 11:40:05 2015 (r276695) +++ head/sys/conf/kern.pre.mk Mon Jan 5 12:28:22 2015 (r276696) @@ -103,13 +103,7 @@ CFLAGS.gcc+=${CFLAGS_ARCH_PARAMS} WERROR?= -Werror # XXX LOCORE means "don't declare C stuff" not "for locore.s". -ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} - -.if ${COMPILER_TYPE} == "clang" -CLANG_NO_IAS= -no-integrated-as -.else -GCC_MS_EXTENSIONS= -fms-extensions -.endif +ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} ${ASM_CFLAGS.${.IMPSRC}} .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 CFLAGS+= -DGPROF Modified: head/sys/modules/bios/smapi/Makefile ============================================================================== --- head/sys/modules/bios/smapi/Makefile Mon Jan 5 11:40:05 2015 (r276695) +++ head/sys/modules/bios/smapi/Makefile Mon Jan 5 12:28:22 2015 (r276696) @@ -8,3 +8,5 @@ SRCS= smapi.c smapi_bios.S \ bus_if.h device_if.h .include + +CFLAGS.smapi_bios.S= ${CLANG_NO_IAS34}