Dependencies ignore compiler flags

Create issue
Issue #1011 closed
Erik Schnetter created an issue

The dependency calculation ignores compiler flags. For example, when a compiler flag is used that enables the AVX instructions, then this defines the preprocessor macro AVX. When dependencies are calculated, this macro is not defined, which means that a different set of include files is used.

I believe that CFLAGS or CXXFLAGS need to be used when the dependencies are calculated.


Comments (5)

  1. Erik Schnetter reporter
    • changed status to open
    • removed comment

    I propose the attached modification to determining dependencies. Essentially, every time $(CC) or $(CXX) is used, $(CFLAGS) or $(CXXFLAGS) are added in addition to $(CPPFLAGS).

    This seems to work fine on all systems I tested, but of course I cannot tell whether it corrects the respective problem on all these systems. It does correct the system on Mac OS X.

    After applying this patch, autoconf needs to run, and force-reconfigure needs to be modified.

  2. Log in to comment