Commit Graph

162 Commits

Author SHA1 Message Date
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
christos e1168b9564 PR/33698: Kevin Massey: use strlcpy/strlcat to avoid stack overwrites. 2006-06-11 16:11:53 +00:00
simonb 2f8c495ce2 Fix problems with program names with a "-" in them, where crunchgen was
outputting the original program name for the stub name instead of the
mangled name.

From Mikolaj Golub on tech-embed.
2006-06-02 10:11:56 +00:00
mrg 2ed99b6c90 need <stdlib.h> for exit(3). 2006-05-10 21:34:20 +00:00
tsutsui a46df0d20b Don't use data in freed stack. 2006-01-13 16:36:25 +00:00
jmc 1bd5227b67 Make dependency checking for the pull-over make's actually work.
The make depend needs to be it's own separate make so it's done before the
main make runs. This also fixes issues w. -j breaking on 'depend <target'.

In addition, force the sub cross-over make to always run or otherwise it'll
never check dependencies once a valid foo.cro has been created.

Bump to 20050208
2005-02-10 16:03:04 +00:00
christos 36eef77064 Revert part of previous [remove cd to objdir] and bump the crunchdate.
Make has been fixed. The cd was in the wrong place anyway, it should
immediately follow ${MAKE}, so it did not work as expected.
2005-01-31 23:48:38 +00:00
lukem ebb5895a82 Explicitly cd to the .OBJDIR in the ${PROG}.strip target.
This fixes the "make -j N dependall" build issues people were
seeing in src/rescue, that appears to have been introduced
in rev 1.62.

Use the MAKEVERBOSE macros (if present) to print the pretty message.

Set the CRUNCH_VERSION to 20050130.
2005-01-30 23:04:33 +00:00
dsl 43371ff1ac Add (unsigned char) cast to ctype functions 2004-10-30 17:17:35 +00:00
wiz ab90f76ed3 Sync usage with man page (sort, add -O). 2004-09-25 21:48:15 +00:00
wiz 7a57b6bd09 Sort options in SYNOPSIS and in description; use more mdoc macros. 2004-09-25 21:47:53 +00:00
dsl 6e443a613f Change the way crunchgen works when doing 'reachover' builds.
Instead of trying to identify all the .o files that make each target rely
on the targets own Makefile having a program.ro target that will compile
all the objects and link them into a single relocatable.
Rename each program's 'main' to '_crunched_<prog>_stub' instead of compiling
a small piece of C.
The old behaviour can be forced by specifying -O, and is also done if the
config file specifies 'objs' or 'objpaths'.
As well as simplifying the logic, this means you only get a single 'prog.ro
is up to date' message for each program during the build.
2004-09-25 20:43:47 +00:00
dsl eb23ef8ce9 Use a single awk command (instead of awk and a lot of greps) to generate
the list of symbols to be renamed.
Rename symbols to <symbol>$$from%%<prog> (not _$$hide$$<prog>.cro$$<symbol>)
so that gdb reports the symbol name instead of  "_" (the $$ is treated as a
C++ name mangle and nothing after it is output by default).
2004-09-25 20:21:57 +00:00
dsl 8e4e69acab Whitespace police:
if, for and while are not functions,
put controlled statements of if and while onto separate lines
put function names into column 1
2004-09-25 19:21:07 +00:00
dsl ef0ef24324 Remove the always defined RENAME_SYMS and the code that would be
compiled were it defined.
That code is out of date, doesn't work on some archs, and is in the way
of another commit.
2004-09-25 18:32:37 +00:00
wiz cfb72c3de3 Adapt to /usr/share/misc/style.
Sync usage with man page.
Use getprogname()/setprogname().
2004-08-24 12:25:26 +00:00
wiz 71ad289a40 One object-file argument is mandatory, noted by jmc@openbsd.
New sentence, new line. Use more mdoc macros.
2004-08-24 12:11:44 +00:00
wiz 83e5dd40b4 Sync usage with man page. 2004-08-23 00:42:32 +00:00
wiz a908bd6f92 The conffile argument is not optional; also, move it behind all
the options. Bump date.
2004-08-23 00:42:12 +00:00
christos 5eb3a1ebce Add -v VARSPEC, so that we can pass variable assignments to make(1) 2004-08-19 22:24:04 +00:00
christos 999ef51181 remove copyright and comment sections. Saves ~40K on the crunched
ramdisk binary.
2004-06-06 01:46:53 +00:00
lukem 986979b8c9 Consistently check ${TOOLCHAIN_MISSING} against "no". 2004-01-03 14:04:27 +00:00
jmc 6cf7ed4ade Fix PR#4980 and support common symbols correctly in crunched programs.
Exclude them from renaming and expect the linker to do the right thing in
resolving them all to the library copy (i.e. optarg) or locally as the
case may be. Testing multiple programs crunched which reference optarg shows
correct behavior now.
2003-12-28 09:21:36 +00:00
jmc c392dc52fe Support crunch configs which specify relative srcdir's but don't use -D. For
these cases, prepend getwd() onto the front of them so a full correct path
is passed to the reach over make command (as it's running from at least
a subdir of the current directory for each object)
2003-12-27 22:28:38 +00:00
dmcmahill e399647d5d Use grep in favor of egrep in a few places. The pattern being searched
for is just a string and some egrep's (notably the Solaris one) don't like
the -w option.
2003-12-08 23:57:13 +00:00
nathanw 31bbd833a9 Change the make(1) command lines generated by crunchgen from:
"make -a -b VAR=VALUE -c -d target" to
"make -a -b -c -d VAR=VALUE target"

to avoid depending on make's undocumented and unportably-implemented
handling of the former case.

Makes crunchgen and nbmake work together on Cygwin.
2003-11-19 22:44:15 +00:00
lukem 171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
lukem 130ab7336b Rework how MAKEVERBOSE operates:
*	Don't bother prefixing commands with a line of  ${_MKCMD}\
	and instead rely upon "make -s".  This is less intrusive on
	all the Makefiles than the former.  Idea from David Laight.

    *	Rename the variables use to print messages.  The scheme now is:
	    _MKMSG_FOO		Run  _MKMSG 'foo'
	    _MKTARGET_FOO	Run  _MKMSG_FOO ${.TARGET}
	From discussion with Alistair Crooks.
2003-10-21 10:01:19 +00:00
lukem 87755a0463 support MAKEVERBOSE and use ${HOST_SH} 2003-10-19 04:05:01 +00:00
lukem 53a9d2856c fix typo that prevented ${PROG}.unstripped from being removed in "clean" 2003-10-07 07:08:20 +00:00
salo 0f5a0c156d netbsd.org->NetBSD.org 2003-07-26 20:34:11 +00:00
lukem 29a6151db1 NOxxx= variables should appear first 2003-07-10 11:21:51 +00:00
dsl 9778762a60 Keep unstripped binary in $OBJ, use are timestamp instead of prog.stripped.
Patentially useful as a source of symbol information for debugging.
2003-07-09 19:51:07 +00:00
thorpej d6c02b1523 "objcopy --redefine-syms-file" is now "objcopy --redefine-syms". 2003-06-01 02:03:22 +00:00
lukem 826a14607a Now that <bsd.prog.mk> DTRT if HOSTPROG is defined (i.e, it is a no-op),
there's no need to special-case .include-ing it.
2003-05-18 07:57:31 +00:00
dsl cd7432d0cb Add an extra target to the xxx.mk file that is equivalent to 'all', but which
doesn't pick up baggage from bsd.own.mk and bsd.prog.mk.
This stops parallel makes exploding because they try to build ${PROG} to soon.
Fixes toolchain/21563 (with change to src/distrib/common/Makefile.crunch).
Upped version of crunchgen to 0.3
2003-05-15 17:49:46 +00:00
dsl 606b795c6a Add a .WAIT to ensure that all the program objects are built before
trying to build the crunched binary.
Might fix toolchain/21563
2003-05-14 11:20:01 +00:00
dsl 13d371ab4c Make the prog.mk makefile run make in each of the target directories and
then build the program itself.
This means that changes to any of the program source files cause the
crunched binary to be rebuilt.
Seems to work ok with the sysinst ramdisks.
2003-05-09 12:10:15 +00:00
perry 2bb5ccc638 progams->programs (Igor Sobrado, PR misc/19700) + homegrown->home-grown 2003-03-31 01:46:29 +00:00
fvdl 083af7aab4 Back out rev 1.43 for now, it seems to create some new problems (see
the sysinst Makefile).
2003-03-18 01:30:54 +00:00
enami 3d76616fbe No need to invoke the make command so many times. It can handle all
the target specified in command line.
2003-03-01 08:36:05 +00:00