Ticket #274 (closed todo: fixed)

Opened 13 years ago

Last modified 13 years ago

Enable shared on solaris

Reported by: rurban Owned by: rurban
Priority: normal Milestone:
Component: none Version:
Severity: medium Keywords:
Cc: Language:
Patch status: new Platform: solaris

Description (last modified by rurban) (diff)

Several minor tweaks were needed to build libparrot.so on opensolaris 10.

-R / -Wl,-rpath= was missing

ld=CC is invalid for -G, cc must be used instead

for 64bit use --ccflags='-m64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO' --linkflags='-m64'

LINKFLAGS was missing from libparrot.so. See TT #262 for the other missing linkflags

has_dynamic_linking and parrot_is_shared can be enabled as default

Patch tested with Sun Pro cc 64-bit, gcc 32-bit, and cross-tested on various other platforms.

Attachments

tt274+shared-solaris.patch Download (4.0 KB) - added by rurban 13 years ago.

Change History

Changed 13 years ago by rurban

  • description modified (diff)

Changed 13 years ago by rurban

Changed 13 years ago by rurban

  • owner set to rurban
  • status changed from new to assigned
  • patch set to new

Changed 13 years ago by doughera

I'm not sure what you mean by

"ld=CC is invalid for -G, cc must be used instead"

For one thing, CC -G is indeed the documented way to create shared libraries from c++ source files, though I haven't personally tested it myself. More to the point, however, parrot doesn't set ld=CC anyway (as far as I recall), so I don't know what you're referring to here.

Also, you shouldn't add LINKFLAGS for building libparrot.so; shared libraries are constructed with $ld, which uses $ldflags. See config/init/defaults.pm for the definitions of these variables.

Changed 13 years ago by rurban

  • status changed from assigned to closed
  • resolution set to fixed

revised patch applied as r36551 to enable gcc and sunpro cc.

use --ldflags and no --linkflags

enable --rpath and shared linking

disable the 'CC -G' hack as it doesn't correctly link in contrast to the default perl5 linker 'cc -G'

Note: See TracTickets for help on using tickets.