Commit Graph

43 Commits

Author SHA1 Message Date
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
christos a4b90d57e2 Add emalloc. 2006-12-11 00:55:02 +00:00
christos 8919424bdb No need to compile their own efun's. 2006-08-26 18:12:50 +00:00
mrg aadd7d4847 sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4. 2006-05-11 23:16:28 +00:00
christos d3e8815a4a Add proper DT_NEEDED dependencies. From Jukka Salmi 2006-03-17 21:43:16 +00:00
lukem 1e281ed227 Only #define HAVE_IPV6 if ${USE_INET6} != "no". 2005-01-10 03:11:17 +00:00
jonathan e5f57f3a70 Commit changes from Heimdal-current, as per discussion with Love
(lha@NetBSD.ORG), to incorporate contemporary (last-year-ish)
set-password and change-password extensions derived RFC-3244
(Microsoft set-password/change-password extensions), and the
subsequent MIT-KRB5 APIs for changing and setting passwords.

Required for compatibility with recent (2002/2003-ish) open-source
code which uses the MIT KRB5 APIs for setting passwords, or for
joining Microsoft domains as a  "computer account".

Modified files (for pullup tracking purposes):
	lib/libasn1/Makefile
	crypto/dist/heimdal/lib/asn1/k5.asn1
 	crypto/dist/heimdal/lib/krb5/changepw.c
 	crypto/dist/heimdal/lib/krb5/krb5-protos.h
 	crypto/dist/heimdal/lib/krb5/krb5.h
2004-07-12 20:44:56 +00:00
lukem a93ea220fc Rework how dependency generation is performed:
* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
  This is a change of behaviour.  If a Makefile wants the clean semantics
  it must specifically append to CLEANFILES.
  Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
  that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d  depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".
2003-08-01 17:03:41 +00:00
lukem 001c68bd94 Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
2003-07-10 10:33:58 +00:00
thorpej 01cfa6b3ec When being built as a host tool, the <config.h> we see is actually
the libnbcompat config.h, so -DKRB5=1 so that print_version.h actually
has a version in it.
2002-09-13 17:29:56 +00:00
joda fc15dce1ae need emalloc from roken 2002-09-12 13:35:56 +00:00
joda 3e5b5df667 version 6.1 2002-09-12 13:34:50 +00:00
lukem 91d06a031b More use of ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path 2002-08-19 13:35:05 +00:00
lukem ebb6fc9eb8 Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path (etc).
(Reduces make output by ~ 20%)
2002-08-19 09:41:27 +00:00
tv 001067bbd1 Readability cleanups; MKfoo=no -> NOfoo. 2001-12-12 00:51:00 +00:00
tv 0c4f909d6f Avoid picking up strays by adding .NOPATH to print_version.h and
make-print-version.
2001-11-15 22:02:42 +00:00
tv b5cd2489b2 Major overhaul of src/tools and host toolchain. Summary of changes:
* Rewrite src/tools Make logic to work like the rest of the tree wrt
  "dependall" and "install".  The old "make build" hack is gone.

* Remove the MKTOOLS logic.  This was linked to the "make build" hack,
  and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
  BSD make wrapper.  Use new ${.ALLTARGETS} variable to scan for
  targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
  src/usr.* and src/gnu/usr.* that would do target filename rewriting
  (improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
  MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.
2001-11-12 23:16:17 +00:00
tv dd7ca02987 Make handling of USETOOLS uniform: Don't need to check whether it is
defined, as <bsd.own.mk> always sets it; also, compare only against "yes"
(not "no") for a yes/no check, as there are two negative states ("no" and
"never").
2001-10-31 16:15:00 +00:00
jmc 1b341e36a2 Make asn1_files depend on ${ASN1_COMPILE} which will translate to the right
binary for both the old and new toolchain setups
2001-10-30 09:48:14 +00:00
thorpej 8712835e9c Modifications to allow this to be build as a new style host tool. 2001-10-25 07:42:38 +00:00
mason 8d31b83457 More elegant method of previous change. Thanks to James Chacon for pointing
out my think-o.
2001-10-11 03:56:43 +00:00
mason 058f064635 It appears to be the case that ${COMPILEETOBJ}/compile_et, which is used in
the USETOOLS=no and !defined(USETOOLS) cases, is not guaranteed to exist.
However, the current functionality overrides any potentially correct
hand-set definition of COMPILE_ET, causing build breakage.

Now the line setting COMPILE_ET only happens if COMPILE_ET is not already
set, like so:

.if !defined(COMPILE_ET)
COMPILE_ET=     ${COMPILEETOBJ}/compile_et
.endif
2001-10-11 03:39:02 +00:00
perry aabb474eb4 test for whether USETOOLS is defined before asking its value 2001-10-06 21:49:32 +00:00
tv 72583e218c .ifndef USE_NEW_TOOLCHAIN => .if ${USETOOLS} == "no"
Allows a new toolchain, but USETOOLS=no, configuration to build properly.
Reported by <martin@duskware.de>.
2001-10-04 16:11:24 +00:00
tv 12661f6606 Prep Heimdal host tools for new toolchain. 2001-09-21 22:58:59 +00:00
assar 2a2aa85a8d update infrastructure for krb4 1.1 and heimdal 0.4e 2001-09-17 12:34:40 +00:00
simonb 2db48f4c88 Add "Remember to update distrib/sets..." lines (and NetBSD RCS IDs in
some cases).
2001-09-10 11:18:41 +00:00
assar 4b1c7f1857 update generated heimdal include files for 0.3f
update Makefile infrastructure for 0.3f
bump shared library versions
fix some merge problems
2001-06-20 02:01:18 +00:00
itojun 35a07da1df use openssl 0.9.6a. shlib major # is bumped for libcrypto, libssl and
all kerberos libraries.
2001-04-12 07:48:03 +00:00
assar 03d6b1489a update make infrastructure and shlib versions numbers for heimdal 0.3e 2001-02-11 18:02:04 +00:00
sommerfeld a0bc06eb92 parallelize (mostly ${MAKE} print-objdir -> ${PRINTOBJDIR}) 2000-12-30 17:21:44 +00:00
itojun 713f7a31e1 libc has strlcat/tpy 2000-12-25 23:59:07 +00:00
jdolecek b0074dd768 back out majority of rev 1.5, left stuff from rev. 1.5 is:
* () --> {} change
* removal of redundant explicit dependency 'asn1.h: asn1.hx'
2000-11-19 20:29:05 +00:00
veego 4d9226fbc0 Backout parts of rev 1.5.
We need the SUBDIR here to create an obj directory in asn1_compile.
2000-11-19 10:56:05 +00:00
pk 2c7ffcac2f Put back `${SRCS}: asn1.h', so a `make depend' is not obligatory. 2000-11-17 09:57:55 +00:00
jdolecek 794898fca8 clean up depends a little, add stuff to force compilation of
asn1_compile as needed, the SUBDIR stuff is no longer used
this is primarily to avoid parsing k5.asn1 on every visit here
2000-11-13 15:08:16 +00:00
jhawk a022cf9d37 Use
${MAKE}
instead of
  make
2000-08-30 23:51:46 +00:00
garbled e694403caf Change LDFLAGS to HOST_LDFLAGS here too.. 2000-08-05 17:41:15 +00:00
tron 579a801207 Create "print_version.h" required to build the library. 2000-08-03 14:01:31 +00:00
assar 187f6e559a update build infrastructure for heimdal 0.3a, including new shlib versions 2000-08-03 03:53:35 +00:00
garbled e6a5f969dc add strlcpy.c strlcat.c to make this cross-compilable. 2000-08-02 02:38:19 +00:00
thorpej e041ca2c2e Fixup Heimdal library builds. 2000-06-16 22:46:43 +00:00
thorpej faf5f5eb7a Import Heimdal library build glue from cryptosrc-intl. 2000-06-16 19:27:31 +00:00