From 157d54ca274d23fac44b640760bb0a574b5d3f63 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 31 May 2020 12:41:36 -0400 Subject: [PATCH] Cross-compiling doc update --- Cross-compiling | 56 ++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/Cross-compiling b/Cross-compiling index ac7bd40db..e0f6df401 100644 --- a/Cross-compiling +++ b/Cross-compiling @@ -1,4 +1,4 @@ -Cross-compiling NetHack 3.7 Last edit: December 1, 2019 +Cross-compiling NetHack 3.7 Last edit: May 31, 2020 The NetHack 3.7 build process differs from the build process of previous versions in some important ways that make it possible to use a cross-compiler @@ -279,19 +279,22 @@ On the HOST, here are the mandatory things that have to be built. as native HOST-side obj files in order to build the native HOST utility 'makedefs' HOST utility above, and you don't need to compile them again for use in linking other HOST utilities if the HOST-native obj files - produced from them are still around. + produced from them are still around. + + NOTE: There are some source files that need to be compiled for linking + into utilities that are needed on the HOST side, but that are also + needed again later as TARGET obj files for linking into the TARGET + executable, and therefore must be compiled twice. + They include: src/drawing.c, src/objects.c, src/monst.c, + src/alloc.c, util/panic.c. It is important to keep the compiled + HOST-side obj files produced by the HOST native compiler distinct from + the TARGET-side obj files produced by the cross-compiler. That can be + accomplished either by naming the generated object files a little + differently (perhaps with a suffix) between the HOST-side and the + TARGET-side, or by placing the HOST-side obj files and the TARGET-side + obj files into distinct, different directories during the build process. + Use whatever method works best for your cross-compile effort and tools. - NOTE: Other source files (src/drawing.c) that need to - be compiled for native HOST utilities, also need to be compiled again - later as TARGET obj files for linking into the TARGET executable. It is - important to keep the compiled HOST-side obj files produced by the HOST - native compiler, and the TARGET-side obj files produced by the - cross-compiler separate and distinct from one another. That can be done - either by naming the differing object files a little differently - (perhaps with a suffix), or by placing the HOST-side obj files and the - TARGET-side obj files into different folders during the build process. - Whatever works best for your cross-compile. - util/dlb from sources: src/dlb.c, src/dlb_main.c, src/alloc.c, @@ -356,23 +359,24 @@ Using the cross-compiler, build the following targets: -DCROSSCOMPILE and -DCROSSCOMPILE_TARGET core sources (2019): src/allmain.c, src/alloc.c, src/apply.c, - src/artifact.c, src/attrib.c, src/ball.c, src/bones.c, - src/botl.c, src/cmd.c, src/dbridge.c, src/decl.c, - src/detect.c, src/dig.c, src/display.c, src/dlb.c, - src/do.c, src/do_name.c, src/do_wear.c, src/dog.c, - src/dogmove.c, src/dokick.c, src/dothrow.c, - src/drawing.c, src/dungeon.c, src/eat.c, src/end.c, - src/engrave.c, src/exper.c, src/explode.c, - src/extralev.c, src/files.c, src/fountain.c, - src/hack.c, src/hacklib.c, src/insight.c, - src/invent.c, src/isaac64.c, + src/artifact.c, src/attrib.c, src/ball.c, + src/bones.c, src/botl.c, src/cmd.c, src/dbridge.c, + src/decl.c, src/detect.c, src/dig.c, src/display.c, + src/dlb.c, src/do.c, src/do_name.c, src/do_wear.c, + src/dog.c, src/dogmove.c, src/dokick.c, + src/dothrow.c, src/drawing.c, src/dungeon.c, + src/eat.c, src/end.c, src/engrave.c, src/exper.c, + src/explode.c, src/extralev.c, src/files.c, + src/fountain.c, src/hack.c, src/hacklib.c, + src/insight.c, src/invent.c, src/isaac64.c, src/light.c, src/lock.c, src/mail.c, src/makemon.c, src/mapglyph.c, src/mcastu.c, src/mdlib.c, src/mhitm.c, src/mhitu.c, src/minion.c, src/mklev.c, src/mkmap.c, src/mkmaze.c, src/mkobj.c, - src/mkroom.c, src/mon.c, src/mondata.c, src/monmove.c, - src/monst.c, src/mplayer.c, src/mthrowu.c, src/muse.c, - src/music.c, src/nhlsel.c, src/nhlua.c, src/nhlobj.c, + src/mkroom.c, src/mon.c, src/mondata.c, + src/monmove.c, src/monst.c, src/mplayer.c, + src/mthrowu.c, src/muse.c, src/music.c, + src/nhlsel.c, src/nhlua.c, src/nhlobj.c, src/o_init.c, src/objects.c, src/objnam.c, src/options.c, src/pager.c, src/pickup.c, src/pline.c, src/polyself.c, src/potion.c,