[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fpieee module adds inappropriate compiler flags to CPPFLAGS

From: Mike Miller
Subject: fpieee module adds inappropriate compiler flags to CPPFLAGS
Date: Tue, 5 Aug 2014 12:19:42 -0400

Hi, we recently encountered a build failure of Octave on alpha [1,2]
due to an added indirect dependency on the fpieee gnulib module, which
appends compiler options to CPPFLAGS that don't necessarily belong

This module apparently adds either "-mieee" or "-ieee" to CPPFLAGS
when building on certain systems. These are decidedly not preprocessor
flags, but are likely added this way as a shortcut to ensure that they
are used when compiling any language. However, the working assumption
that what works for $(CC) will work for anything that takes CPPFLAGS
is not necessarily true. For example, even invoking $(CPP) $(CPPFLAGS)
using gcc would fail with an error in this environment.

In the case of Octave, it fails because CPPFLAGS are passed on to
other tools (such as Qt moc) that will work with standard preprocessor
options like -D and -I, but not -mieee. Our workaround is to simply
filter these options out of CPPFLAGS, because Octave has already had
its own logic to append the appropriate compiler options to CFLAGS and
CXXFLAGS for several years.

I'm not sure what an appropriate fix for this would be in the general
case, but ideally it would avoid adding these options to project-wide
CPPFLAGS where they really don't belong. If it were possible to add
the -mieee or -ieee option to language-specific FLAGS variables used
by a given project, that would be a better solution. Less ideally, it
could stuff the option into an IEEE_CFLAGS variable, which a project
would then have to know about and explicitly use or add to its own
CFLAGS/CXXFLAGS/etc, potentially breaking existing uses.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746924
[2] http://savannah.gnu.org/bugs/?42839

Thoughts? Thanks,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]