kern/160463: [patch] fix build dependency for dtrace module

Garrett Cooper yanegomi at gmail.com
Sun Sep 4 17:40:06 UTC 2011


>Number:         160463
>Category:       kern
>Synopsis:       [patch] fix build dependency for dtrace module
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 04 17:40:05 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Cooper
>Release:        9.0-BETA1
>Organization:
n/a
>Environment:
FreeBSD bayonetta.local 9.0-BETA1 FreeBSD 9.0-BETA1 #0 r224946M: Thu Aug 18 10:02:09 PDT 2011     gcooper at bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA  amd64
>Description:
The ordering for the sources in dtrace's module file are wrong. This causes build errors like what are shown below. The fix is to reorder the dependencies to force assym.s to be built before trying to build dtrace_assym.S. It seems odd that this is required, given how make works, but it fixes the compilation issue.

cc -O2 -pipe -fno-strict-aliasing -pipe -O2 -march=core2 -DDIS_MEM -DSMP -DDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/contrib/opensolaris/uts/intel -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/compat/opensolaris -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64 -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/contrib/opensolaris/uts/common -I/usr/src/sys/modules/dtrace/dtrace/../../.. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer  -mno-sse -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign
  -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -c /usr/src/sys/modules/dtrace/dtrace/../../../cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
cc -O2 -pipe -fno-strict-aliasing -pipe -O2 -march=core2 -DDIS_MEM -DSMP -DDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/contrib/opensolaris/uts/intel -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/compat/opensolaris -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64 -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/contrib/opensolaris/uts/common -I/usr/src/sys/modules/dtrace/dtrace/../../.. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer  -mno-sse -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign
  -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas  -c /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dtrace_asm.S
/usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dtrace_asm.S:37:19: error: assym.s: No such file or directory
*** Error code 1

Stop in /usr/src/sys/modules/dtrace/dtrace.
*** Error code 1

Stop in /usr/src/sys/modules/dtrace.
>How-To-Repeat:
make -C /sys/modules/dtrace/ clean cleandir all
>Fix:


Patch attached with submission follows:

Index: sys/modules/dtrace/dtrace/Makefile
===================================================================
--- sys/modules/dtrace/dtrace/Makefile	(revision 224946)
+++ sys/modules/dtrace/dtrace/Makefile	(working copy)
@@ -8,7 +8,9 @@
 .PATH: ${.CURDIR}/../../../cddl/dev/dtrace/${ARCHDIR}
 
 KMOD=		dtrace
+# assym.s is needed for dtrace_asm.S
 SRCS=		dtrace.c \
+		assym.s \
 		dtrace_asm.S \
 		dtrace_subr.c
 
@@ -20,9 +22,6 @@
 
 SRCS+=		bus_if.h device_if.h vnode_if.h
 
-# Needed for dtrace_asm.S
-SRCS+=		assym.s
-
 # These are needed for assym.s
 SRCS+=		opt_compat.h opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h
 


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list