svn commit: r276488 - in head: share/mk sys/arm/broadcom/bcm2835 sys/conf

Garrett Cooper yaneurabeya at gmail.com
Thu Jan 1 04:44:27 UTC 2015


On Dec 31, 2014, at 20:25, Warner Losh <imp at bsdimp.com> wrote:

>> On Dec 31, 2014, at 9:15 PM, Garrett Cooper <yaneurabeya at gmail.com> wrote:
>> 
>> On Dec 31, 2014, at 20:12, Warner Losh <imp at bsdimp.com> wrote:
>> 
>>>> On Dec 31, 2014, at 8:52 PM, Dimitry Andric <dim at FreeBSD.org> wrote:
>>>> 
>>>> On 01 Jan 2015, at 03:00, Warner Losh <imp at FreeBSD.org> wrote:
>>>>> 
>>>>> Author: imp
>>>>> Date: Thu Jan  1 02:00:04 2015
>>>>> New Revision: 276488
>>>>> URL: https://svnweb.freebsd.org/changeset/base/276488
>>>>> 
>>>>> Log:
>>>>> Fix module builds on arm (and maybe others) by turning off a whole
>>>>> raft of new warnings that appear to be on by default in clang 3.5.0.
>>>>> Fix RPI-B build issues with new clang not liking the ability to pass
>>>>> arbitrary flags to as, since some flags are more arbitrary (and thus
>>>>> verboten) than others.
>>>>> 
>>>>> These warnings should be actually fixed in the code, but this is a
>>>>> band-aide to get things (almost) building again.
>>>>> 
>>>>> Modified:
>>>>> head/share/mk/bsd.kmod.mk
>>>>> head/share/mk/bsd.sys.mk
>>>>> head/sys/arm/broadcom/bcm2835/std.bcm2835
>>>>> head/sys/conf/kern.mk
>>>>> 
>>>>> Modified: head/share/mk/bsd.kmod.mk
>>>>> ==============================================================================
>>>>> --- head/share/mk/bsd.kmod.mk	Thu Jan  1 01:43:00 2015	(r276487)
>>>>> +++ head/share/mk/bsd.kmod.mk	Thu Jan  1 02:00:04 2015	(r276488)
>>>>> @@ -13,5 +13,3 @@ SYSDIR=	${_dir}
>>>>> .endif
>>>>> 
>>>>> .include "${SYSDIR}/conf/kmod.mk"
>>>>> -
>>>>> -.include <bsd.sys.mk>
>>>>> 
>>>>> Modified: head/share/mk/bsd.sys.mk
>>>>> ==============================================================================
>>>>> --- head/share/mk/bsd.sys.mk	Thu Jan  1 01:43:00 2015	(r276487)
>>>>> +++ head/share/mk/bsd.sys.mk	Thu Jan  1 02:00:04 2015	(r276488)
>>>>> @@ -110,11 +110,7 @@ CWARNFLAGS+=	-Wno-format
>>>>> CWARNFLAGS+=	-Wno-unknown-pragmas
>>>>> .endif # IGNORE_PRAGMA
>>>>> 
>>>>> -.if ${COMPILER_TYPE} == "clang"
>>>>> -# Would love to do this unconditionally, but can't due to its use in
>>>>> -# kernel build coupled with CFLAGS.${TARGET} feature
>>>>> CLANG_NO_IAS=	 -no-integrated-as
>>>>> -.endif
>>>>> CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\
>>>>> 		 -mllvm -simplifycfg-dup-ret -mllvm -enable-gvn=false
>>>>> CFLAGS.clang+=	 -Qunused-arguments
>>>> 
>>>> This should not be removed from bsd.sys.mk, since other things depend on
>>>> it, are you sure that you want this? :)
>>> 
>>> I may be wrong here for boot stuff that uses it.
>>> 
>>>> As far as I know, there are still a few places in the tree that use the
>>>> CLANG_NO_IAS macro.  It would be nice if those all went away, though…
>>> 
>>> Only for boot. Thanks, though I think they may be CFLAGS.clang += there.
>>> 
>>>> Modified: head/sys/arm/broadcom/bcm2835/std.bcm2835
>>>>> ==============================================================================
>>>>> --- head/sys/arm/broadcom/bcm2835/std.bcm2835	Thu Jan  1 01:43:00 2015	(r276487)
>>>>> +++ head/sys/arm/broadcom/bcm2835/std.bcm2835	Thu Jan  1 02:00:04 2015	(r276488)
>>>>> @@ -2,7 +2,7 @@
>>>>> 
>>>>> machine	arm armv6
>>>>> cpu	CPU_ARM1176
>>>>> -makeoptions	CONF_CFLAGS="-mcpu=arm1176jzf-s -Wa,-mcpu=arm1176jzf-s"
>>>>> +makeoptions	CONF_CFLAGS="-mcpu=arm1176jzf-s"
>>>>> 
>>>>> files	"../broadcom/bcm2835/files.bcm2835"
>>>>> 
>>>>> 
>>>>> Modified: head/sys/conf/kern.mk
>>>>> ==============================================================================
>>>>> --- head/sys/conf/kern.mk	Thu Jan  1 01:43:00 2015	(r276487)
>>>>> +++ head/sys/conf/kern.mk	Thu Jan  1 02:00:04 2015	(r276488)
>>>>> @@ -164,4 +164,26 @@ CFLAGS+=	-fstack-protector
>>>>> CFLAGS+=	-gdwarf-2
>>>>> .endif
>>>>> 
>>>>> +# A whole bunch of new default warnings in clang 3.5 subpress for now until
>>>>> +# this can be cleaned up.
>>>>> +.if ${COMPILER_VERSION} >= 30500
>>>>> +CFLAGS.clang+=    -Wno-pointer-sign -Wno-constant-conversion -Wno-format \
>>>>> +	-Wno-shift-count-negative -Wno-tautological-pointer-compare \
>>>>> +	-Wno-shift-count-overflow -Wno-tautological-compare
>>>>> +.endif
>>>>> +
>>>>> CFLAGS+= ${CFLAGS.${COMPILER_TYPE}}
>>>> 
>>>> Note that for x86, all of these warnings were already either fixed or
>>>> suppressed.  I assume this will be fleshed out later?
>>> 
>>> Yea, but since a build universe wasn’t done, they were present in the
>>> build. They are harmless on other architectures.
>>> 
>>>>> +# Tell bmake not to mistake standard targets for things to be searched for
>>>>> +# or expect to ever be up-to-date.
>>>>> +PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \
>>>>> +		beforelinking build build-tools buildfiles buildincludes \
>>>>> +		checkdpadd clean cleandepend cleandir cleanobj configure \
>>>>> +		depend dependall distclean distribute exe \
>>>>> +		html includes install installfiles installincludes lint \
>>>>> +		obj objlink objs objwarn realall realdepend \
>>>>> +		realinstall regress subdir-all subdir-depend subdir-install \
>>>>> +		tags whereobj
>>>>> +
>>>>> +.PHONY: ${PHONY_NOTMAIN}
>>>>> +.NOTMAIN: ${PHONY_NOTMAIN}
>>>>> 
>>>> 
>>>> Was this latter part intentional?  It does not seem to have anything to
>>>> do with clang at all.
>>> 
>>> It was the only bit of bsd.sys.mk that was needed.
>> 
>> 	Unfortunately that broke the build on all architectures where bce is built as -std= was not being passed to the compiler. Jenkins reported an error with bce: https://jenkins.freebsd.org/job/FreeBSD_HEAD_sparc64/225/changes , and I committed a change to bring back that support here: https://svnweb.freebsd.org/changeset/base/276493 . Please revert it if it wasn’t correct.
> 
> This change is wrong. bsd.sys.mk was eliminated on purpose, dammit.

Sorry. Should have asked first. Now the build is broken on all architectures :/. What next?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20141231/ef2f33c1/attachment.sig>


More information about the svn-src-all mailing list