Bug 689490

Summary: Solaris build needs work
Product: Ghostscript Reporter: Norm Jacobs <Norm.Jacobs>
Component: Build ProcessAssignee: Chris Liddell (chrisl) <chris.liddell>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: master   
Hardware: Sun   
OS: SunOS   
Customer: Word Size: ---
Attachments: build changes for Sun Workshop compilers
Updated build patch for workshop compilers

Description Norm Jacobs 2007-09-30 23:04:20 UTC
While building GhostScript on Solaris Nevada using the Workshop compilers, I ran
into a few issues.
    "make so" fails due to incorrect compiler and linker flags (-fPIC, -shared,
-soname= are all gccisms)
    "grep -q" doesn't work with the bundled grep on Solaris
Comment 1 Norm Jacobs 2007-09-30 23:08:26 UTC
Created attachment 3429 [details]
build changes for Sun Workshop compilers

This patch updates the build to work with either gcc or the Sun Workshop
compilers on Solaris.	I built the so version using both gcc and workshop with
these changes.

While building this patch, I noticed some places in the build where platform
checks could be improved as well.
Comment 2 Norm Jacobs 2007-10-01 21:46:54 UTC
Created attachment 3430 [details]
Updated build patch for workshop compilers

This update fixes the build of shared objects in devs.mak to build on Solaris
as well as all fixes in the previous patch attached.
Comment 3 Ralph Giles 2007-10-02 23:27:24 UTC
I've committed the grep fix. The rest needs work to not break other platforms.

Is -KPIC really the appropriate choice for non-gcc compilers?
Comment 4 Hin-Tak Leung 2010-05-02 03:12:29 UTC
Grabbing a Ralph's bugs.
Comment 5 Chris Liddell (chrisl) 2011-01-18 10:24:18 UTC
Between Alex's commits 11976 and 11984, and my commit 12035, the shared library builds on Sparc Solaris should now work correctly with both gcc and Sun cc.

NOTE: the "so" target still requires GNU make.