Issue #8762 has been reported by charliesome (Charlie Somerville).

----------------------------------------
Bug #8762: CFLAGS and LDFLAGS are not set properly in Makefile when they are already set as environment variables
https://bugs.ruby-lang.org/issues/8762

Author: charliesome (Charlie Somerville)
Status: Open
Priority: High
Assignee: 
Category: 
Target version: 
ruby -v: trunk
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


When the environment variable CFLAGS does not exist, running the ./configure script outputs this to the Makefile:

    # ./configure && grep ^CFLAGS Makefile
    ...configure output...
    CFLAGS = ${cflags} $(ARCH_FLAG)

However, setting the environment variable CFLAGS to anything (even the empty string) causes ${cflags} to not be included in the CFLAGS written to the Makefile:

    # CFLAGS= ./configure && grep ^CFLAGS Makefile
    ...configure output...
    CFLAGS =  $(ARCH_FLAG)

The same happens with LDFLAGS. I believe this is what is breaking trunk compilation for both myself and spastorino in #8759.


-- 
http://bugs.ruby-lang.org/