⛏️ index : buildtools.git

author Oliver Tappe <zooey@hirschkaefer.de> 2011-11-12 19:15:07.0 +01:00:00
committer Oliver Tappe <zooey@hirschkaefer.de> 2011-11-12 19:15:07.0 +01:00:00
commit
5a389649c8203f9858dbb14d5df3d8e4d1acefe6 [patch]
tree
d5487af4622da2dff2c8519edc99e738b9870492
parent
17e8ac5852a4f399c2179b99819044140deb701a
download
5a389649c8203f9858dbb14d5df3d8e4d1acefe6.tar.gz

Drop obsolete documentation on building as cross compiler for BeOS



Diff

 INSTALL-as-beos-cross-compiler-on-LINUX | 81 --------------------------------------------------------------------------------
 1 file changed, 81 deletions(-)

diff --git a/INSTALL-as-beos-cross-compiler-on-LINUX b/INSTALL-as-beos-cross-compiler-on-LINUX
deleted file mode 100644
index 69f16c2..0000000 100644
--- a/INSTALL-as-beos-cross-compiler-on-LINUX
+++ /dev/null
@@ -1,81 +1,0 @@
How to build gcc-2.95.3 for BeOS under Linux (a cross-compiler), which 
will allow you to compile BeOS projects under Linux, i.e. the apps
that this compilers produces can only be executed on BeOS (not on Linux).

If all you are interested is compiling haiku on Linux, please refer to 
the file 'INSTALL-as-haiku-cross-compiler' instead (that's easier).

These instructions are required only if you want to compile something
(applications, libraries) on LINUX which should be executed on BeOS R5,
BONE or ZETA.

*** the major work of creating the cross-compiler and describing the
*** process how to build it has been done by Eric Petit <titer@m0k.org>, 
*** so if you think this cross-compiler is great, please tell him.

-----------------------------------------------------------------------
On your Linux-box, open a shell...

0 - Preparations
----------------
...and fetch the 'buildtools' module from the haiku SVN. You should then
have a 'buildtools' folder that contains folders named 'binutils' and
'gcc' (and this file, too!).

	cd buildtools/legacy

Now decide where you want to install the cross-compiler. The install 
folder will be referred to as $PREFIX. I suggest to install to 
/opt/cross-tools, but you can basically put it anywhere you like.

	export PREFIX=/opt/cross-tools

and add it the path:

	export PATH=$PATH:$PREFIX/bin

Create two folders for the headers and libraries, say $BEINC and
$BELIB:
	
	mkdir beinc
	export BEINC=$(pwd)/beinc
	mkdir belib
	export BELIB=$(pwd)/belib

Copy all contents from /boot/develop/lib/x86/ on your BeOS install to
$BELIBS on your Linux box (make sure symbolic links are followed). You
should have $BELIBS/libbe.so, etc.

Copy all contents from /boot/develop/headers/ on your BeOS install to
$BEINCS on your Linux box. You should have $BEINCS/be/AppKit.h, etc.


1 - Building binutils
---------------------
	mkdir binutils-obj
	cd binutils-obj
	CFLAGS="-O2" CXXFLAGS="-O2" ../binutils/configure --prefix=$PREFIX \
	--target=i586-pc-beos --disable-nls --enable-shared=yes
	make && make install
	cd ..

2 - Building gcc/g++
--------------------
	mkdir -p $PREFIX/lib/gcc-lib/i586-pc-beos/2.95.3-beos-041202
	mkdir gcc-obj
	cd gcc-obj
	CFLAGS="-O2" CXXFLAGS="-O2" ../gcc/configure --prefix=$PREFIX \
	--target=i586-pc-beos --disable-nls --enable-shared=yes \
	--enable-languages=c,c++ --with-headers=$BEINC --with-libs=$BELIB
	make cross && make install
	cd ..

Ok, now everything is compiled and installed, waiting to be used:

	i586-pc-beos-gcc test.c
	
would compile the file test.c with the fresh cross-compiler.

So have fun!

Please send questions & bug-reports to: Oliver Tappe <gcc@hirschkaefer.de>