Commit Graph

333 Commits

Author SHA1 Message Date
christos b024767c0c Fix _HOST_CYGWIN lossage. 2003-05-08 20:39:00 +00:00
salo 1b089357bd Whitespace. 2003-05-08 18:59:06 +00:00
christos 61987b916a Deal with CYGWIN's sh screwage. 2003-05-08 13:02:09 +00:00
scw ee96a063f1 Build shared libraries by default on sh5. They seem stable enough now. 2003-04-29 14:59:02 +00:00
fvdl ee5c723638 Correct previous. MACHINE is amd64. MACHINE_ARCH is x86_64. 2003-04-27 10:15:01 +00:00
tron ef4a5d5fc9 x86_64 -> amd64 2003-04-27 10:10:28 +00:00
thorpej 9d788d6da1 Provide the MKPICLIB value in bsd.own.mk, rather than bsd.lib.mk. It
is sometimes necessary for non-library Makefiles to determine if _pic
libraries are being built.

Problem pointed out by Havard Eidnes.
2003-04-11 22:40:31 +00:00
pooka d223236902 add file as a host tool 2003-03-25 23:35:48 +00:00
thorpej b48666e01a Add a HEXDUMP host tool. 2003-03-07 01:21:56 +00:00
lukem 144b55005f Rework METALOG manipulation:
- add '-D ${DESTDIR}' to INSTPRIV, so install(8) removes the leading
  ${DESTDIR} from the metalogged path
- provide ${METADB.add} variable (for "${CAT} -l >> ${METALOG}"), to make
  it easier to replace manual metalog manipulation in the future.
- with manual metalog additions, don't add the leading ${DESTDIR} in the path
- in maketars, use "mtree -C ..." instead of
  "mtree -D ... | sed -e 's,\(.*\) \(\..*\),\2 \1,";

Benefits:
- maketars "Parsing METALOG" step speeds up from 29 seconds to 1.2 seconds
  on a P3-600.
  (This also benefits "make installworld" at the top level.)
- ${DESTDIR}/METALOG is easier to read without the leading "${DESTDIR}"
  on all the pathnames, and it's smaller as well.
2002-12-23 06:52:48 +00:00
lukem 1bf2d8180e Only set INSTPRIV?= if "inside" a NetBSD src tree (i.e, ${_SRC_TOP_} != "").
Fixes a problem found by Andrew Brown where programs outside of the NetBSD
src that use the /usr/share/mk framework (such as pkgsrc/pkgtools/digest)
couldn't be installed if /usr/src/etc wasn't present.
2002-12-23 02:23:57 +00:00
lukem 4234e2eefe correct a comment 2002-12-23 02:01:29 +00:00
lukem 7805822da2 Add "-N ${NETBSDSRCDIR}/etc" to ${INSTPRIV}, so that non-host ${INSTALL_*}
rules use that directory to lookup users & groups as opposed to the
host system's passwd(5) and group(5) databases.

This is a change of behaviour which should make the build system more
robust when new users & groups are added to the NetBSD source.

The only users who may be adversely affected are those (small number,
if any) that renumber the uids & gids away from the "standard" NetBSD
ones; in this case said users should maintain local mods to
${NETBSDSRCDIR}/etc/{master.passwd,group} ...
2002-12-19 12:44:03 +00:00
thorpej c4a72b6436 Centralize the definition of the tool name prefix (i.e. "nb") into
bsd.own.mk, as the _TOOL_PREFIX variable.
2002-12-08 20:19:56 +00:00
lukem 9145235642 Deprecate SYS_INCLUDE and the optional SYS_INCLUDE=symlinks functionality,
and only support the "copies" default.
Per discussion on tech-userlevel@.
2002-11-26 23:15:53 +00:00
thorpej 16f21f8705 * If EXTERNAL_TOOLCHAIN is defined, consider it to be the root of
where the GNU tools are found, e.g. ${EXTERNAL_TOOLCHAIN}/bin/...
* Allow MACHINE_GNU_PLATFORM to be set in mk.conf.
2002-11-26 19:51:16 +00:00
thorpej e4637c735b sh64 -> sh5, which matches the names that the NetBSD-targeted GNU
toolchain uses for 32-bit SH5.  OK'd by steve.
2002-11-26 19:30:13 +00:00
perry 8885724457 Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.
2002-10-22 18:48:27 +00:00
thorpej 09a0767aa9 Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.

The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.

This is done by decoupling where a shlib is installed from how it
is located.  Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only.  SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.

The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.
2002-09-27 21:37:50 +00:00
thorpej 0f181e084a Back out previous; it was incomplete. 2002-09-27 17:03:08 +00:00
thorpej 6a244932ed Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.

The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.
2002-09-27 15:56:39 +00:00
itojun d24389cf67 MDC2 is a patented algorithm; don't ship it in default libcrypto.
MKCRYPTO_MDC2 will build a separate library, libcrypto_mdc2.
2002-09-26 13:05:54 +00:00
lukem 2f7d49d929 Enable MKDYNAMICROOT=yes by default.
This means that:
    +	/bin and /sbin (and the few programs in /usr/* which were statically
	linked) are now dynamically linked.
    +	The shared libraries that are needed by the /bin and /sbin programs
	are now installed into /lib (with compatability symlinks from
	/usr/lib).  These are:
		c crypt edit ipsec kvm m m387 termcap termlib util z
    +	The shared linker is now in /libexec/ld.elf_so, and
	/usr/libexec/ld.elf_so is a symlink to the former.

If you want the prior behaviour of "some applications statically linked,
the rest dynamically linked", set MKDYNAMICROOT=no in your mk.conf(5).

If you have a philosophical objection to dynamic libraries, continue
to set LDSTATIC=-static in your mk.conf(5), and please don't waste any
more time in trying to convince us why dynamic libraries are 3v1l.
2002-09-22 15:08:17 +00:00
thorpej 3b08abd277 * Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:

  TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
  no working in-tree toolchain (hppa, ns32k, sh5, x86_64).

  EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
  an external toolchain (e.g. /usr/local/gnu).  This enables the cross-build
  framework even for TOOLCHAIN_MISSING platforms.

  If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
  unconditionally set to "no", since the bits are not there to build.

  If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
  since the external toolchain's compiler is not in-sync with the
  in-tree compiler support components (e.g. libgcc).

* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
  that file can use it.
2002-09-17 23:18:25 +00:00
thorpej 2f50b4a3fb No longer have to invoke lorder with the shell explicitly; the host
tool is patched to use the working shell as the interpreter.
2002-09-15 17:07:14 +00:00
thorpej 5d0c1f4d8b * Add MKTEMP as a host tool.
* Pass MKTEMP to lorder, and invoke lorder with sh.
2002-09-14 05:01:45 +00:00
lukem 08e7e88032 In the MKDYNAMICROOT==yes case, move the shared linker from /lib/ld.elf_so to
/libexec/ld.elf_so.  Per discussion with a few other developers.
2002-08-28 09:57:10 +00:00
lukem ed401558f2 Implement MKDYNAMICROOT, which currently defaults to "no", but will
be changed in the future to "yes".

If MKDYNAMICROOT == "no", there is no change from existing behaviour
of a static /bin and /sbin (and a few programs in elsewhere).

If MKDYNAMICROOT == "yes", the following changes occur:
    in <bsd.own.mk>:
	SHLIBDIR?=     /lib
	SHLINKDIR?=	/lib
    in various Makefiles, the following entry is DISABLED.
	LDSTATIC?=-static
This results in all programs (except those "standalone" programs built
in sys/arch/*/stand) are linked dynamically, the shared linker is moved
from /usr/libexec to /lib (with a compat symlink), and the shared
libraries used by /bin and /sbin programs are moved from /usr/lib to
/lib (with compat symlinks).
2002-08-27 14:46:11 +00:00
chris 07bc5d7a16 Default cats to using X 4.
Also correct macppc entry while here.
2002-08-03 22:10:07 +00:00
mycroft 6b3df890c5 USE_XF86_4 on macppc. 2002-07-17 20:02:15 +00:00
fredette f53ba8285a Now build profiled libraries on m68000. 2002-07-17 18:46:12 +00:00
scw cad6d3b034 Add MKBFD=no for SH5. 2002-07-11 15:30:03 +00:00
scw 8debe49965 SH5 Makefile Magic. 2002-07-11 15:00:57 +00:00
tron 2bd3a8cf3c Use XFree86 4.x by default on i386 and x86_64.
This change was approved by Frank van der Linden.
2002-07-03 11:51:34 +00:00
fredette fbd75fdec9 Enabled building PIC on hppa. Also don't use a --netbsdelf GNU target name. 2002-07-01 19:31:12 +00:00
mason 7e7e806c7e Add cat(1) as a host tool. 2002-06-10 18:32:28 +00:00
fredette 964be1b6b3 Add cases for hppa. 2002-06-10 14:14:47 +00:00
thorpej 055791361b Some changes to facilitate fixing the toolchain issue on ns32k:
* Don't make OBJECT_FMT dependent on USE_NEW_TOOLCHAIN.  All ports
  except ns32k are ELF, so set it appropriately.  Allow it to be
  overridden in the ns32k case.
* If ns32k && USE_NEW_TOOLCHAIN, don't build shared libraries, because
  external toolchains don't support them for our a.out.
* If ns32k && OBJECT_FMT == ELF, the GNU platform is "netbsdelf".
* If ns32k && USE_NEW_TOOLCHAIN, don't attempt to build the in-tree
  binutils 2.11.2, gdb 5.0, or gcc 2.95.3.

This allows us to do USE_NEW_TOOLCHAIN cross-builds to ns32k using
an external toolchain.
2002-06-05 02:42:09 +00:00
bjh21 bf9ec67e38 Add fgen as a host tool, used for sys/arch/sparc/bootblk. 2002-05-28 21:56:05 +00:00
thorpej 0ee3170e4d Add cases for "armeb" (big-endian ARM). 2002-05-20 14:34:07 +00:00
lukem 2ba24b706f remove now-unnecessary SPARCINSTALLBOOT 2002-05-07 12:13:54 +00:00
kleink 98807c1129 Add PREPMKBOOTIMAGE. 2002-05-03 20:38:42 +00:00
lukem d918d8f74f Move the METALOG from ${_SRC_TOP_OBJ_} to ${DESTDIR}.
There were too many synchronisation problems with using the former;
including situations such as a "make clean" performed between two
installs to the same DESTDIR would result in a truncated METALOG and
the resultant sets would be missing stuff such as include files that
don't get reinstalled if they haven't changed, even with !UPDATE.
2002-05-03 08:58:45 +00:00
wiz 61f5aedc2a sh3e[bl] uses new toolchain, so remove an .elsif that doesn't make sense
anymore.
2002-04-29 19:27:07 +00:00
groo d11fdcc492 Complete the switch to NEW_TOOLCHAIN for sh3e[lb]. 2002-04-26 19:16:04 +00:00
lukem 82172c42f6 Implement NETBSDSRCDIR, which is the top level of the NetBSD source tree.
Defaults to the directory determined by the _SRC_TOP_ logic (if != ""),
and the BSDSRCDIR.

NETBSDSRCDIR has been provided for use by the various NetBSD source
Makefiles to find the top of the NetBSD source tree, and isn't
affected by the inheritance properties of _SRC_TOP_, nor does it
have the magic BSDOBJDIR baggage that BSDSRCDIR is stuck with.
2002-04-26 15:02:02 +00:00
lukem 46569c985e Revert part of previous; don't set _SRC_TOP_ to BSDSRCDIR if it can't be
determined, since BSDSRCDIR's default of /usr/src might not exist and the
calculation of _SRC_TOP_OBJ_ would then generate a warning :-(.
_SRC_TOP_ can now == "" if make(1) (or a parent make(1)) was started
outside of the NetBSD source tree.

Now, if _SRC_TOP_ != "",  BSDSRCDIR defaults to ${_SRC_TOP_} and
BSDOBJDIR defaults to the objdir of ${BSDSRCDIR}.

Failsafe defaults for BSDSRCDIR (/usr/src) and BSDOBJDIR (/usr/obj)
are provided later in the file.

This should result in a usable BSDSRCDIR default (i.e, _SRC_TOP_ if
running from within the source tree), with safe fallbacks as appropriate
(/usr/src, as always), meaning that BSDSRCDIR should be able to be used
instead of _SRC_TOP_ in the source tree, although I need to carefully
test this.  *aaaiiiieeee!!!*.  (Now I understand some of Todd's pain :)
2002-04-26 14:27:23 +00:00
lukem 756722c3c1 Overhaul how _SRC_TOP_ is determined, ensuring that it will be set to
${BSDSRCDIR} if make(1) is running outside of the NetBSD source tree.
This should solve various issues, including building xsrc which uses
${BSDSRCDIR}/distrib/sets/maketars.
2002-04-23 07:20:22 +00:00
lukem 987817d952 add ELF2ECOFF 2002-04-12 05:08:53 +00:00
lukem 0476c683f0 replace BSDSRCDIR with _SRC_TOP_, since the latter is more likely to
be "accurate".  document _SRC_TOP_.
2002-04-10 15:05:41 +00:00