[go: up one dir, main page]

Menu

[3a25fb]: / Install.txt  Maximize  Restore  History

Download this file

78 lines (45 with data), 1.8 kB

 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Portable Object Compiler (c) 1997-2021 All Rights Reserved.
For help, send email to me: stes@telenet.be
0. Get flex and byacc if you don't have them :
for FLEX (for example flex 2.5.4) :
http://www.gnu.org/
for BSD yacc (for example yacc-1.9.1) :
http://www.ibiblio.org/pub/Linux/devel/compiler-tools/
It is possible to use myacc or bison :
export YACC="bison -y -d"
but I recommend the byacc package (see Changes.txt for some subtle issues)
1. Start with a binary "port" of Portable Object Compiler to get a "bootstrap" (initial) compiler, or compile the bootstrap compiler package :
gnutar xvfz objc-2.3.1-bootstrap.tar.gz
cd objc-2.3.1-bootstrap
./configure --help
./configure --prefix=$HOME
make
make install
It is important to use the --prefix option if you want to install the compiler in a directory like $HOME/bin. The default (if no --prefix is specified) is to install into /usr/local/bin,/usr/local/include,/usr/local/man etc.
The configure script has to find a C compiler for all this to work.
You may have to set the CC variable to prevent 'gcc' from being used :
e.g. on HP-UX,
CC='cc -Aa'
export CC
./configure --prefix=$HOME
or on IRIX,
CC='cc -ansi -common'
export CC
./configure --prefix=$HOME
or on Digital Unix,
CC='cc -std'
export CC
./configure --prefix=$HOME
Other settings for CC can be "clang" or "icc".
2. Make sure that the bootstrap compiler (objc) is in the PATH :
PATH="$PATH:$HOME/bin";export PATH
or
setenv PATH "$PATH:$HOME/bin"
3. After step 2 (set the PATH !), go to the actual compiler sources :
gnutar xvfz objc-2.3.1.tar.gz
cd objc-2.3.1
./configure --help
./configure --prefix=$HOME
make
make install
4. [Optional] Repeat step 3 to test the compiler (do not repeat step 1).