Bug 691991 - patch to add extra compile and link flags to gs 9.01
Summary: patch to add extra compile and link flags to gs 9.01
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Build Process (show other bugs)
Version: master
Hardware: PC Linux
: P4 normal
Assignee: Chris Liddell (chrisl)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-21 01:41 UTC by William Bader
Modified: 2011-09-14 12:45 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
patch to add extra compile and link flags (1.03 KB, application/octet-stream)
2011-02-21 01:41 UTC, William Bader
Details
Makefile.in.patch (3.31 KB, patch)
2011-09-13 16:15 UTC, Chris Liddell (chrisl)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.