[BACK]Return to README.mknative CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / tools / gdb

File: [cvs.NetBSD.org] / src / tools / gdb / README.mknative (download)

Revision 1.5, Mon Sep 26 02:36:19 2011 UTC (8 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb8-mediatek-base, matt-nb8-mediatek, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, agc-symver-base, agc-symver
Changes since 1.4: +4 -4 lines

mknative for gdb7

$NetBSD: README.mknative,v 1.5 2011/09/26 02:36:19 christos Exp $

This file describes how to use the cross-compiler to generate the
native files for GDB on a target platform.

NOTE:  DO NOT RUN "mknative" BY HAND!  It requires the Makefile in this
directory to set up certain environments first.

Since libc's features change over time, the config.h files can change as a
result; thus the instructions below are the same no matter whether
bootstrapping on a cross or native host.  This is important: even on a
"native" host, you should bootstrap the toolchain by building from an
up-to-date source tree to a $DESTDIR using the exact same instructions.

In these notes, MACHINE is the $MACHINE of the target.  These files can be
cross-generated.  Though a $MACHINE_ARCH all uses the same config files, you
must pick a specific $MACHINE so that building the requisite bits below will

1. Set MKMAINTAINERTOOLS=yes in mk.conf.  (Needed so that src/tools/gettext
   gets built, eliciting proper HAVE_*GETTEXT* defns in config.h files.)

2. Build and install a cross toolchain (via "build.sh -m MACHINE tools").

3. At top level, do "nbmake-MACHINE do-distrib-dirs obj includes".

4. In src/gnu/lib/crtstuff4 do "nbmake-MACHINE depend all install"

5. In src/lib/csu, src/gnu/lib/libgcc4, and src/lib, do
   "nbmake-MACHINE all install".

6. In src/tools/gdb, do "nbmake-MACHINE obj native-gdb".

   This will do a full configury in ${.OBJDIR}/.native that is a "Canadian"
   cross toolchain (--build reflects the host platform, but --host and
   --target are the target).  The result is a tree that would build a
   native-to-NetBSD GDB on a cross host, and mknative pulls glue data
   from this.

   NOTE: this step writes files under src/external/gpl3/gdb/bin/gdb, so you
   need to do it in a writable src tree!

7. Try out a full build using "nbmake-MACHINE" in
   src/external/gpl3/bin/gdb; the result should include a native GDB.

8. If all is well, commit the glue files and directories added to