From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 21:08:36 2010 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 2BD20106566C; Mon, 12 Jul 2010 21:08:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1ABFA8FC12; Mon, 12 Jul 2010 21:08:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CL8Zud017789; Mon, 12 Jul 2010 21:08:35 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CL8Z3l017785; Mon, 12 Jul 2010 21:08:35 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007122108.o6CL8Z3l017785@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 12 Jul 2010 21:08:35 +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: r209957 - in head/sys: amd64/acpica conf modules/acpi/acpi 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: Mon, 12 Jul 2010 21:08:36 -0000 Author: jkim Date: Mon Jul 12 21:08:35 2010 New Revision: 209957 URL: http://svn.freebsd.org/changeset/base/209957 Log: Move i386-inherited logic of building ACPI headers for acpi_wakeup.c into better places and remove intermediate makefile and shell scripts. This makes parallel kernel build little bit safer for amd64. Deleted: head/sys/amd64/acpica/Makefile head/sys/amd64/acpica/genwakecode.sh head/sys/amd64/acpica/genwakedata.sh Modified: head/sys/amd64/acpica/acpi_wakecode.S head/sys/conf/files.amd64 head/sys/modules/acpi/acpi/Makefile Modified: head/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- head/sys/amd64/acpica/acpi_wakecode.S Mon Jul 12 20:45:37 2010 (r209956) +++ head/sys/amd64/acpica/acpi_wakecode.S Mon Jul 12 21:08:35 2010 (r209957) @@ -29,8 +29,6 @@ * $FreeBSD$ */ -#define LOCORE - #include #include Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Mon Jul 12 20:45:37 2010 (r209956) +++ head/sys/conf/files.amd64 Mon Jul 12 21:08:35 2010 (r209957) @@ -70,17 +70,26 @@ hptrr_lib.o optional hptrr \ amd64/acpica/OsdEnvironment.c optional acpi amd64/acpica/acpi_machdep.c optional acpi amd64/acpica/acpi_switch.S optional acpi -acpi_wakecode.h optional acpi \ - dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ - compile-with "${MAKE} -f $S/amd64/acpica/Makefile ${.TARGET} MAKESRCPATH=$S/amd64/acpica" \ +acpi_wakecode.o optional acpi \ + dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ + compile-with "${NORMAL_S}" \ no-obj no-implicit-rule before-depend \ - clean "acpi_wakecode.h acpi_wakecode.o acpi_wakecode.bin" -# -acpi_wakedata.h optional acpi \ - dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ - compile-with "${MAKE} -f $S/amd64/acpica/Makefile ${.TARGET} MAKESRCPATH=$S/amd64/acpica" \ - no-obj no-implicit-rule before-depend \ - clean "acpi_wakedata.h acpi_wakecode.o acpi_wakecode.bin" + clean "acpi_wakecode.o" +acpi_wakecode.bin optional acpi \ + dependency "acpi_wakecode.o" \ + compile-with "objcopy -S -O binary acpi_wakecode.o ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakecode.bin" +acpi_wakecode.h optional acpi \ + dependency "acpi_wakecode.bin" \ + compile-with "file2c -sx 'static char wakecode[] = {' '};' < acpi_wakecode.bin > ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakecode.h" +acpi_wakedata.h optional acpi \ + dependency "acpi_wakecode.o" \ + compile-with 'nm -n --defined-only acpi_wakecode.o | while read offset dummy what; do echo "#define $${what} 0x$${offset}"; done > ${.TARGET}' \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakedata.h" # amd64/acpica/acpi_wakeup.c optional acpi amd64/acpica/madt.c optional acpi Modified: head/sys/modules/acpi/acpi/Makefile ============================================================================== --- head/sys/modules/acpi/acpi/Makefile Mon Jul 12 20:45:37 2010 (r209956) +++ head/sys/modules/acpi/acpi/Makefile Mon Jul 12 21:08:35 2010 (r209957) @@ -99,15 +99,25 @@ SRCS+= assym.s madt.c CLEANFILES+= acpi_wakecode.bin acpi_wakecode.h acpi_wakecode.o .if ${MACHINE_ARCH} == "amd64" -SRCS+= acpi_switch.S opt_global.h +SRCS+= acpi_switch.S acpi_wakedata.h opt_global.h CLEANFILES+= acpi_wakedata.h ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} acpi_switch.o: acpi_switch.S ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} -.endif - +acpi_wakecode.o: acpi_wakecode.S assym.s + ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} +acpi_wakecode.bin: acpi_wakecode.o + objcopy -S -O binary acpi_wakecode.o ${.TARGET} +acpi_wakecode.h: acpi_wakecode.bin + file2c -sx 'static char wakecode[] = {' '};' < acpi_wakecode.bin > \ + ${.TARGET} +acpi_wakedata.h: acpi_wakecode.o + nm -n --defined-only ${.ALLSRC} | while read offset dummy what; do \ + echo "#define $${what} 0x$${offset}"; done > ${.TARGET} +.else acpi_wakecode.h: acpi_wakecode.S assym.s ${MAKE} -f ${.CURDIR}/../../../${MACHINE_ARCH}/acpica/Makefile \ MAKESRCPATH=${.CURDIR}/../../../${MACHINE_ARCH}/acpica +.endif .include