Commit Graph

1050 Commits

Author SHA1 Message Date
thorpej 04520355fe * If PROG_CXX is set by the program's Makefile, use ${CXX} to link
the program rather than ${CC}.
* If HAVE_GCC3 is defined, pull in "-lstdc++ -lm" as additional C++
  support libraries for DESTDIR builds.
2002-01-01 00:27:06 +00:00
thorpej 3b7fb63d99 Document MKBFD, MKGDB, MKGCC. 2001-12-31 23:11:05 +00:00
thorpej 1c95f6c025 * Remove -Wno-format -fno-builtin from CFLAGS in the x86-64 case.
* Default MKBFD, MKGDB, and MKGCC to "yes".  Set them to "no" for
  x86-64.
2001-12-31 23:06:34 +00:00
thorpej 73b83787ee Don't put CPP flags in CFLAGS. 2001-12-28 07:49:26 +00:00
thorpej 5e53e8bb6a Add -ffreestanding to CFLAGS. 2001-12-28 07:48:39 +00:00
thorpej 20f59a49c7 x86_64 doesn't use the "new toolchain" but it doesn't really use the
old one either.  The "new toolchain" environment is closer to what we
want, however, for using the external toolchain currently required for
x86_64, so set USE_NEW_TOOLCHAIN for x86_64.
2001-12-28 06:57:41 +00:00
lukem 56640963f5 cosmetic tweak on an older comment 2001-12-28 01:40:50 +00:00
lukem efcc9a4c9d * Add user-controlled mk.conf variables
- SHLIBDIR	Location to install shared libraries if ${USE_SHLIBDIR}
			is "yes".  Defaults to "/usr/lib".

	- USE_SHLIBDIR	If "yes", install shared libraries in ${SHLIBDIR}
			instead of ${LIBDIR}.  Defaults to "no".
			Sets ${_LIBSODIR} to the appropriate value.
			This may be set by individual Makefiles as well.

	- SHLINKDIR	Location of shared linker.  Defaults to "/usr/libexec".
			If != "/usr/libexec", change the dynamic-linker
			encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
	libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
	libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
  to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

  1.)	If nothing is set or changed, there is no change from the
	current behaviour:
		- Static /bin, /sbin, and bits of /usr/*
		- Dynamic rest
		- Shared linker is /usr/libexec/ld*so

  2.)	If the following make variables are set:
		LDSTATIC=
		SHLINKDIR=/lib
		SHLIBDIR=/lib
	Then the behaviour becomes:
		- Dynamic tools
		- .so libraries used by /bin and /sbin are installed to /lib,
		  with symlinks from /usr/lib/lib*so to -> /lib/lib*so
		  where appropriate
		- Shared linker is /lib/ld*so

  3.)	As per 2.), but add the following variable:
		USE_SHLIBDIR=yes
	This forces all .so's to be instaleld in /lib (with compat
	symlinks), not just those tagged by their Makefiles to be.
	Again, compat symlinks are installed
2001-12-28 01:32:37 +00:00
minoura ebfadba677 ELF!! 2001-12-24 11:38:04 +00:00
chs 450ff86b66 convert luna68k to ELF. ok'd by nisimura. 2001-12-22 23:38:20 +00:00
thorpej ab25dcd90e Switch alpha to the new toolchain. 2001-12-20 18:29:47 +00:00
tv 26375a1710 Remove -Wa,-Av9a hack from <sys.mk> and relegate it to the places that need
it (kernel and libc).

The current version of the gas assembler in the tree (2.11.2) already
defaults to generating object files for "-Av9 -64", supporting V9
instructions in ELF64 object format.  "-Av9a" is only needed for specific
parts of the NetBSD base sources, and not for all third-party code.
2001-12-19 21:17:59 +00:00
tv 35bea081fe Always depend on ${MANPAGES}, so deliberately pre-generated files are
built automatically (even without a ${MANSUFFIX}).
2001-12-17 21:27:45 +00:00
scw 18449b952b Switch all OBJECT_FMT=elf m68k ports to new-toolchain. 2001-12-16 20:31:09 +00:00
thorpej a676fd1679 Err, after consulting FSF's config.sub, shl -> shle. 2001-12-15 01:50:33 +00:00
thorpej a78b7669d7 MACHINE_GNU_ARCH for sh3el is "shl". sh3eb and sh3el ELF targets
are also named "netbsdelf".
2001-12-15 00:39:08 +00:00
explorer 1411757e4a install bsd.hostlib.mk, since bsd.hostprog.mk is and things in /usr/src/tools wants it. 2001-12-14 05:46:47 +00:00
lukem b0b0a32ad7 Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly).
Otherwise the appropriate MKxxx=no won't be defined .
2001-12-12 12:24:19 +00:00
thorpej 3ff7b8a100 Per suggestion from Todd:
Wrap assignments of various tools within USETOOLS_BINUTILS and
USETOOLS_GCC (names reflect the FSF packages the tools are provided
by), which default to "yes", for easy testing of different versions
of these packages.
2001-12-12 05:50:09 +00:00
tv f845c9ab5f Revert rev. 1.228. If USE_NEW_TOOLCHAIN is set to "yes" explicitly by the
user on a platform that is not *OFFICIALLY* switched to the new toolchain,
WE REALLY, REALLY DO WANT A LOUD WARNING AT THE START OF THE BUILD!
2001-12-12 03:39:27 +00:00
tv ae87b37058 Revert previous. This breaks many things, since such variables as LD and AS
are defined in <sys.mk>!

A better way needs to be devised for this.
2001-12-12 03:28:37 +00:00
tv 8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
thorpej ebb6a06799 Set the following vars with FOO?= so that alternative versions
can be specified in mk.conf: AR, AS, LD, NM, OBJCOPY, OBJDUMP,
RANLIB, SIZE, and STRIP.

This, along with some symlinks in TOOLDIR, makes it much easier to
test different versions of the GNU toolchain (e.g. binutils-current).
2001-12-12 00:50:27 +00:00
tv e690fbabcd Major readability cleanups. 2001-12-11 23:25:23 +00:00
jmc 0ce9aa8e6c Add pwd_mkdb as a toolchain bit for builds 2001-12-07 02:28:53 +00:00
jmc 92a08ecf01 If USE_NEW_TOOLCHAIN is defined and set to yes treat that as a match (and then
reset it to nowarn so it lines up with ported platforms).
2001-12-04 04:25:21 +00:00
thorpej 89c7818994 Ah, don't actually need MAKEWHATIS here. 2001-11-29 23:55:33 +00:00
thorpej 79b30cbdeb Provide ${MAKEWHATIS}. 2001-11-29 23:53:23 +00:00
wiz d245a498c0 Remove spurious '.' in line 42, as reported by Naoto Shimazaki on
current-users on Thu, 29 Nov 2001 09:17:16.
2001-11-29 11:57:21 +00:00
jmc 9083f42414 There's no need for TMACDIR here after all. Anything using it is using it for
FILES installs so it can't have DESTDIR in front of it (and those Makefiles
all explicitly set it).
2001-11-28 23:32:16 +00:00
tv 8f2c8e583f Fix the :U's used with ${UPDATE} so that stray values don't get put into
the .PHONY: target.
2001-11-28 20:19:08 +00:00
tv 43453698f5 Use :U successfully this time. In an expression such as ${FOO:D:Ubar}, you
end up with empty string if FOO is defined, and `bar' if it is undefined.
2001-11-28 20:12:47 +00:00
jmc df5817fef0 Make sure the tools built roff tools are first in the path before calling groff
as it calls troff/etc without any leading pathnames. Otherwise the tools
version is fairly useless as the installed system version will be used to
build all manpages
2001-11-28 05:03:18 +00:00
jmc 20bb75f3c3 Separate out TMACDIR's use for install's from it's dependency function.
The dependency should be against the TOOLDIR files (is USETOOLS=yes) but
installs will always use ${DESTDIR}/usr/share/tmac.

Without this if people do not have /usr/share/tmac/tmac.andoc on their
systems while building the build will break in the groff areas due to
the dependency rules.
2001-11-28 05:01:28 +00:00
tv 632cac0d3c Add <bsd.hostlib.mk>, for use when building a host-specific library
(to be used with src/tools/compat).
2001-11-28 04:42:49 +00:00
tv 4a1ad2db60 If DESTDIR is set, do a similar nostdinc dance for the standard C++ include
directory.
2001-11-28 04:38:29 +00:00
jmc 2e1248a6d9 If using MAKEOBJDIRPREFIX use the same checks as the symlink logic does below.
i.e. if the root of the object tree doesn't exist then complain and exit.

This makes both sections consistant to each other (MAKEOBJDIR specifies an
exact directory so there's no root per se to check so nothing can really be
done there).
2001-11-27 05:42:24 +00:00
jmc 423e88b943 Ok, take 2 on redoing KERNOBJDIR logic.
Use the old setup for MAKEOBJDIRPREFIX but also add a new check for
_SRC_TOP_OBJ_ and use that if it's set. This allows a make release using
build.sh (which uses MAKEOBJDIR patterns) to function correctly on r/o
source tree's.
2001-11-27 05:39:03 +00:00
jmc 6c76413f2f Back out last. Typo'd some things I need to test again 2001-11-27 05:17:31 +00:00
jmc 917bc8ae24 Change logic around for kernel objdir handling.
Use MAKEOBJDIRPREFIX as before if it's set

otherwise if _SRC_TOP_OBJ_ is set and isn't "" use it as the base for the
obj dir
2001-11-27 05:11:41 +00:00
jmc 60ec3c749b Revert check for NOGCCERROR back to a .if \!defined as the :U check will break
anyone with NOGCCERROR=1 in their mk.conf
2001-11-26 06:11:20 +00:00
jmc 900d713ff9 Back out last change until some more testing is done. Should account for folks
not using objdirs and also force this to cd to $_SRC_TOP_ before doing the
make obj
2001-11-25 23:40:08 +00:00
jmc d271a36466 Before checking the value from PRINTOBJDIR force a make obj at $_SRC_TOP_. 2001-11-25 09:06:00 +00:00
perry 8382183dca 1) Use the -r flag for INSTALL_SYMLINK and INSTALL_LINK, just like
INSTALL_FILE does.
2) Patch around a bug that has been biting people in which bsd.own.mk
   attempts to cd into space when building outside of the tree. I may
   have a better solution for the whole thing later.
2001-11-24 21:26:34 +00:00
perry 6385e197e2 Now that install has been fixed to deal with -r in the symlink case,
make bsd.lib.mk use INSTALL_SYMLINK instead of mv and ln -s.
Note: There is still one weird case I left alone, in which symlinks
get built in the objdir. I didn't want to log metadata for those links
so I left the old machinery in for them.
XXX do we even need that elaborate dance for the ln's in the objdir?
2001-11-24 21:23:38 +00:00
tv d00721de07 :U can't be used to test for existence, as the variable may contain an
arbitrary value; change back to .if !defined().  Problem noted by
bernd@arresum.inka.de in PR toolchain/14629.
2001-11-20 17:12:22 +00:00
kleink e1deb16aa0 NLS is commonly expanded to Native Language Support, not National Language
Support.
2001-11-19 16:20:26 +00:00
perry 550b1df8d6 replace instances of ln with ${INSTALL_LINK} and ${INSTALL_SYMLINK} 2001-11-19 04:46:07 +00:00
perry 5fdc9f9a85 document/rename UNPRIVED 2001-11-19 04:45:06 +00:00
perry 77bd523e70 Snapshot of some things for builds as non-root -- work in progress:
0) rename UNPRIVILEGED UNPRIVED. It was too long. We'll argue about if
   we should replace it with yet something else later. It currently
   logs metadata by default. We'll argue more about that later too.
1) create a _SRC_TOP_OBJ_ variable pointing at the /usr/src objdir so
   we know where to dump metadata.
2) Add a METALOG variable pointing at the default location for the
   metadata log. (This may be moved or renamed -- the location is just
   for testing.)
3) Add a HOST_INSTALL_FILE used in host tools Makefiles instead of
   INSTALL_FILE, which doesn't include ${INSTPRIV} (i.e -U -M ${METALOG})
4) Add INSTALL_LINK, INSTALL_SYMLINK for use in other .mk files so we
   can get rid of explicit uses of ln. Slightly clean up INSTALL_FILE.
2001-11-19 04:44:32 +00:00
thorpej 8bfeb9a270 Use a little transitional hack to determine if we use -isystem
or -idirafter.  Use the former only of USE_NEW_TOOLCHAIN, since
-isystem causes the old toolchain to bomb out when building
libstdc++.
2001-11-19 02:46:50 +00:00
bjh21 dbd735b9b1 Need bsd.sys.mk for the GROFF definition in the non-USETOOLS case. 2001-11-18 15:11:25 +00:00
thorpej 72915508bb Protect from multiple inclusion. 2001-11-17 22:55:24 +00:00
thorpej b78cf94ba5 Make sure MKDEP is defined for the non-USETOOLS case. 2001-11-17 22:48:48 +00:00
thorpej c08a9b5abe Need bsd.sys.mk for the GROFF definition in the non-USETOOLS case. 2001-11-17 20:38:45 +00:00
atatat 04faedd073 Add OBJDUMP to the toolchain list. 2001-11-15 21:43:54 +00:00
tv 42423ab0f9 Make it possible to warn about platforms that are not yet switched to the
new toolchain.
2001-11-15 19:24:07 +00:00
wiz dd7622f812 It's called nbmakeinfo now, not makeinfo. 2001-11-15 13:05:35 +00:00
wiz 012e08cda6 Re-add check for defined(MKSOFTFLOAT) that got lost in v1.60.
Needed for Makefiles which include bsd.sys.mk, but not bsd.own.mk,
like distrib/macppc/floppies/ramdisk/Makefile.
Okay'd by simonb.
2001-11-15 12:15:09 +00:00
tv 6699960dbf C/..$/.c/ -> C/\..$/.c/ 2001-11-14 23:06:26 +00:00
tv 5e32db9d70 Remove SHAREDSTRINGS logic for host programs; this is unnecessary here. 2001-11-14 23:03:06 +00:00
tv 6c2c072164 Turn off host-specific objdirs by default. Set MKHOSTOBJ=yes to enable. 2001-11-14 22:29:23 +00:00
tv d21f3d4a13 Prefix all target-specific things with `${MACHINE_GNU_PLATFORM}-'.
Prefix all non-target-specific things with `nb'.
2001-11-14 22:13:39 +00:00
tv a9c913616b Put -Is in CPPFLAGS, not CFLAGS; change -I to -isystem as appropriate. 2001-11-14 22:01:40 +00:00
tv c8c3cf578b Move the DESTDIR-based nostdinc logic to bsd.lib.mk and bsd.prog.mk where
it belongs (with the native target compile rules).
2001-11-14 21:49:53 +00:00
thorpej f01d91b750 If MACHINE_ARCH == arm, set USE_NEW_TOOLCHAIN=yes and OBJECT_FMT=ELF.
It is infeasible for some ARM ports to use anything but ELF/new-toolchain,
and this allows for the ARM ports that aren't ready for ELF to stay at
MACHINE_ARCH == arm32 until they're ready.  The rest of the ARM ports
have a userbase such that if a flag day happens with the compiler (there
are a couple of ABI issues still being discussed), that it won't matter
so much.

Discussed with Ben Harris, Matt Thomas, and Chris Gilbert.
2001-11-14 19:46:38 +00:00
tv 23b305bcfa * Use -isystem instead of -idirafter for ${DESTDIR}/usr/include.
* Provide defaults for HOST_AR and HOST_RANLIB.
* Formatting cleanup.
2001-11-13 20:25:38 +00:00
tv 0b806103d9 "${FOO}" -> ${FOO:Q} 2001-11-13 17:37:03 +00:00
tv 25c34dba0d Move host program overrides of INSTALL and MKDEP to <bsd.hostprog.mk>. 2001-11-13 17:36:14 +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 7745da0f1c Set CFLAGS and CPPFLAGS for the benefit of <bsd.dep.mk>, and move the
inclusion of <bsd.sys.mk> to the top to get defaults.  (Dependency handling
needs a cleanup, and will get one soon....)
2001-11-12 22:06:41 +00:00
tv 300ea65311 MAKEFLAGS isn't accessible from a conditional during parse; use .MAKEFLAGS
instead.
2001-11-12 20:11:21 +00:00
tv d35dc81716 "true" doesn't output anything; use "echo" instead. 2001-11-12 20:05:15 +00:00
tv 84935b4037 Make PRINTOBJDIR use "${MAKE} -V .OBJDIR" so it will work correctly with
<bsd.obj.mk> rewrites of ${.OBJDIR}.  Add a failsafe (checking for the
-V option in MAKEFLAGS) to prevent infinite recursion.
2001-11-12 20:03:44 +00:00
tv 777bc9f06a Use ${__curdir} consistently. 2001-11-12 18:49:12 +00:00
tv c2c66c6e5c Also handle the USR_OBJMACHINE case for OBJHOSTMACHINE. 2001-11-11 23:22:19 +00:00
tv 2e00400b7f Affix the ${HOST_OSTYPE} info to the end of the objdir name if OBJMACHINE
is set (and MAKEOBJDIR[PREFIX] is not in use).  This permits multiple hosts
to compile hostprogs (not just src/tools) for a given target without
colliding with each other.

Currently restricted only to new toolchain builds, as this requires a new
make(1) in order to function properly.
2001-11-11 23:19:14 +00:00
tv e7e8f27d5f Fix variable concatenation in previous. 2001-11-11 23:07:26 +00:00
tv fcc9c62259 Make the BSDSRCDIR/BSDOBJDIR symlink based objdir system work for the top
source directory.  This will use BSDOBJDIR of OBJMACHINE is unset, and will
create a directory '.MACHINE' inside BSDOBJDIR if OBJMACHINE is set.

MAKEOBJDIR and MAKEOBJDIRPREFIX based objdirs already cope with the top
level directory just fine.
2001-11-11 22:39:23 +00:00
tv 80d11d2c09 Provide defaults for MDSETIMAGE and CRUNCHGEN. 2001-11-11 21:41:00 +00:00
thorpej 73f86f9fe4 Add a DBSYM variable for the dbsym(8) host tool. 2001-11-09 07:30:55 +00:00
tv 4fe26460e9 Remove dependency on NLSDIR entirely, now that it's not auto-created. 2001-11-06 16:20:16 +00:00
lukem 20960db1bf Don't create missing NLS directories; require them to already exist
(by updating etc/mtree/NetBSD.dist as necessary).
`nlsinstall' is now in line with other *install targets.
2001-11-06 10:59:15 +00:00
tv e239fff11b Extend the use of NEED_OWN_INSTALL_TARGET (used by bsd.pkg.mk since its
creation, to exclude conflicting make targets from botching pkgsrc), to
avoid defining INSTALL_FILE.  pkgsrc is self-contained except for
<bsd.own.mk>, so this doesn't have an adverse effect on real <bsd.*.mk>
build trees.
2001-11-05 19:45:25 +00:00
thorpej 5f6d116c46 Switch PowerPC to the new toolchain. 2001-11-04 01:36:18 +00:00
enami 97ab45c39d Don't try to build nonexistent compressed man page. 2001-11-04 00:30:52 +00:00
thorpej fd329b8dd0 Fix typo in previous. 2001-11-03 20:46:25 +00:00
thorpej b437f0975b Switch NetBSD/sparc to the new toolchain. 2001-11-03 20:26:56 +00:00
tv 0812154e48 Use INSTALL_FILE/INSTALL_DIR as appropriate. 2001-11-02 18:10:00 +00:00
simonb 7d1f940ec6 Set installed library mode correctly in UNPRIVILEGED case. 2001-11-02 07:25:58 +00:00
tv 1129ed4afe Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments.  The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ.  Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.
2001-11-02 05:21:47 +00:00
lukem 2d79659157 move -Wwrite-strings to WARNS=3 too ... (yech!) 2001-11-01 07:27:35 +00:00
lukem 0e643f61a5 Move -Wcast-qual from WARNS=2 to WARNS=3 (a new level), because it
generates too many false positives that require gross amounts of
workaround, and the other WARNS=2 stuff is quite useful. Per discussion
with simonb & christos.
2001-11-01 07:17:17 +00:00
tv a988fe0a8a Revert previous. src/include depends on the ability of <bsd.inc.mk> to
provide things to INCS with / in them.  Since nothing in-tree yet uses
INCS{DIR,NAME}_filename, this is not a loss at the moment.
2001-10-31 21:15:41 +00:00
tv 61be23b431 * Create a variable HOST_OSTYPE that represents the host build environment,
using `uname -s`-`uname -r`-`uname -p || uname -m`.  This can be overridden
  in mk.conf or the environment, and is used by host tools to ensure that
  build hosts do not clobber each other.

* Now that there's an objdir in src/tools, make a default TOOLDIR by creating
  "tools.${HOST_OSTYPE}" in the objdir (if it exists) of src/tools.  This
  means that TOOLDIR is no longer required to be set in a build, though it
  still may be set manually if desired.

* Set MKTOOLS to "yes" by default, since the default TOOLDIR is now located
  in a known mutable location.  This may still be set manually if desired.
2001-10-31 17:46:08 +00:00
tv abb4800606 Make REQUIRETOOLS work properly -- don't error if USE_NEW_TOOLCHAIN is
not set.  Also, nuke redundant USE_NEW_TOOLCHAIN check with USETOOLS.
2001-10-31 16:25:21 +00:00
tv 7d2258875d Use __curdir throughout, so MAKEOBJDIR builds see resolved paths in the
"foo -> bar" messages written to stdout.
2001-10-31 01:46:42 +00:00
wiz 59268f6553 Add support for INCSNAME and INCSNAME_<file> to bsd.inc.mk.
Same syntax as FILESNAME and FILESNAME_<file>, allows to install
includes under a different name.
Okay'd by christos.
2001-10-30 15:17:16 +00:00
jmc 83fb4943af already gets checked and prints out an error if it's used without
being set. You want to use it if USE_NEW_TOOLCHAIN is set and you're in
the source tree by default.
2001-10-28 02:03:00 +00:00
chs 3116cf32a9 if TOOLDIR is not defined, USETOOLS should default to "no",
since defaulting to "yes" will just give an error every time.
2001-10-28 00:52:41 +00:00
jmc bffc850001 Remove debug echo statement 2001-10-26 06:41:46 +00:00
jmc a414473103 Change the check for BSD_PKG_MK into something which looks to see if we're
running from inside of $BSDSRCDIR (recurse back and look for file/dir
signatures or reach /, whichever comes first).

Do it once and then pass the results to sub-makes.

Finally, if using the new toolchain and USETOOLS=yes check $TOOLDIR
before using it. Print an error message out if it's not set when expected
here.
2001-10-26 04:59:10 +00:00
bjh21 cb7676b0ab USE_NEW_TOOLCHAIN for ARM ELF platforms (just arm26), since the old toolchain
doesn't do ARM ELF at all.
2001-10-25 22:31:11 +00:00
nathanw 41ee0930b0 Don't explicitly set SHLIB_LDSTARTFILE and SHLIB_LDENDFILE for the
generic architecture case; this permits the later ELF clause to set
them properly for ELF platforms.

This will cause crtbeginS.o and crtendS.o to be included in shared
libraries built on all ELF platforms, not just alpha, mips, vax, and
sparc.
2001-10-25 19:32:15 +00:00
thorpej 083db732ee Sigh, back out previous -- it is necessary inorder for the depend
(and dependall) targets to work properly.

XXX THIS IS BROKEN.  It's highly questionalble that we should be applying
our .depend-generating rules to a host system -- the mkdep we currently
use assumes GCC.
2001-10-25 13:48:50 +00:00
thorpej 09dacf298e Oops, typo. 2001-10-25 07:47:18 +00:00
thorpej 9c77726ed1 Add an ASN1_COMPILE variable for that host tool. 2001-10-25 07:46:48 +00:00
thorpej 4cd6ce7ea8 Remove an unnecessary "CPPFLAGS=${HOST_CPPFLAGS}" -- the host tool
targets use HOST_CPPFLAGS exclusively, and keeping this assignment
can get us into some unfortuante recursion trouble.
2001-10-25 01:21:14 +00:00
thorpej 5717160d3a MDSETIMAGE gets a MACHINE_GNU_PLATFORM prefix. 2001-10-24 23:58:21 +00:00
thorpej bae67ac435 LINT needs a ${MACHINE_GNU_PLATFORM}- prefix now. 2001-10-24 02:34:33 +00:00
thorpej 3a01dbbe6c Quote the ${CC} provided to mkdep's environment. 2001-10-23 22:55:30 +00:00
thorpej 8f508df026 When setting MACHINE_GNU_PLATFORM for ARM ports, we need compare
MACHINE_GNU_ARCH (not MACHINE_ARCH) to "arm", otherwise the GNU
platform won't be set properly if OBJECT_FMT=ELF.
2001-10-23 17:15:21 +00:00
jmc a831891141 Pull in mdsetimage to the tools builds. (XXX - using libbfd here would
probably be preferrable long term).
2001-10-21 23:10:46 +00:00
jmc 910ace859f Pass ${.MAKE} to crunchgen so it uses the one for cross builds correctly 2001-10-21 23:08:59 +00:00
jmc 6289ed7a3e Change sets so the differing toolchain bits only (not the complete toolchain
at the moment) are pulled out into tc.mi and tc.old files.

tc.mi has any files which are in the new toolchain only and tc.old contains
the reverse (files which only existed in the old toolchain). The remainder
of the toolchain that is common between both old and new is still contained
in the various mi/md files.

Check for USE_NEW_TOOLCHAIN=yes in makeflist to determine which tc files to
pull in if they exist.

XXX - All the toolchain bits should eventually be pulled out into separate
lists as tc.mi and tc.<arch>. Leaving it for now until the new toolchain is
fully integrated on all ports.
2001-10-20 06:11:21 +00:00
jmc 37e7a6a0a9 Add mklocale to cross-tools and turn it back on for the builds. 2001-10-20 06:04:59 +00:00
tv 9bd7c9e744 Better version of previous. Use an .ifdef in this case, so the rule isn't
even defined without YHEADER.  (Otherwise can lead to odd behavior.)
2001-10-19 19:07:48 +00:00
tv 336a299fa4 Make sure .y.h rule knows what to do only if YHEADER is set. 2001-10-19 17:05:26 +00:00
tv 53aa2d95d7 Simplify many .if's by collapsing to make :D and :U conditionals. 2001-10-19 16:28:54 +00:00
tv 4a7f86b870 Simplify and collapse a lot of the gooey .l and .y handling cruft here.
Rather than special-case a bunch of stuff, make this always parallel-safe,
and have make call upon the .l.c/.y.c followed by .c.o/.c.lo transforms,
rather than try to go right from .l/.y to .o/.lo.
2001-10-19 16:15:40 +00:00
tv ccfbe64e81 Add .NOPATH for all files generated from .l or .y files in SRCS. Fixes PRs
bin/14187 and lib/14239.

Also simplify the handling of these transforms to .c and .h files a bit by
leveraging make's builtin macro operators.
2001-10-19 15:55:52 +00:00
jmc 1ea83aa531 Add crunchgen, msgc and menuc 2001-10-13 06:11:06 +00:00
jmc c55dbe210b Add MTREE var definition to list for sys.mk 2001-10-13 06:06:55 +00:00
enami a28fcd776c Make mtree a host tool and use it when appropriate. 2001-10-09 05:19:03 +00:00
mrg f650652253 use CC="${CC}" and NM="${NM}" so that, eg, "CC=cc -m64" works. 2001-10-08 10:01:35 +00:00
simonb 6247b48489 Use ${MACHINE_CPU} instead of ${MACHINE_ARCH} in the machine-links
target; needed for MIPS and probably arm ports.
.include the full path name of machine/Makefile.inc so that this works
  if the machine-links target hasn't been run yet.
.include ${MACHINE_CPU}/include/Makefile.inc too.
2001-10-05 15:30:06 +00:00
tv d1a2ff769a Make sure "clean" target is always defined, to compensate for cleandir
now being defined in terms of clean.
2001-10-04 16:29:54 +00:00
tv 4623186407 Make sure to define USETOOLS properly always (set it to "no" on systems
without USE_NEW_TOOLCHAIN).  This will allow conversion of in-tree
conditionals to use only USETOOLS....
2001-10-04 15:52:59 +00:00
jdolecek 20a3387bdb don't include explicit -e for modload in 'load' target - it's redundant
This addresses bin/4701 by Hauke Fath, but does opposite thing than
suggested there.
2001-09-29 20:10:07 +00:00
mrg f0cf28bfaa enable a toolchain for the sparc64. 2001-09-26 12:45:56 +00:00
tv 84a997640e Set .NOPATH on program to build to make sure it goes in .OBJDIR.
Problem noted by <seebs@plethora.net>.
2001-09-25 02:19:26 +00:00
tv 63e11416cf Add STRIP to the environment of binstall, to use proper strip at install
time.  Noted by <jepeway@blasted-health.com>.
2001-09-25 01:43:35 +00:00
tv e7bc3de221 Add mssed commit that sets USETOOLS=no if BSD_PKG_MK is set. Noted by erh. 2001-09-25 01:04:35 +00:00
lukem 13a5c8134c fix previous (hi thor!) - $OBJS and $CLEANFILES might be empty, and
rm needs some files to delete...
2001-09-24 09:18:05 +00:00
tls 38809e7a94 Split "cleanprog" target apart: now you can zap only object files or
CLEANFILES (needed to fix crunchgen lossage).
2001-09-24 01:04:32 +00:00
tv aea7f2e0d5 Move the definitions of host tools from Makefile.tools to <bsd.own.mk>.
Turn on USE_NEW_TOOLCHAIN explicitly on i386.  (See current-users or
tech-toolchain for the heads up announcement and tech details.)
2001-09-22 05:45:50 +00:00
tv cda4a8d07c The -m option is automatically propagated by make(1). Don't add yet more
(possibly wrong) `-m' options; this will only make MAKEFLAGS bigger and
bigger with each recursion.
2001-09-22 05:01:26 +00:00
tv 6abadb2b98 Allow for recursion speedups by predefining rules for large subtrees which
don't need to run a particular target (such as "includes-games" at top level,
or "includes-sushi" at share/).
2001-09-21 20:50:23 +00:00
tv b868449232 Since SHLIB_MAJOR may be set even in a MKPIC=no situation, make sure that
print-shlib-* targets only print stuff if MKPIC=yes.
2001-09-21 15:25:49 +00:00
tv e949020a8e If SHLIB_MAJOR is explicitly set in a Makefile, don't even look for a
shlib_version file.  (Part of a larger change which will also update
checkver to deal with this, and migrate old makefiles to include
SHLIB_MAJOR/SHLIB_MINOR.  For now, just add the hooks so that the old
gnu/lib toolchain libraries can use this as a workaround.)
2001-09-21 15:16:09 +00:00
mycroft 4a379469f5 Use -O2 on PowerPC. 2001-09-17 12:28:14 +00:00
chris a41363209a Arm doesn't do ELF by default yet. Should fix PR 13973. 2001-09-16 18:50:29 +00:00
thorpej 913b93d749 Add LIBPCI. 2001-09-13 23:23:26 +00:00
thomas d9203a217e On Atari now the default object format is ELF. 2001-09-08 11:10:41 +00:00
christos 10535336ed Add some more WARNS (commented out since they break things) 2001-09-08 01:00:44 +00:00
eeh 500082fdef Build lint on sparc64. 2001-08-26 06:00:30 +00:00
chs 7cffe4c898 switch cesfic to ELF. 2001-08-25 18:39:24 +00:00
mrg 665a4002a3 enable profile libraries on sparc64 2001-08-19 14:24:44 +00:00
tv 64263ab596 Revert previous temporarily to deal with PR bin/13722; will revisit this
(and close the PR) after I've located all of the uses of PRINTOBJDIR and
fixed them up not to bork themselves recursively.
2001-08-15 17:50:15 +00:00
tv 937e77aec5 Speed up PRINTOBJDIR a little by changing it to "${MAKE} -V .OBJDIR" (it
will recurse, but won't need to spawn a shell and run commands now).
2001-08-14 23:33:43 +00:00
tv f059974dc2 Add a HOST_CXX and HOST_CXXFLAGS (currently needed for compiling groff on
a cross host).
2001-08-14 11:55:04 +00:00
tv 58290cfc5d Change ROFF?= to be more like other utility macros; make this "groff -Tps"
by default.
2001-08-14 10:38:27 +00:00
tv 55e586472d Simplify some MACHINE_ARCH transforms, and redefine MACHINE_GNU_PLATFORM
as the full GNU triplet name.
2001-08-14 09:31:42 +00:00
tv 8bd89a86e7 Protect against multiple inclusion, and evaluate ${.CURDIR} early (to assist
the top-level toolchain bootstrap).
2001-08-14 09:30:48 +00:00
tv 73774cf454 On recursion, don't recurse "clean" if making "cleandir". (Related to
bsd.own.mk change that defined clean as a dependency of cleandir.)
2001-08-14 09:02:26 +00:00
tv dba7b8b6de Use GENCAT as a variable to determine the location of "gencat". 2001-08-14 08:28:24 +00:00
tv d0f9e45413 Rather than explicitly saying "clean cleandir:" all the time, make clean
a dependency of cleandir (so that "make cleandir" implies "make clean").
2001-08-14 07:02:13 +00:00
tv b2e42252e1 Simplify PRESERVE and INSTPRIV by using ${...:D...}. 2001-08-14 06:47:24 +00:00
tv c7dda8f2a7 Make MAKECONF defined always by setting MAKECONF?=/etc/mk.conf and using
that variable only for including make(1) variables.  Much more consistent
and less prone to ambiguity this way (and now, ${MAKECONF} can be used in
messages indicating a missing option needed for a build).
2001-08-14 05:55:27 +00:00
enami 086d34c97e Now that the makeinfo is quiet by default, don't suppress commmand line echo. 2001-08-02 05:42:56 +00:00
matt c944f94d86 MACHINE_ARCH=arm changes 2001-07-23 17:13:44 +00:00
matt a161d61e18 Make arm use -O2 2001-07-23 17:08:17 +00:00
bjh21 6c71fcb79a Since arm26 and arm32 are heading towards shared binaries, don't distinguish
them for the GNU tools.
2001-07-21 16:56:07 +00:00
bjh21 0d2f9028de arm26 uses ELF. 2001-07-21 16:48:49 +00:00
fredette 340af7db82 Added support for the m68000 MACHINE_ARCH, as an incomplete
ELF port with a MACHINE_CPU of m68k.
2001-07-13 12:44:22 +00:00
scw 3293e3a26c Check for MKSOFTFLOAT being defined before testing its value.
Needed for crunchgen(1) generated makefiles (e.g. miniroot builds).
2001-07-04 17:46:06 +00:00
eeh 3fa4c5f64b Tell the assembler to accept UltraSPARC extensions on sparc64. 2001-06-29 23:50:01 +00:00
wiz 3f9984fc90 `existent', not `existant' 2001-06-19 13:42:07 +00:00
fvdl 644b748282 Add some extra flags for the x86-64 port. Disable -O in sys.mk
(which is where all ports set it); there seem to be some lurking
optimization bugs for the x86-64.
2001-06-19 01:37:44 +00:00
simonb 3acd556b4d Add a new make variable "MKSOFTFLOAT". If not set to "no", it adds
"-msoft-float" to COPTS and FOPTS, and possibly builds soft-float
library support (port specific).
Defaults to "no".
2001-06-18 17:04:44 +00:00
mrg 97b5460add fail `make obj' if $BSDOBJDIR doesn't exist. fixes PR#12937. 2001-06-10 13:32:21 +00:00
mrg ef022c7570 redo the previous; allow SHLIB_LDSTARTFILE and SHLIB_LDENDFILE to be overridden. 2001-06-08 11:41:59 +00:00
mrg 6c81e0af9d set SHLIB_LDSTARTFILE and SHLIB_LDENDFILE based on ${LIBDIR} not hard coded
/usr/lib.
2001-06-07 15:28:55 +00:00
tv 08b1b0382d Fix typo. 2001-06-02 02:22:35 +00:00
tv ca502c58a6 Add MACHINE_GNU_PLATFORM to identify as "netbsdelf" for historically a.out
platforms.  While there, allow MACHINE_GNU_ARCH and MACHINE_CPU to be
inherited from the environment.
2001-06-02 01:53:29 +00:00
tv dd70bf30ad Make "distclean" a REAL synonym for "cleandir" by actually aliasing it
in <bsd.own.mk>, rather than sprinkling it in all the .mk files (and
some Makefiles throughout the tree).
2001-06-01 17:49:32 +00:00
simonb e0a2f60020 Update a comment about OBJECT_FMT - some m68k machines are ELF too. 2001-05-31 05:04:41 +00:00
sommerfeld c93ef42f8b Mark "dependall" rule with .MAKE since it invokes a sub-make. 2001-05-14 03:20:10 +00:00
chs bef49778fd next68k is now ELF. 2001-05-12 22:38:04 +00:00
sommerfeld 263f3e581d Suppress duplicate entries in ALLFILES, FILES, INCS, DEPINCS, INFOFILES,
NLSALL, CATPAGES, MANPAGES, HTMLPAGES, and SCRIPTS.
2001-05-08 03:19:51 +00:00
dmcmahill d425d2297d add support for building shared libs from fortran sources. Works correctly
with the default of 'f77' as the fortran compiler or using the 'f2c-f77'
script from pkgsrc (selected by overriding the FC variable)
2001-04-27 17:04:39 +00:00
simonb 0f020a8ccc Don't overwrite catman pages if there's no difference between the old
and the new pages.  As per discussion on tech-install (a little while
ago).
2001-03-21 04:04:15 +00:00
tsutsui b7e1b57d70 Switch news68k to ELF:
- Set OBJECT_FMT=ELF on news68k
2001-03-19 17:01:12 +00:00
cgd 2bfc706b3b "test !", rather than "! test". The former is more portable. 2001-03-11 07:32:31 +00:00
fair 8c43053c52 Add the following text to answer PR 10650:
LDSTATIC        Control program linking; if set blank, link everything
                dynamically. If set to "-static", link everything statically.
                If not set, programs link according to their makefile.
2001-03-10 11:00:37 +00:00
tron 148a50300a Back out last change as there is no measurable performance gain. 2001-03-05 14:17:06 +00:00
tron df07a57fe4 Invoke "groff" directly when building manual pages, "nroff" is just a
shell script wrapper. This saves at least one fork(2) and one exec(2)
while creating each manual page and should thus speed up builds.
2001-03-05 06:52:12 +00:00
msaitoh 636da14f06 NetBSD/sh3 ELF doesn't supports dynamic link yet. 2001-02-24 16:37:43 +00:00
chs 7408da7619 sun3 now uses ELF. 2001-02-22 07:12:55 +00:00
jmc 788f1c082f Wrap target() checks around afterdepend rule as some Makefiles override this 2001-02-19 07:56:14 +00:00
agc c05de915ca + clean up the English in one sentence
+ sync with reality, and document "MKMAN= no" in preference to "NOMAN= noman"
+ get in quick before the 80-column police notice what we were doing
+ spell "existence" correctly
2001-02-01 20:27:06 +00:00
itojun 6ecd41c538 add LOCALEDIR and related declarations. 2001-02-01 19:29:59 +00:00
itojun ccfc624fe0 fix typo in LIBSSL decl. it made programs with DPADD+=${LIBSSL} to build
every time we type "make".  From: bernd
2001-01-26 09:42:49 +00:00
itojun 9f845d90a1 note that MKNLS controls build of /usr/share/locale too 2001-01-24 07:57:07 +00:00
christos 1e8e6439aa use the new .if commands(<target>) directive so that we don't have to
change Makefiles.
2001-01-14 20:49:36 +00:00
christos c4a3a5ddb2 fix thinko: test for the existance of the target before we define it... 2001-01-14 09:53:57 +00:00
christos 89923c1ef5 Alter previous redefined target protection. If the ${PROG} target is defined,
add the dependencies as usual, but don't add the commands. This avoids
having to change all the Makefiles that redefine the PROG target.
2001-01-14 09:40:35 +00:00
christos 3769adf593 allow programs to override the program target. 2001-01-14 06:17:27 +00:00
sommerfeld e538aac13b Don't send .WAIT into the bitbucket 2001-01-09 02:08:32 +00:00
itojun 561c43d3fa use MACHINE_CPU=arm on both arm26/32. 2001-01-08 13:28:08 +00:00