Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Apr 2006 04:25:21 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 95407 for review
Message-ID:  <200604170425.k3H4PLVb073916@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95407

Change 95407 by jb@jb_freebsd2 on 2006/04/17 04:24:48

	Build the DTrace tools in the bootstrap-tools phase of 'make
	buildworld'. This ensures that the tools are (a) built up
	front on a system with none of them installed; and (b) that
	up-to-date versions are built and used in preference to any
	older version installed.
	
	The DTrace label is derived using 'uname -srp' and the OSRELDATE
	of the build system. The label is set in an environment variable
	called 'VERSION' which is the name you will see whizzing by
	during the build as each built object is converted to have
	CTF symbols. The label appears in the CTF ELF segment called
	'.SUNW_ctf'.
	
	e.g. A ctfdump of object secure/lib/libssh/progressmeter.So
	(a random one I chose) shows:
	
	
	- CTF Header -----------------------------------------------------------------
	
	  cth_magic    = 0xcff1
	  cth_version  = 2
	  cth_flags    = 0x00
	  cth_parlabel = (anon)
	  cth_parname  = (anon)
	  cth_lbloff   = 0
	  cth_objtoff  = 8
	  cth_funcoff  = 30
	  cth_typeoff  = 68
	  cth_stroff   = 724
	  cth_strlen   = 489
	
	- Label Table ----------------------------------------------------------------
	
	     48 FreeBSD 7.0-CURRENT i386 700015
	
	- Data Objects ---------------------------------------------------------------
	
	  [0] 12       unit (9)
	  [1] 24       counter (14)
	  [2] 18       cur_pos (15)
	  [3] 18       end_pos (16)
	  [4] 22       last_update (17)
	  [5] 1        bytes_per_second (18)
	  [6] 1        win_size (19)
	  [7] 19       file (20)
	  [8] 10       stalled (21)
	  [9] 22       start (22)
	  [10] 34      win_resized (24)
	
	- Functions ------------------------------------------------------------------
	
	  [0] FUNC (can_output) returns: 1 args: ()
	  [1] FUNC (sig_winch) returns: 7 args: (1)
	  [2] FUNC (setscreensize) returns: 7 args: ()
	  [3] FUNC (update_progress_meter) returns: 7 args: (1)
	  [4] FUNC (refresh_progress_meter) returns: 7 args: ()
	  [5] FUNC (stop_progress_meter) returns: 7 args: ()
	  [6] FUNC (start_progress_meter) returns: 7 args: (19, 18, 20)
	
	- Types ----------------------------------------------------------------------
	
	  <1> INTEGER int encoding=SIGNED offset=0 bits=32
	  <2> TYPEDEF __ct_rune_t refers to 1
	  <3> TYPEDEF __rune_t refers to 2
	  [4] INTEGER unsigned int encoding=0x0 offset=0 bits=32
	  <5> TYPEDEF __uint32_t refers to 4
	  <6> TYPEDEF __size_t refers to 5
	  <7> INTEGER void encoding=SIGNED offset=0 bits=0
	  [8] INTEGER char encoding=SIGNED CHAR offset=0 bits=8
	  [9] CONST (anon) refers to 8
	  <10> INTEGER long encoding=SIGNED offset=0 bits=32
	  [11] ARRAY (anon) content: 9 index: 10 nelems: 6
	
	  <12> CONST (anon) refers to 11
	  <13> TYPEDEF __int32_t refers to 1
	  <14> TYPEDEF sig_atomic_t refers to 1
	  [15] INTEGER long long encoding=SIGNED offset=0 bits=64
	  <16> TYPEDEF __int64_t refers to 15
	  <17> TYPEDEF __off_t refers to 16
	  <18> TYPEDEF off_t refers to 17
	  <19> POINTER (anon) refers to 8
	  [20] POINTER (anon) refers to 18
	  <21> TYPEDEF __time_t refers to 13
	  <22> TYPEDEF time_t refers to 21
	  [23] VOLATILE (anon) refers to 18
	  <24> POINTER (anon) refers to 23
	  [25] INTEGER unsigned short encoding=0x0 offset=0 bits=16
	  <26> STRUCT winsize (8 bytes)
		ws_row type=25 off=0
		ws_col type=25 off=16
		ws_xpixel type=25 off=32
		ws_ypixel type=25 off=48
	
	  [27] INTEGER unsigned long encoding=0x0 offset=0 bits=32
	  [28] POINTER (anon) refers to 27
	  [29] STRUCT (anon) (16 bytes)
		__min type=3 off=0
		__max type=3 off=32
		__map type=3 off=64
		__types type=28 off=96
	
	  <30> TYPEDEF _RuneEntry refers to 29
	  [31] POINTER (anon) refers to 30
	  [32] STRUCT (anon) (8 bytes)
		__nranges type=1 off=0
		__ranges type=31 off=32
	
	  <33> TYPEDEF _RuneRange refers to 32
	  <34> VOLATILE (anon) refers to 14
	  [35] ARRAY (anon) content: 8 index: 10 nelems: 8
	
	  [36] ARRAY (anon) content: 8 index: 10 nelems: 32
	
	  [37] POINTER (anon) refers to 9
	  [38] POINTER (anon) refers to 37
	  [39] FUNCTION (anon) returns: 3 args: (37, 6, 38)
	  [40] POINTER (anon) refers to 39
	  [41] POINTER (anon) refers to 19
	  [42] FUNCTION (anon) returns: 1 args: (3, 19, 6, 41)
	  [43] POINTER (anon) refers to 42
	  [44] ARRAY (anon) content: 27 index: 10 nelems: 256
	
	  [45] ARRAY (anon) content: 3 index: 10 nelems: 256
	
	  [46] POINTER (anon) refers to 7
	  [47] STRUCT (anon) (3156 bytes)
		__magic type=35 off=0
		__encoding type=36 off=64
		__sgetrune type=40 off=320
		__sputrune type=43 off=352
		__invalid_rune type=3 off=384
		__runetype type=44 off=416
		__maplower type=45 off=8608
		__mapupper type=45 off=16800
		__runetype_ext type=33 off=24992
		__maplower_ext type=33 off=25056
		__mapupper_ext type=33 off=25120
		__variable type=46 off=25184
		__variable_len type=1 off=25216
	
	  <48> TYPEDEF _RuneLocale refers to 47
	
	- String Table ---------------------------------------------------------------
	
	  [0] \0
	  [1] FreeBSD 7.0-CURRENT i386 700015
	  [33] int
	  [37] __ct_rune_t
	  [49] __rune_t
	  [58] unsigned int
	  [71] __uint32_t
	  [82] __size_t
	  [91] void
	  [96] char
	  [101] long
	  [106] __int32_t
	  [116] sig_atomic_t
	  [129] long long
	  [139] __int64_t
	  [149] __off_t
	  [157] off_t
	  [163] __time_t
	  [172] time_t
	  [179] unsigned short
	  [194] winsize
	  [202] ws_row
	  [209] ws_col
	  [216] ws_xpixel
	  [226] ws_ypixel
	  [236] unsigned long
	  [250] __min
	  [256] __max
	  [262] __map
	  [268] __types
	  [276] _RuneEntry
	  [287] __nranges
	  [297] __ranges
	  [306] _RuneRange
	  [317] __magic
	  [325] __encoding
	  [336] __sgetrune
	  [347] __sputrune
	  [358] __invalid_rune
	  [373] __runetype
	  [384] __maplower
	  [395] __mapupper
	  [406] __runetype_ext
	  [421] __maplower_ext
	  [436] __mapupper_ext
	  [451] __variable
	  [462] __variable_len
	  [477] _RuneLocale
	
	- CTF Statistics -------------------------------------------------------------
	
	  total number of data objects        = 11
	
	  total number of functions           = 7
	  total number of function arguments  = 5
	  maximum argument list length        = 3
	  average argument list length        = 0.71
	
	  total number of types               = 48
	  total number of integers            = 8
	  total number of floats              = 0
	  total number of pointers            = 11
	  total number of arrays              = 5
	  total number of func types          = 2
	  total number of structs             = 4
	  total number of unions              = 0
	  total number of enums               = 0
	  total number of forward tags        = 0
	  total number of typedefs            = 14
	  total number of volatile types      = 2
	  total number of const types         = 2
	  total number of restrict types      = 0
	  total number of unknowns (holes)    = 0
	
	  total number of struct members      = 23
	  maximum number of struct members    = 13
	  total size of all structs           = 3188
	  maximum size of a struct            = 3156
	  average number of struct members    = 5.75
	  average size of a struct            = 797.00
	
	  total number of union members       = 0
	  maximum number of union members     = 0
	  total size of all unions            = 0
	  maximum size of a union             = 0
	
	  total number of enum members        = 0
	  maximum number of enum members      = 0
	
	  total number of unique strings      = 48
	  bytes of string data                = 489
	  maximum string length               = 32
	  average string length               = 10.19

Affected files ...

.. //depot/projects/dtrace/src/Makefile.inc1#5 edit

Differences ...

==== //depot/projects/dtrace/src/Makefile.inc1#5 (text+ko) ====

@@ -37,7 +37,9 @@
 # We must do etc last for install/distribute to work.
 #
 SUBDIR=	share/info include lib libexec bin
-.if !defined(NO_CDDL)
+.if defined(NO_CDDL)
+NO_CTF=1
+#else
 SUBDIR+=cddl
 .endif
 .if ${MK_GAMES} != "no"
@@ -97,6 +99,12 @@
 OSRELDATE=	0
 .endif
 .endif
+
+.if !defined(VERSION)
+VERSION!=	uname -srp
+VERSION+=	${OSRELDATE}
+.endif
+
 TARGET_ARCH?=	${MACHINE_ARCH}
 .if ${TARGET_ARCH} == ${MACHINE_ARCH}
 TARGET?=	${MACHINE}
@@ -175,6 +183,7 @@
 BMAKEENV=	INSTALL="sh ${.CURDIR}/tools/install.sh" \
 		PATH=${BPATH}:${PATH} \
 		WORLDTMP=${WORLDTMP} \
+		VERSION="${VERSION}" \
 		MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
 BMAKE=		MAKEOBJDIRPREFIX=${WORLDTMP} \
 		${BMAKEENV} ${MAKE} -f Makefile.inc1 \
@@ -189,15 +198,16 @@
 		${BMAKEENV} ${MAKE} -f Makefile.inc1 \
 		DESTDIR= \
 		BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS \
-		-DNO_WARNS -DNO_CTF
+		-DNO_WARNS
 
 # cross-tools stage
 XMAKE=		TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
-		-DWITHOUT_FORTRAN -DWITHOUT_GDB -DNO_CTF
+		-DWITHOUT_FORTRAN -DWITHOUT_GDB
 
 # world stage
 WMAKEENV=	${CROSSENV} \
 		_SHLIBDIRPREFIX=${WORLDTMP} \
+		VERSION="${VERSION}" \
 		INSTALL="sh ${.CURDIR}/tools/install.sh" \
 		PATH=${TMPPATH}
 WMAKE=		${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP}
@@ -827,12 +837,12 @@
 .endif
 
 .if !defined(NO_CDDL) && !defined(NO_DTRACE)
-_sgsmsg=	cddl/usr.bin/sgsmsg
+_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf gnu/lib/libdwarf cddl/lib/libelf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
 .endif
 
 bootstrap-tools:
 .for _tool in \
-    ${_sgsmsg} \
+    ${_dtrace_tools} \
     ${_strfile} \
     ${_gperf} \
     ${_groff} \
@@ -876,10 +886,6 @@
 _rescue= rescue/rescue
 .endif
 
-.if !defined(NO_CDDL) && !defined(NO_DTRACE)
-_dtrace_tools= cddl/usr.bin
-.endif
-
 build-tools:
 .for _tool in \
     bin/csh \
@@ -898,7 +904,6 @@
 .endfor
 .for _tool in \
     gnu/usr.bin/cc/cc_tools \
-    ${_dtrace_tools} \
     ${_kerberos5_tools}
 	${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \
 		cd ${.CURDIR}/${_tool}; \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604170425.k3H4PLVb073916>