tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/usr.bin/crunch/crunchgen
In article <20191219192420.GA128725%bec.de@localhost>,
Joerg Sonnenberger <joerg%bec.de@localhost> wrote:
>On Thu, Dec 19, 2019 at 12:27:23PM -0500, Christos Zoulas wrote:
>> On Dec 19, 4:19pm, joerg%bec.de@localhost (Joerg Sonnenberger) wrote:
>> -- Subject: Re: CVS commit: src/usr.bin/crunch/crunchgen
>>
>> | > I think that there are two uses: install media and rescue. I can reinstate
>> | > it for rescue. Is that ok? Note that by default both ssp and fortify are
>> | > off for most things, so my change was mostly a no-op for the
>default settings.
>> |
>> | We seem to default to off for more things, PIE too for example.
>>
>> Indeed, I also dislike the alphabet soup of flags for disabling
>> things. I propose that instead we provide a way to add a preamble
>> to the generated Makefile via -f <preamble> file, default to a
>> either a built-in configuration file, or one installed in the tree.
>> It is inappropriate for crunchgen to have knowledge of variables
>> specific to our build system that change over time.
>>
>> So I propose:
>>
>> 1. to make that change [configuration file]
>> 2. leave the defaults as they are for the installation binaries
>> 3. change the defaults to turn nothing off for the rescue binaries
>
>With the exception of the default, I agree. IMO crunchgen is a general
>purpose tool. It is used in different circumstances and shouldn't
>dictate whether "normal" use is space constrained or not.
I agree. Here is how to fix it:
Actually there is no need for a configuration file. I think that
instead we should add a -V VAR=VALUE flag that:
1. sets VAR=VALUE in the Makefile
2. passes VAR=${VAR:Q} to the ${MAKE} invocations in the Makefile
This way we can remove the special casing for DBG and LDSTATIC too
which again are special to our build system. We can also remove
all the special NO* variable handling...
We want to do this instead of using -v VAR=VALUE because that sets
the variable to the invocation environment of submakes, which can
be overriden in the Makefiles (yes and I know about -e, but it is
a broadsword).
The reason I am describing DBG is to address your point about
defaulting to space-constrained enviroments (since crunchgen
"knows" about DBG and sets it by default to "-Os").
christos
Home |
Main Index |
Thread Index |
Old Index