Bug 691991

Summary: patch to add extra compile and link flags to gs 9.01
Product: Ghostscript Reporter: William Bader <williambader>
Component: Build ProcessAssignee: Chris Liddell (chrisl) <chris.liddell>
Status: RESOLVED FIXED    
Severity: normal CC: henry.stiles, williambader
Priority: P4    
Version: master   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: patch to add extra compile and link flags
Makefile.in.patch

Description William Bader 2011-02-21 01:41:51 UTC
Created attachment 7269 [details]
patch to add extra compile and link flags

The makefile has $(XCFLAGS) and $(XLDFLAGS), but the configure script seems to use them.  These patches add $(XXCFLAGS) and $(XXLDFLAGS) that can be set on the "make" command line without breaking what the configure script put in $(XCFLAGS) and $(XLDFLAGS).
Comment 1 Chris Liddell (chrisl) 2011-09-13 16:15:29 UTC
Created attachment 7881 [details]
Makefile.in.patch

Given that XCFLAGS and XLDFLAGS have been around for a while, and to me the names do imply "eXternal" flags, I'd prefer a something like the attached patch (and I've made XTRALIBS the way to add to EXTRALIBS, keeping with "X" prefix convention). I changed the existing XCFLAGS and XLDFLAGS to be AC_CFLAGS and AC_LDFLAGS indicating that the settings come from autoconf (matching ACDEFS).


Does that seem okay?
Comment 2 William Bader 2011-09-13 18:10:29 UTC
I think that is ok for me.  I want to be able to add compile and link flags after the flags that are set by configure and the makefile.  For example, on some very old systems, I need to add -O0, and on some new systems, I enable cpu-specific optimization.
Comment 3 Chris Liddell (chrisl) 2011-09-14 12:45:03 UTC
I've committed the patch I posted:
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=d4c721

If it doesn't give the flexibility you need, please reopen the bug, and we'll work it out.