|
Incorrect order of AM_CXXFLAGS and CXX_FLAGS?: msg#00169sysutils.automake.bugs
Hi, Recently, I stumbled across the following problem. We use the auto-tools in our build environment and have some GNU G++ compiler flags predefined -- they are defined as CXXFLAGS in an m4-macro that is invoked during configure. Among these flags are "-Wall" and "-W". I wanted to configure/compile one sub-package in our software tree with an extra flag "-Wno-unused-parameter". So I added a line AM_CXXFLAGS = -Wno-unused-parameter to my Makefile.am. The problem is, however, that it doesn't work. Automake adds the compiler flag before the default CXX_FLAGS, and as a result -Wall overrides the -Wno-unused-parameter flag. Now, I don't know whether this a GCC "bug", or not, but it would make sense, IMHO, to *append* AM_*FLAGS, rather than to *prepend* them. Especially because GCC usually retains the last occurrence of a switch that appears on the command line more than once. So, instead of the current definition in automake: $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS), wouldn't it be better if it were defined as: $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(AM_CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) Kind regards, Marcel Loose Please send replies to: loose AT astron DOT nl |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Do you covet to experience tiptop next morn ?: 00169, Dinah Ikedratn |
|---|---|
| Next by Date: | buddy told me abouut this phramacy: 00169, illa Yohe |
| Previous by Thread: | Do you covet to experience tiptop next morn ?i: 00169, Dinah Ikedratn |
| Next by Thread: | Re: Incorrect order of AM_CXXFLAGS and CXX_FLAGS?: 00169, Ralf Corsepius |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |