Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Sep 2017 16:28:51 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
Cc:        Mateusz Guzik <mjg@freebsd.org>,  src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r323329 - head/sys/sys
Message-ID:  <20170909155623.F17598@besplex.bde.org>
In-Reply-To: <75479AB5-BB64-4D5B-8FA0-474532E7B103@gmail.com>
References:  <201709082009.v88K9EGW006964@repo.freebsd.org> <75479AB5-BB64-4D5B-8FA0-474532E7B103@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 8 Sep 2017, Ngie Cooper (yaneurabeya) wrote:

>> On Sep 8, 2017, at 13:09, Mateusz Guzik <mjg@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=E2=80=99s not revert=
ed in the next 3 hours, I=E2=80=99ll 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=3D[-march=3Di386] -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-risc=
v64-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
From owner-svn-src-all@freebsd.org  Sat Sep  9 07:09:44 2017
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9ADFE06DA5;
 Sat,  9 Sep 2017 07:09:44 +0000 (UTC)
 (envelope-from brde@optusnet.com.au)
Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au
 [211.29.132.59])
 by mx1.freebsd.org (Postfix) with ESMTP id A205583028;
 Sat,  9 Sep 2017 07:09:44 +0000 (UTC)
 (envelope-from brde@optusnet.com.au)
Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au
 [110.21.101.228])
 by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 858BC1A0648;
 Sat,  9 Sep 2017 16:52:37 +1000 (AEST)
Date: Sat, 9 Sep 2017 16:52:36 +1000 (EST)
From: Bruce Evans <brde@optusnet.com.au>
X-X-Sender: bde@besplex.bde.org
To: Ryan Libby <rlibby@freebsd.org>
cc: src-committers@freebsd.org, svn-src-all@freebsd.org, 
 svn-src-head@freebsd.org
Subject: Re: svn commit: r323192 - head/contrib/binutils/opcodes
In-Reply-To: <201709051904.v85J48P2013715@repo.freebsd.org>
Message-ID: <20170909163214.A17691@besplex.bde.org>
References: <201709051904.v85J48P2013715@repo.freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Optus-CM-Score: 0
X-Optus-CM-Analysis: v=2.2 cv=LI0WeNe9 c=1 sm=1 tr=0
 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17
 a=kj9zAlcOel0A:10 a=S1pSPPnuXjUizFS4LA0A:9 a=CjuIK1q_8ugA:10
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>;
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 09 Sep 2017 07:09:45 -0000

On Tue, 5 Sep 2017, Ryan Libby wrote:

> Log:
>  gnu binutils: FSGSBASE assembly/disassembly
>
>  Enable the in-tree binutils to assemble and disassemble amd64 FSGSBASE
>  instructions (rdfsbase, rdgsbase, wrfsbase, wrgsbase), used in the base
>  system since r322763.

Thanks.

>  This gives one last gasp for in-tree gcc, and provides a small
>  enhancement for in-tree binutils objdump.

After this, it will be necessary to use .byte.  This is almost simpler
for *fsbase too.

ddb still doesn't understand this instruction or many other more
important instructions.  amd64 is most broken, but I rarely notice
since I normally use i386.  ddb still doesn't understand pc-relative
addressing so for amd64 it displays addresses of global variables as
raw offsets from %rip.

Bruce



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