From: Per Bothner Date: Fri, 21 Feb 1992 01:59:57 +0000 (+0000) Subject: * Makefile.in: Change mkscript rule into one for ./mkscript X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=573da2f371655db279fe819e0ef555d203b4a9d8;p=binutils-gdb.git * Makefile.in: Change mkscript rule into one for ./mkscript (for the sake of makes that don't realize they're the same). * PORTING: Add more details. * genscripts.sh: Add more tailorability of DATA_ALIGNMENT. --- diff --git a/ld/PORTING b/ld/PORTING index 706172b8f0c..8f4125c9758 100644 --- a/ld/PORTING +++ b/ld/PORTING @@ -1,26 +1,105 @@ -Some incomplete notes about porting GNU ld ------------------------------------------ + Preliminary Notes on Porting GNU ld + ----------------------------------- -Before porting ld itself, you will need to port the BFD library. +Before porting ld itself, you will need to port the BFD library; +see ../bfd/PORTING. -We tarlk about the 'host' system as the machine and software -nevironment where ld runs (generates an execuitble *on*), -while the 'target' is the machine ld generates an executable *for*. +The 'host' is the system a tool runs *on*. +The 'target' is the system a tool runs *for*, i.e. +a tool can read/write the binaries of the target. Most often, host==target, but ld supports cross-linking (and to some extent the same ld binary can be used a linker for multiple target rachitectures). -Doing a 'host' port means working around broken or missing -include files or libraries. ... +Porting to a new host +--------------------- +Pick a name for your host. Call that . +You need to create the file config/mh-. Porting to a new target ----------------------- +Pick a name for your target. Call that . +You need to create at least config/mt-. +It should contain + EMUL= +An controls the "personality" of ld, +such as the default linker script. Usually, the + will have teh same name as the , +and you will need to create a new (see below). -Writing a new script script ---------------------------- +You will also need to edit Makefile.in and possible configure.in. +To see how to do that, search for existing examples (e.g. sun3, +sun4, hp300bsd). + +Porting to a new emulation target +--------------------------------- +Pick a name for your target. Call that . +Usually, and are the same. +You need to create at least .sh. +You will also need to edit Makefile.in, +To see how to do that, search for existing examples. + +The file .sh defines a set of parameter that +are used to generate the emulation. Its syntax is that +of a (Bourne) shell script, and it is "sourced" by genscripts.sh. + +Writing +---------------------- + +Usually, .sh contains: + EMULATION_NAME= + SCRIPT_NAME=