Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
The Makefile.am distributed with the C client defines some per-target *_CFLAGS and *_CXXFLAGS variables. These however, do not reference AM_CFLAGS (resp. AM_CXXFLAGS}}, which means that some options (notably -Wall) are missing when building subsets of the code.
Dixit the Automake docs:
In compilations with per-target flags, the ordinary ‘AM_’ form of
the flags variable is not automatically included in the
compilation (however, the user form of the variable is included).
So for instance, if you want the hypothetical ‘maude’ compilations
to also use the value of ‘AM_CFLAGS’, you would need to write:maude_CFLAGS = ... your flags ... $(AM_CFLAGS)
Restoring the flags, however, causes compilation failures (in the library) and a slew of new warnings (in the tests) which had not been noticed because of the missing options. These errors/warnings have to be fixed before the flags can be tightened up.
(I have a preliminary patch, and am planning to submit a "pull request" soon.)
Attachments
Issue Links
- links to