Commit Graph

35 Commits

Author SHA1 Message Date
mrg ecc90aa046 make all sun2 use -O0 and move most of the hacks out into just 3 files. 2008-02-09 02:37:21 +00:00
lukem 986979b8c9 Consistently check ${TOOLCHAIN_MISSING} against "no". 2004-01-03 14:04:27 +00:00
mrg ce29aa2370 build lib{opcodes,bfd,iberty} back in gnu/lib instead of gnu/usr.bin/binutils
as they are needed earlier than when gnu/usr.bin/binutils is built when
"make -j" is used.
2003-12-04 09:29:31 +00:00
mrg d2f6146b45 find libraries etc in a binutils 2.14 world. 2003-11-27 14:36:45 +00:00
mrg 00b48119d0 XXX: build mdsetimage.c / installboot/ffs.c with -O0 on sun2 as GCC3
barfs on these for now.
2003-10-28 08:21:26 +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 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
thorpej 590fe82698 Use MKPICLIB to determine if we should have a dependency on the .a or
_pic.a version of the library.
2003-04-11 22:46:02 +00:00
thorpej 9c04149fde If ${MKPIC} is not "no", then depend on the _pic versions of libbfd
and libopcodes.  Otherwise, depend on the regular library.
2003-04-09 22:38:24 +00:00
thorpej 40543d7e0e Go back to using bfd_{get,put}_32() for now. 2003-03-06 00:31:41 +00:00
dogcow dd911e8f5d Reworked the bfd accesses to use the documented interfaces.
Also, use the file offsets for direct reading/writing, rather
than going through poorly-documented bfd internal magic.
2003-03-04 12:16:41 +00:00
dogcow 12931a397c change bfd_close -> bfd_close_all_done, as to discard any changes libbfd
thinks may have been made to the object file during symbol groveling.
2003-03-04 08:32:58 +00:00
wiz dcc8010de1 ANSIfy, de-__P, complete sync of usage with man page. 2002-09-27 07:28:18 +00:00
wiz 9e9685df35 Sync usage with man page. 2002-09-27 07:25:17 +00:00
wiz fefd5e68e0 Bump date for -x addition. Sort options in usage. 2002-09-27 07:25:07 +00:00
dbj 2cbb8bc3bf add the -x option to extract the filesystem image from the kernel 2002-09-26 10:40:59 +00:00
lukem 0ac69ffac4 - use NETBSDSRCDIR as appropriate
- makefile lint (moving NOxx to top of file,
  include <bsd.own.mk> as necessary, ...)
2002-09-19 03:09:31 +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 4b7235a207 bfd_vms is not a pointer type, so use 0 instead of NULL. 2002-09-13 15:29:08 +00:00
thorpej ecfc315cde Always build this if a HOSTPROG (MKBFD only affects native progs). 2002-05-09 17:12:36 +00:00
mrg eff7936f87 include <string.h> as necessary. 2002-03-02 12:21:14 +00:00
wiz 4da241dfa0 Whitespace nits. 2002-02-23 17:01:20 +00:00
thorpej 2365d7ec78 Add a '-s' option which will cause mdsetimage to write back the
actual image size copied back into the kernel.
2002-02-23 02:30:37 +00:00
tv 9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +00:00
tv a328e34106 Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
2002-01-29 10:20:28 +00:00
tron cb9b650951 Define "HAVE_ERR_H" to fix native build. 2002-01-22 13:50:53 +00:00
tv 5c99654526 Add hooks for cross-hosting on non-NetBSD platforms. 2002-01-21 19:22:53 +00:00
cgd 6d4088dbde Convert this code to use read/write rather than mmap followed by read
into the mmap'd region.  (reviewed by thorpej.)

This is done to facilitate use as a host tool on not-necessarily-NetBSD
host systems.  Specifically, it works around problems discovered on
linux (mostly tested on 2.4.2-smp / RH 7.1, but also seen on other
variants) in which mmap(...MAP_SHARED...) on NFS files doesn't work
properly:

74 [hardy] RAMDISK.EB % uname -a
Linux hardy 2.4.2-2smp #1 SMP Sun Apr 8 20:21:34 EDT 2001 i686 unknown
75 [hardy] RAMDISK.EB % cat /etc/issue

Red Hat Linux release 7.1 (Seawolf)
Kernel 2.4.2-2smp on a 2-processor i686

76 [hardy] RAMDISK.EB % df .
Filesystem           1k-blocks      Used Available Use% Mounted on
fs:/home/cgd
                     104857600  98764968   6092632  95% /home/cgd
77 [hardy] RAMDISK.EB % date ; md5sum netbsd
Thu Dec 27 17:31:41 PST 2001
a1f35f085f130983892933df92d23be4  netbsd
78 [hardy] RAMDISK.EB % nbmdsetimage netbsd ~/proj-local/rd
79 [hardy] RAMDISK.EB % date ; md5sum netbsd
Thu Dec 27 17:31:49 PST 2001
740cbfb0a8432b7d3a6bf3421655e270  netbsd
80 [hardy] RAMDISK.EB % date ; md5sum netbsd
Thu Dec 27 17:31:51 PST 2001
a8c60aae879ead6893f074e83c23d70a  netbsd
81 [hardy] RAMDISK.EB % date ; md5sum netbsd
Thu Dec 27 17:31:54 PST 2001
a8c60aae879ead6893f074e83c23d70a  netbsd
82 [hardy] RAMDISK.EB % date ; md5sum netbsd
Thu Dec 27 17:31:55 PST 2001
a1f35f085f130983892933df92d23be4  netbsd
83 [hardy] RAMDISK.EB % date ; md5sum netbsd
Thu Dec 27 17:31:57 PST 2001
a1f35f085f130983892933df92d23be4  netbsd
84 [hardy] RAMDISK.EB %

("isn't that cool?")
2002-01-03 06:21:47 +00:00
thorpej 89b1a9ca73 Introduce 3 new MK* variables that have effect in the USE_NEW_TOOLCHAIN
case:

	MKBFD	If set to "no", disables building of libbfd, libiberty,
		and all things that depend on them (binutils/gas/ld, gdb,
		dbsym, mdsetimage).

	MKGDB	If set to "no", disables bulding of gdb.

	MKGCC	If set to "no", disables building of gcc and the
		gcc-related libraries (libg2c, libgcc, libobjc, libstdc++).

These are useful for building platforms for which either of the following
situations are true:

	(1) You have no userland from which to run toolchain2netbsd
	    in order to build the appropriate toolchain build framework.

	(2) The platform which you are building requires a newer set
	    of tools than are currently in the tree (e.g. x86-64, ia64).
2001-12-31 23:04:11 +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
thorpej f2cc4f7bb2 Give the host tool build more control over the HOST_CPPFLAGS. 2001-10-25 02:37:18 +00:00
thorpej e46fa74fd3 Add support for building as a target-prefixed cross-tool from src/tools. 2001-10-24 23:56:38 +00:00
simonb ced4db818c Bah, move ".include <bsd.own.mk>" to before USE_NEW_TOOLCHAIN check. 2001-10-22 03:31:41 +00:00
simonb 83a2424500 Add a Makefile for mdsetimage that tries to do the new/old toolchain
dance to get to libbfd.  Tested on new and old toolchain, makefile
messiness to be verified before being enabled.
2001-10-22 03:23:00 +00:00
simonb ad8890a6fa Add the bfd-mdsetimage pkgsrc version of mdsetimage - this is Chris
Demetriou's origianal mdsetimage with modifications by Kazuki Sakamoto
to use libbfd.  It lives in gnusrc because libbfd is GPL, not LGPL.
2001-10-22 03:19:29 +00:00