Hi, The LLVM headers llvm-c/Target.h and llvm/Target/TargetSelect.h include the header llvm/Config/config.h, which defines common macros, such as PACKAGE_BUGREPORT. If a project that uses LLVM includes any of these headers, the project's own macros of the same names can be redefined. Most advice I have seen says that installed headers should never define such common macros. Thus, an internal config.h should never be installed: http://stackoverflow.com/questions/1810216/autoconf-where-does-config-h-go http://lists.gnu.org/archive/html/autoconf/2004-09/msg00151.html Would you please consider replacing the current llvm/Config/config.h with a trimmed down version that contains only the definitions that must be present in LLVM's installed headers? PACKAGE_* macros certainly do not need to be there. Thanks.
"Joel E. Denny" <jdenny at etinternational.com> writes:> The LLVM headers llvm-c/Target.h and llvm/Target/TargetSelect.h include > the header llvm/Config/config.h, which defines common macros, such as > PACKAGE_BUGREPORT. If a project that uses LLVM includes any of these > headers, the project's own macros of the same names can be redefined. > > Most advice I have seen says that installed headers should never define > such common macros. Thus, an internal config.h should never be installed: > > http://stackoverflow.com/questions/1810216/autoconf-where-does-config-h-go > http://lists.gnu.org/archive/html/autoconf/2004-09/msg00151.html > > Would you please consider replacing the current llvm/Config/config.h with > a trimmed down version that contains only the definitions that must be > present in LLVM's installed headers? PACKAGE_* macros certainly do not > need to be there.Most of the stuff contained in config.h should never reach client's code. A possible solution is to configure Target.h and TargetSelect.h, as we already do with other files (config.h itself.) In any case, a bug report would ensure that this is not forgotten. Can you file one, please?
On Wed, 4 Aug 2010, Óscar Fuentes wrote:> "Joel E. Denny" <jdenny at etinternational.com> writes: > > > The LLVM headers llvm-c/Target.h and llvm/Target/TargetSelect.h include > > the header llvm/Config/config.h, which defines common macros, such as > > PACKAGE_BUGREPORT. If a project that uses LLVM includes any of these > > headers, the project's own macros of the same names can be redefined.> In any case, a bug report would ensure that this is not forgotten. Can > you file one, please?Ok, I have done so. Thanks.