forked from haiku/buildtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL-gcc2-from-source-Haiku
52 lines (40 loc) · 1.45 KB
/
INSTALL-gcc2-from-source-Haiku
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
How to build gcc-2.95.3 for BeOS:
cd into the buildtools/legacy folder
declare the current gcc-version-date like this:
export GCCDATE=100818
(just use the current date instead of '100818', ie. 'yymmdd')
If your GCC version includes new features, make sure you also alter the
version in gcc/gcc/version.c.
compile binutils:
mkdir binutils-obj
cd binutils-obj
LC_ALL=POSIX CFLAGS="-O2" CXXFLAGS="-O2" ../binutils/configure \
--prefix=/boot/develop/abi/x86/gcc2/tools/gcc-2.95.3-haiku-${GCCDATE} \
--disable-nls --enable-shared=yes
LC_ALL=POSIX make
cd ..
compile gcc:
mkdir gcc-obj
cd gcc-obj
LC_ALL=POSIX CFLAGS="-O2" CXXFLAGS="-O2" ../gcc/configure \
--prefix=/boot/develop/abi/x86/gcc2/tools/gcc-2.95.3-haiku-${GCCDATE} \
--disable-nls --enable-shared=yes --enable-languages=c,c++
LC_ALL=POSIX make bootstrap
# the above will fail when compiling builtinbuf.cc, but we can ignore that
# since it's trying to build libstdc++.so, which haiku provides anyway
cd ..
Ok, now everything is compiled and ready, waiting to be installed:
mkdir /boot/develop/abi/x86/gcc2/tools/gcc-2.95.3-haiku-${GCCDATE}
cd binutils-obj
make install
cd ..
cd gcc-obj
make install
cd ..
ln -sfn gcc-2.95.3-haiku-${GCCDATE} /boot/develop/abi/x86/gcc2/tools/current
To build the binutils HTML documentation (needed by the GCC2 package build
script):
cd binutils-obj
make install-html
cd ..
Please send questions & bug-reports to: Oliver Tappe <[email protected]>