[ https://issues.apache.org/jira/browse/ZOOKEEPER-3654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Enrico Olivelli resolved ZOOKEEPER-3654. ---------------------------------------- Fix Version/s: 3.7.0 Resolution: Fixed > Incorrect *_CFLAGS handling in Automake > --------------------------------------- > > Key: ZOOKEEPER-3654 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3654 > Project: ZooKeeper > Issue Type: Bug > Components: c client > Reporter: Damien Diederen > Assignee: Damien Diederen > Priority: Major > Labels: pull-request-available > Fix For: 3.7.0 > > Time Spent: 1.5h > Remaining Estimate: 0h > > 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|https://www.gnu.org/software/automake/manual/html_node/Program-and-Library-Variables.html]: > {quote} > 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) > {quote} > 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.) -- This message was sent by Atlassian Jira (v8.3.4#803005)