From: "pasha (biblio)" <pa...@bell01.com> --- microkernel/mach/mig/gnu_mig/building.mdwn | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/microkernel/mach/mig/gnu_mig/building.mdwn b/microkernel/mach/mig/gnu_mig/building.mdwn index f335aa73..8f919aa7 100644 --- a/microkernel/mach/mig/gnu_mig/building.mdwn +++ b/microkernel/mach/mig/gnu_mig/building.mdwn @@ -84,7 +84,7 @@ configure: $ GNU=~/gnu $ TARGET_CPPFLAGS=-I"$GNU"/include ../configure --prefix="$GNU" -If you are building on a 64 bit machine, you need to add a --target option: +If you want to build 32-bit gnumach on a 64-bit machine, you need to add --target option (i686-gnu or i686-linux-gnu). mig(com) will be build as ELF64 binary, but it will generate 32-bit code for gnumach: $ GNU=~/gnu $ TARGET_CPPFLAGS=-I"$GNU"/include ../configure --prefix="$GNU" --target=i686-gnu TARGET_CC=i686-linux-gnu-gcc @@ -93,6 +93,11 @@ Build and install the Mach Interface Generator into _$GNU_ (i.e. _~/gnu/_ in our $ make all install +In case of --target 32-bit, mig might be installed as i686-(linux)-gnu-mig. Create a symbolic link for mig: + + $ cd ~/gnu/bin/ + $ ln -s i686-linux-gnu-mig mig + To make your _mig_ binary easily available, you should append something like the following to e.g. your _~/.bash\_profile_: @@ -102,3 +107,12 @@ the following to e.g. your _~/.bash\_profile_: If you already have e.g. _~/bin_ in your _$PATH_, you could also create a symbolic link: $ ln -s ~/gnu/bin/mig ~/bin/ + +For advance users, if you want to build mig(com) as ELF32 binary to copy to a 32-bit machine or any other purposes, you need to add --host, LD, CC options: + + $ TARGET_CPPFLAGS=-I"$GNU"/include ../configure --prefix="$GNU" --target=i686-linux-gnu TARGET_CC=i686-linux-gnu-gcc \ + --host=i686-gnu LD=i686-linux-gnu-ld CC=i686-linux-gnu-gcc + +You may verify using: + + $ readelf -h ~/gnu/libexec/i686-linux-gnu-migcom -- 2.39.2