Commit Graph

202 Commits

Author SHA1 Message Date
wiz ac8e57cbc4 New sentence, new line. Fix typo. 2020-01-02 23:21:14 +00:00
christos e33cbeae47 Provide a migration guide from the old flags to -V. 2020-01-02 19:02:41 +00:00
christos 128e5f5e67 1. Remove all the special handling of variables (-d -p -P -s -S) that
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)
2019-12-29 18:26:16 +00:00
christos 19a77b177c Also disable ssp and fortify by default. 2019-12-18 02:16:04 +00:00
mrg de11d87641 introduce some common variables for use in GCC warning disables:
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."
2019-10-13 07:28:04 +00:00
mrg d40c522149 remove the hack to remove .eh_frame -- gcc7 is fixed it seems. 2019-02-14 12:22:06 +00:00
mrg 26711b697b while we're still figuring out the gcc7 vs .eh_frame issue, apply
the don't remove eh_frame hack to mips as well.  hpcmips testbed
is also failing currently:

[   3.1238738] panic: init died (signal 6, exit 12)
2019-02-13 20:48:56 +00:00
mrg 91af807154 hack alert time:
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.
2019-02-12 10:16:58 +00:00
wiz 8c602bad3c Sync usage with man page. 2018-07-26 08:57:32 +00:00
wiz 4426bfba8a Add -S to SYNOPSIS. Sort option descriptions. 2018-07-26 08:57:26 +00:00
kamil 783e210b8b Introduce a new option -S in crunchgen(1)
The -S argument enables sanitization with a sanitizer in libc.
2018-07-25 23:41:28 +00:00
kamil b6ed70bb6e Add new option -s to crunchgen(1) -- enable sanitization
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>
2018-06-21 10:55:54 +00:00
mrg 1f3c181244 in dir_search(), don't assume a directory existing is useful, instead
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.)
2018-05-08 23:05:17 +00:00
wiz ec85326579 New sentence, new line. Remove superfluous Pps. 2017-10-09 10:31:50 +00:00
christos ed570cec90 Handle static PIE 2017-10-08 15:06:17 +00:00
christos c2dcc0c09c Don't make crunch binaries PIE 2016-05-29 16:12:58 +00:00
matt cac6d59cc3 Use :Q instead of " to quote make vars DBG and LDSTATIC 2015-05-16 02:33:12 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
matt cbff955678 Use OBJECT_FMTS from <bsd.own.mk> 2014-03-02 03:42:50 +00:00
matt 01097770dd Recognize coldfire 2014-01-26 18:24:29 +00:00
martin 65dddd35c0 Remove .note.netbsd.mcmodel and .note.netbsd.pax from the chrunched binaries.
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.
2014-01-04 08:58:51 +00:00
wiz a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
joerg f43bb6a704 Document section stripping. 2013-06-10 19:40:53 +00:00
joerg 4619e36982 Strip .eh_frame and .eh_frame_hdr from crunched binaries. 2013-06-10 18:27:30 +00:00
roy 258cf0abec Add capfile(5) to describe the termcap format.
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.
2012-04-21 12:27:24 +00:00
wiz 1ac719d147 Remove unnecessary Bk/Ek pairs from SYNOPSIS.
No effective change except where I used the opportunity to sort options
and/or option descriptions.
2012-04-08 22:00:37 +00:00
joerg 1009d03daf static + __dead 2011-08-30 23:10:45 +00:00
christos 7aac162c51 Make this produce proper ansi c and knf. 2011-05-15 21:28:51 +00:00
christos d61830c284 pass LDSTATIC to recursive makes. 2010-04-24 17:58:40 +00:00
christos cf1f9ba391 move LDSTATIC before the includes because the rules need it early for
conditionals.
2010-04-21 14:58:10 +00:00
kiyohara 5a06e069fd Fix a bug.
always mkdir for 'objs' and 'objdir' when NEW_TOOLCHAIN.
2010-01-09 06:37:57 +00:00
uebayasi fce6fcbb2c Teach crunchide(1) that mips64e[bl] is 64-bit ELF. 2009-12-14 14:01:10 +00:00
pooka 70d4493c77 Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs.  User functionality remains the same.
2009-12-05 20:11:01 +00:00
he d1c69ed983 Move the include of <a.out.h> and <sys/exec_aout.h> until after
we have determined that the current machine actually supports a.out.
2009-08-20 17:40:26 +00:00
he cff5554191 Remove the include of <a.out.h>, since these files do not appear
to need it.  Fixes build for mips ports.
Also fix a comment: crunchide walks "the symbol table", not
just "the a.out symbol table".
2009-08-20 17:39:51 +00:00
martin 73946a9cc9 More missing <sys/exec_aout.h> includes 2009-08-16 18:15:28 +00:00
tsutsui e7f34be0d2 Fix another -Wsign-compare issue.
XXX: is it really worth to keep non native aout/coff/ecoff support here?
2009-04-18 11:30:30 +00:00
dogcow 85e7c15ca3 more signed/unsigned comparison fixes 2009-04-15 02:07:20 +00:00
lukem 9a472d38d4 Fix WARNS=4 issues (-Wshadow -Wcast-qual) 2009-04-14 22:03:07 +00:00
lukem 5b2a99f633 fix -Wsign-compare issues 2009-04-11 12:53:52 +00:00
joerg 8deda0e429 Use paragraph breaks before notes, not just line breaks. 2009-03-12 12:36:48 +00:00
apb cd5c0f944d In shell scripts invoked during a build, and in crunchgen, use ${AWK}
instead of plain "awk".  The Makefiles that invoke these scripts
or programs will pass AWK=${HOST_AWK:Q}.
2008-10-19 22:10:04 +00:00
jnemeth b408277b4f PR/36867 - Zafer Aydogan -- trsp is no longer 2007-08-30 18:56:51 +00:00
scw 5764a76889 Remove support for NetBSD/{,evb}sh5. 2007-04-08 09:35:21 +00:00
wiz a45316f7a5 Bump date for previous. 2006-10-26 10:49:35 +00:00
freza 57dc9ea382 Treat multiple
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
2006-10-18 21:20:44 +00:00
christos 4623faa261 We only need libutil in native mode. 2006-08-29 12:50:49 +00:00
christos cdab3a7a06 More programs using efun. 2006-08-26 18:17:41 +00:00
ross bcc364ea13 Check for powerpc64 when enumerating MACHINE_ARCH 2006-07-08 05:43:35 +00:00
christos afe552b7f1 detect overflow and exit with an error. 2006-06-13 17:18:56 +00:00