Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Nov 2012 16:22:41 +0100
From:      Erik Cederstrand <erik@cederstrand.dk>
To:        Warner Losh <imp@bsdimp.com>
Cc:        "toolchain@freebsd.org" <toolchain@freebsd.org>
Subject:   Re: arflags cleanup
Message-ID:  <E8A733AD-56DE-4FFA-8BA4-BE56D2052BDD@cederstrand.dk>
In-Reply-To: <A5F62693-7817-4A99-8D45-DC3CE1FAD83B@bsdimp.com>
References:  <3D0FBCC4-743C-45B0-82E0-4C82501F7E60@cederstrand.dk> <A5F62693-7817-4A99-8D45-DC3CE1FAD83B@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello Warner,

Den 09/11/2012 kl. 15.36 skrev Warner Losh <imp@bsdimp.com>:

> On Nov 9, 2012, at 3:52 AM, Erik Cederstrand wrote:
>=20
>> Hello toolchainers,
>>=20
>> I'm attempting to clean up hardcoded ar(1) flags in the tree to use =
the global ARFLAGS in share/mk/sys.mk instead. I want to be able to add =
"-D" to ARFLAGS and have it used everywhere.
>>=20
>> The patch changes some hardcoded flags from e.g. "cru" to the default =
"rl" or "rv" from sys.mk. Looking at the manpage for ar(1), I'm pretty =
sure this is safe, and my runtime tests haven't turned out any problems. =
Loosing the "u" flags means loosing a bit in performance in theory, but =
I have tested this to be negligible in a buildworld / kernel run. In a =
later iteration, maybe the default flags can be added a "u".
>>=20
>> Are there any problems with this patch?
>=20
> I don't like losing the 'c' flag.  Makes things in the build too =
whiny.
> Why purposely lose the 'u' flag that you know helps performance?
> Why move from cq to rl? This can be a big slow down...

I'd actually like to add both 'u' and 'c', I just didn't want to both =
clean up and change the default in the same patch. A followup patch =
could be:


Index: share/mk/sys.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- share/mk/sys.mk	(revision 242822)
+++ share/mk/sys.mk	(working copy)
@@ -39,7 +39,7 @@
 .if defined(%POSIX)
 ARFLAGS		?=3D	-rv
 .else
-ARFLAGS		?=3D	rl
+ARFLAGS		?=3D	cru
 .endif
 RANLIB		?=3D	ranlib


('l' is obsolete).

> What data can you offer that the buildworld run time is negligible?  =
Even on slower platforms?

I don't have any slower platforms available, at least not your =
definition of slower :-)

Erik=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E8A733AD-56DE-4FFA-8BA4-BE56D2052BDD>