-
Notifications
You must be signed in to change notification settings - Fork 54
/
README.Linux-PPC
78 lines (63 loc) · 3 KB
/
README.Linux-PPC
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
NOTE: we do not know if the Linux/PPC port has been tested since 1998.
----------------------------------------------------------------------
Mercury should build "out-of-the-box" on Linux for PPC.
Thanks to Robert A. Abernathy for his help with this port.
You will need to use a recent release of gcc which supports global
register variables for this configuration - gcc 2.8.0 seems to
work fine, whereas gcc 2.7.2 doesn't. Global register variables
allow considerably more efficient code to be generated. Another option
is egcs (see <http://www.cygnus.com/egcs/>).
In addition, there are a few things that could be done to "tune" this
port. Currently the Linux-PPC port does not yet support shared
libraries, or mprotect()-based stack overflow detection. These
features are not necessary, but they would of course be nice to have.
Appended below is some information about what would need to be done to
add support for these features. Intrepid hackers, read on ;-)
----------------------------------------------------------------------
> You'll notice that shared libraries aren't supported on this
> machine yet. The LinuxPPC on the machine is an ELF system
> and does support shared libs.
We don't try to auto-configure shared libraries;
it's not reliable, since often failures only exhibit
themselves on large programs, not simple test cases.
The code to handle shared libraries might be as simple as just
patching configure to tell it to assume that they work.
(The way to do this is shown in the patch appended below.)
But more likely it will also require a little bit
of ABI-dependent code in runtime/mercury_goto.h, similar to the
existing stuff there for __sparc.
> checking for sys/siginfo.h... no
> checking for ucontext.h... no
> checking for sys/ucontext.h... no
> checking for asm/sigcontext.h... yes
...
> checking for `sigaction' field name... sa_handler
> checking for working `sigcontext_struct'... no
> checking for `siginfo_t'... no
The only other thing missing is stack overflow checking.
That requires a way of determining the fault address in a signal
handler, and there's no portable way of doing that.
We try a bunch of different ways, as shown above.
The method that is used on x86-linux is asm/sigcontext.h +
sigcontext_struct. Unfortunately the sigcontext_struct field name
we use in this method is hard-coded as `cr2', so it won't work on
PPC-Linux. There may be some way of getting the same information
on PPC-Linux. Try having a look at /usr/include/*/sigcontext.h.
Index: configure.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/configure.in,v
retrieving revision 1.117
diff -u -u -r1.117 configure.in
--- configure.in 1997/11/02 12:41:48 1.117
+++ configure.in 1997/11/22 17:37:07
@@ -1404,6 +1404,10 @@
AC_MSG_RESULT(yes)
EXT_FOR_SHARED_LIB=so
;;
+ powerpc-*-linux|powerpc-*-linux-gnu)
+ AC_MSG_RESULT(yes)
+ EXT_FOR_SHARED_LIB=so
+ ;;
i?86-*-freebsd*)
# From Cornelis van der Laan <[email protected]>
AC_MSG_RESULT(yes)