diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-24 10:46:42 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-24 10:46:42 +0000 |
commit | b76f91fcea858b4c9ff8318bb0e9892afb37cbc8 (patch) | |
tree | fe5c87fb3a7466deab9a52094761890c04b1642b | |
parent | 641ea34509d056562619331a992674963cdc137c (diff) | |
download | perl-b76f91fcea858b4c9ff8318bb0e9892afb37cbc8.tar.gz |
Various tweaks for getting Perl to compile on SunOS 4.x.
Doesn't work well yet, something broken in DynaLoader/XSLoader?
p4raw-id: //depot/perl@20867
-rw-r--r-- | README.solaris | 10 | ||||
-rw-r--r-- | ext/IO/poll.c | 9 | ||||
-rw-r--r-- | hints/sunos_4_1.sh | 6 |
3 files changed, 25 insertions, 0 deletions
diff --git a/README.solaris b/README.solaris index 47338b6ef9..202c8ff695 100644 --- a/README.solaris +++ b/README.solaris @@ -233,6 +233,16 @@ You may have to manually edit config.sh and add the -Wl,-E flags yourself, or else run Configure interactively and add the flags at the appropriate prompts. +In SunOS 4.x you most probably want to use the SunOS ld, /usr/bin/ld, +since the more recent versions of GNU ld (like 2.13) do not seem to +work for building Perl anymore. When linking the extensions, the +GNU ld gets very unhappy and spews a lot of errors like this + + ... relocation truncated to fit: BASE13 ... + +and dies. Therefore the SunOS 4.1 hints file explicitly sets the +ld to be /usr/bin/ld. + If your gcc is configured to use GNU as and ld but you want to use the Solaris ones instead to build perl, then you'll need to add -B/usr/ccs/bin/ to the gcc command line. One convenient way to do diff --git a/ext/IO/poll.c b/ext/IO/poll.c index 02a99b9725..9d39d57f2f 100644 --- a/ext/IO/poll.c +++ b/ext/IO/poll.c @@ -135,3 +135,12 @@ again: } #endif /* EMULATE_POLL_WITH_SELECT */ + +/* gcc for SunOS 4 produces code from an empty (code/symbolwise) + * source code file that makes the SunOS 4.x /usr/bin/ld fail with + * ld: poll.o: premature EOF + * To avoid this, have at least something in here. */ +#if defined(__sun) && !defined(__SVR4) && defined(__GNUC__) +static int dummy; +#endif + diff --git a/hints/sunos_4_1.sh b/hints/sunos_4_1.sh index 650b551d81..4c9ff14568 100644 --- a/hints/sunos_4_1.sh +++ b/hints/sunos_4_1.sh @@ -82,3 +82,9 @@ fi # library. # # Thanks to William Setzer <William_Setzer@ncsu.edu> for this info. + +# Don't use the GNU ld, that doesn't work, you'll get a lot of +# relocation truncated to fit: BASE13 ... +# from many extensions, like B and Data::Dumper. +ld=/usr/bin/ld + |