were dealing with DBG (-d) LDSTATIC/NOPIE (-p), and the rest with
disabling/enabling sanitizers.
2. Use emalloc/estrdup for all the allocators instead of only some cases.
3. Add -V varspec which passes variables on the command line (as DBG
and LDSTATIC used to be passed before) instead of appending them
to the on-the-fly Makefile using -v varspec.
4. Change the distrib and rescue Makefiles to use -V instead of the removed
flags.
The motivation of this is to make variable handling consistent, less magical,
and remove the need for changing crunchgen each time we want to add disabling
an option by default.
(as proposed in tech-toolchain)
GCC_NO_FORMAT_TRUNCATION -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE -Wno-cast-function-type (GCC 8)
use these to turn off warnings for most GCC-8 complaints. many
of these are false positives, most of the real bugs are already
commited, or are yet to come.
we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
on sparc and sparc64, don't remove .eh_frame section. it leads
to failure as something is referenced, and objcopy ends up
emitting a broken binary that can't be run -- it attempts to
load at va=0, beyond having missing referenced data.
also, on sparc64 also don't remove .note.netbsd.mcmodel.
the former should be revised when we can avoid it.
As of today typical sanitizers require dynamic executables, while
crunchgen(1) programs are produced with static properties.
Lack of specified -s will:
- generate a Makefile file with NOSANITIZER=
- build programs that are dependencies with NOSANITIZER=
In future there is an option to handle sanitization in statically linked
programs.
An idea with -s LGTM by <christos>
confirm that there is a non zero makefile in there. (this assumes
the makefile is called "Makefile", which is assumed in other places
in crunchgen.c already, so this doesn't make it worse.)
this fixes build issues when an empty subdir exists because some files
were moved subdir at some stage (ktrace, rcorder), and a non-prune
update may look in the wrong dir.
bump version (lots of updates between now and the previous update.)
We don't know wether the former would make sense (as currently used, it never
makes sense for static binaries) and we can not conclude safe PAX flags from
combined binaries.
Adjust various man pages and other documentation to point to capfile(5)
instead of termcap(5).
Remove getcap(3) as curses hasn't been building it for a long time.
Punt wrterm.c as tset no longer uses it.
SPECIAL prog {objs,objpaths,keepsymbols} itemX
lines (where "prog" is fixed) in crunchgen configuration the same as
SPECIAL prog {objs,objpaths,keepsymbols} item1 ... itemN
OK by David Laight