bugMIT/GNU Scheme - Bugs: bug #40150, mit-scheme-c-9.1.1 overrides user...


bug #40150: mit-scheme-c-9.1.1 overrides user supplied optimization CFLAGS

Submitted by:  George Skabinsky <gska>
Submitted on:  Mon 30 Sep 2013 09:35:12 PM UTC  
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  Matt Birkholz <mhb> Originator Name: 
Open/Closed:  Closed

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 27 May 2014 04:29:36 PM UTC, comment #3:

This wound up in commit f93e3c6.

Matt Birkholz <mhb>
Project MemberIn charge of this item.
Mon 14 Oct 2013 01:47:01 AM UTC, comment #2:

yes, that will suffice. thanks.

George Skabinsky <gska>
Thu 03 Oct 2013 06:12:17 PM UTC, comment #1:

I can find only a handful of lines where CFLAGS is touched at all, mostly to add some -Wnitpick options (admittedly after CFLAGS, but so what?), or override standard optimization options when configured with --enable-debugging (the intention?). Perhaps line 62 is all you meant; you were so... unspecific. Line 62 is only executed when ${GCC} is yes, but... maybe this patch is all you need?

diff --git a/src/microcode/achost.ac b/src/microcode/achost.ac
index 35408bb..63e45f1 100644
--- a/src/microcode/achost.ac
+++ b/src/microcode/achost.ac
@@ -59,7 +59,7 @@ if test ${GCC} = yes; then

if test ${enable_debugging} = no; then

Matt Birkholz <mhb>
Project MemberIn charge of this item.
Mon 30 Sep 2013 09:35:12 PM UTC, original submission:

by default, autoconf'd programs set "-O2 -g" as default CFLAGS.
however they're only used when the user does not pass custom CFLAGS.

so the code there is equivalent to
[ -z $CFLAGS ] && CFLAGS="-O2 -g"

mit scheme otoh has the following:

thus, -O3 is always added to the end of the CFLAGS, which takes precedence. so the user has no way to override the hardcore -O3 optimization, which takes 5-10 times as long (and much more RAM) to build than -O0.

if otoh the statement would look like this:
the user could still override the optimization level since his own CFLAGS come last.

however the best approach is the one taken by vanilla autoconf (first code example).

George Skabinsky <gska>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mhb (Posted a comment)
  • -email is unavailable- added by mhb
  • -email is unavailable- added by gska (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-05-27 mhb Assigned toNone => mhb
        Open/ClosedOpen => Closed
    2013-10-03 mhb Carbon-Copy- => Added -email is unavailable-

    Back to the top

    Powered by Savane 3.3