Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #41182] [PATCH] Preliminary support for suncc on Linux

7 views
Skip to first unread message

Steve Peters

unread,
Jan 4, 2007, 12:20:58 PM1/4/07
to bugs-bi...@rt.perl.org
# New Ticket Created by Steve Peters
# Please include the string: [perl #41182]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41182 >


The hint file changes below get Parrot compiling with suncc. There is
a bit more work to be done to fight off the gcc-based defaults which are
almost completely incompatible with suncc.

Steve Peters
st...@fisharerojo.org

--- config/init/hints/linux.pm.old 2007-01-04 10:45:51.000000000 -0600
+++ config/init/hints/linux.pm 2007-01-04 11:15:45.000000000 -0600
@@ -23,9 +23,7 @@
$libs .= ' -lpthread';
}
my $ld_share_flags = $conf->data->get('ld_share_flags');
- if ( $ld_share_flags !~ /-fPIC/ ) {
- $ld_share_flags .= ' -fPIC';
- }
+ my $cc_shared = $conf->data->get( 'cc_shared' );

if ( $cc =~ /icc/ ) {

@@ -37,9 +35,27 @@

# suppress sprintf warnings that don't apply
$cflags .= ' -wd269';
- }
- else {
-
+ if ( $ld_share_flags !~ /-fPIC/ ) {
+ $ld_share_flags .= ' -fPIC';
+ }
+ if ($cc_shared !~ /-fPIC/ ) {
+ $cc_shared .= ' -fPIC';
+ }
+ } elsif ( $cc =~ /suncc/ ) {
+ $link = 'sunCC';
+ if ( $ld_share_flags !~ /-KPIC/ ) {
+ $ld_share_flags = '-KPIC';
+ }
+ if ($cc_shared !~ /-KPIC/ ) {
+ $cc_shared = '-KPIC';
+ }
+ } else {
+ if ( $ld_share_flags !~ /-fPIC/ ) {
+ $ld_share_flags .= ' -fPIC';
+ }
+ if ($cc_shared !~ /-fPIC/ ) {
+ $cc_shared .= ' -fPIC';
+ }
# --export-dynamic, s. info gcc, ld
$linkflags .= ' -Wl,-E';
}
@@ -60,6 +76,7 @@
i_lib_pthread => 1, # XXX fake a header entry
linkflags => $linkflags,
link => $link,
+ cc_shared => $cc_shared,
rpath => '-Wl,-rpath=',

has_dynamic_linking => 1,

Jonathan Worthington

unread,
Jan 4, 2007, 5:33:25 PM1/4/07
to perl6-i...@perl.org
Steve Peters (via RT) wrote:
> The hint file changes below get Parrot compiling with suncc. There is a bit more work to be done to fight off the gcc-based defaults which are almost completely incompatible with suncc.
>
Applied in r16417.

Thanks *very* much for all of your work on Parrot portability - it is
very much appreciated.

Jonathan

0 new messages