svn commit: r306729 - head/tools/build/options

Bryan Drewery bdrewery at FreeBSD.org
Wed Oct 5 20:29:19 UTC 2016


On 10/5/16 1:12 PM, Ed Maste wrote:
> Author: emaste
> Date: Wed Oct  5 20:12:00 2016
> New Revision: 306729
> URL: https://svnweb.freebsd.org/changeset/base/306729
> 
> Log:
>   makeman: avoid bogus output with duplicated options
>   
>   On some targets 'make showconfig' currently reports both 'no' and 'yes'
>   for some options. For example:
>   
>   % make TARGET=mips showconfig | grep SSP
>   MK_SSP           = no
>   MK_SSP           = yes
>   

This problem in this case is because kern.opts.mk is returning
MK_SSP=yes due to bsd.opts.mk defaulting SSP to on, and src.opts.mk is
returning MK_SSP=no for TARGET_ARCH=mips.

This will fix it:
https://people.freebsd.org/~bdrewery/patches/bsd.opts.mk.broken-options.patch

I think it would be more proper to move any BROKEN_OPTIONS owned by
bsd.opts.mk to there rather than in src.opts.mk.  Since in this case SSP
is broken on MIPS and yet will continue to be used for out-of-tree
builds even though it is broken...

>   Emit a warning on encountering a duplicated variable, and skip the
>   second entry.
>   
>   Sponsored by:	The FreeBSD Foundation
> 
> Modified:
>   head/tools/build/options/makeman
> 
> Modified: head/tools/build/options/makeman
> ==============================================================================
> --- head/tools/build/options/makeman	Wed Oct  5 20:08:07 2016	(r306728)
> +++ head/tools/build/options/makeman	Wed Oct  5 20:12:00 2016	(r306729)
> @@ -33,12 +33,18 @@ show_options()
>  	ALL_TARGETS=$(echo $(${make} targets | tail -n +2))
>  	rm -f $t/settings
>  	for target in ${ALL_TARGETS} ; do
> +		prev_opt=
>  		env -i ${make} showconfig \
>  		    SRC_ENV_CONF=/dev/null SRCCONF=/dev/null \
>  		    __MAKE_CONF=/dev/null \
>  		    TARGET_ARCH=${target#*/} TARGET=${target%/*} |
>  		while read var _ val ; do
>  			opt=${var#MK_}
> +			if [ $opt = "$prev_opt" ]; then
> +				echo "$target: ignoring duplicate option $opt" >&2
> +				continue
> +			fi
> +			prev_opt=$opt
>  			case ${val} in
>  			yes)
>  				echo ${opt} ${target}
> 


-- 
Regards,
Bryan Drewery

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20161005/54699200/attachment.sig>


More information about the svn-src-all mailing list