On Fri, 8 Sep 2017, Ngie Cooper (yaneurabeya) wrote:

On Sep 8, 2017, at 13:09, Mateusz Guzik <m...@freebsd.org> wrote:
...
Log:
 Allow __builtin_memset instead of bzero for small buffers of known size

This change breaks all platforms that use gcc. If it???s not reverted in the 
next 3 hours, I???ll revert it.

Not all.  It works for me.  My version of it is 15-20 years old and never
always worked on old versions of FreeBSD

The problem seems to be with inlining parameters.  These are fairly broken
by default in gcc-4.2.1, and the overrides in kern/pre.mk only work in some
cases.  -Os is completely broken (with the overrides, it at best gives a
20% pessimization for space, and with other overrides inlining tends to
fail).  I recently found a workaround: compile with -fno-inline-functions.
So my full compiler flags are CONF_CFLAGS=[-march=i386] -Os
-fno-inline-functions -fno-inline-functions-called-once.  This should
reduce problems with inlining.  However, kernels still build with the
bad default flags of -O2.

Please fix ASAP if possible: 
https://ci.freebsd.org/job/FreeBSD-head-riscv64-build/3668/console .

This also shows problems with uninitialized variables.  But
-Wno-uninitialized is the default for gcc-4.2.1.  This breaks lots of
warnings Maybe you have different nonstandard options to avoid the
breakage.

-Wno-uninitialized is set in kern.mk, and also in kern.pre.mk for cddl.
(CDDL_CFLAGS apparerently gives a dumbed down subset of CWARNFLAGS to
break many more warnings.)  There is a problem getting flags passed
to all Makefiles.  CONF_CFLAGS (and all other makeoptions in config
files) is broken for modules (since macros in the kernel Makefile are
not inherited).  This feature prevents me using modules even if I
forget I don't like them.  Flags in kern.mk are only broken for boot
Makefiles which neglect to include kern.mk (that is, for all current
boot Makefiles).

Bruce
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to