Menu

#528 support for -g option in CFLAGS [patch]

GC 3.0
closed
configure (12)
5 - default
2018-07-23
2018-06-19
No

./configure ignores CFLAGS='-g' (unless I use --enable-debug)

The following patch:

  • prevents the removal of -g[3]
  • removes -g from default options, for compatibility purpose with previous releases of GnuCOBOL (maybe you should consider -g as a default with GCC for GnuCOBOL 3.X)

Side effects: if you CFLAGS=-g, you'll lose -O2 (but keep -finline-functions, which is an -O3 optimisation...).

So make sure to use:
CFLAGS="-g -O2" ./configure

1 Attachments

Related

Bugs: #627
Discussion: packages for debian/ubuntu

Discussion

  • Simon Sobisch

    Simon Sobisch - 2018-06-19
    • labels: --> configure
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,8 +1,11 @@
     ./configure ignores CFLAGS='-g' (unless I use --enable-debug)
    
     The following patch:
    -* prevents the removal of -g[3]
    -* removes -g from default options, for compatibility purpose with previous releases of GnuCOBOL (maybe you should consider -g as a default with GCC for  GnuCOBOL 3.X)
    
    -Side effects: if you CFLAGS=-g, you'll lose -O2 (but keep -finline-functions, which is an -O3 optimisation...). So make sure to:
    +* prevents the removal of `-g[3]`
    +* removes `-g` from default options, for compatibility purpose with previous releases of GnuCOBOL (maybe you should consider -g as a default with GCC for GnuCOBOL 3.X)
    +
    +Side effects: if you `CFLAGS=-g`, you'll lose `-O2` (but keep `-finline-functions`, which is an `-O3` optimisation...).
    +
    +So make sure to use:
     `CFLAGS="-g -O2" ./configure`
    
    • status: open --> accepted
    • assigned_to: Simon Sobisch
    • Group: unclassified --> GC 3.0
     
  • Simon Sobisch

    Simon Sobisch - 2018-07-20
    • assigned_to: Simon Sobisch --> Edward Hart
     
  • Simon Sobisch

    Simon Sobisch - 2018-07-20

    Assigned to Edward for rechecking and commiting.

     
  • Edward Hart

    Edward Hart - 2018-07-23
    • status: accepted --> closed
     
  • Edward Hart

    Edward Hart - 2018-07-23

    Looks good to me. Committed in [r2639]. I couldn't find out why configure removed -g - it's been there since [r1] at least.

     

Log in to post a comment.

MongoDB Logo MongoDB