[LLVMbugs] [Bug 180] NEW: LLVM exposes configure pre-processor #defines

bugzilla-daemon at zion.cs.uiuc.edu bugzilla-daemon at zion.cs.uiuc.edu
Sat Dec 13 02:54:04 PST 2003


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=180

           Summary: LLVM exposes configure pre-processor #defines
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Support Libraries
        AssignedTo: sabre at nondot.org
        ReportedBy: rspencer at x10sys.com
                CC: sabre at nondot.org


Currently, LLVM exposes many pre-processor symbols defined during the configure
processing through include/Config/config.h. So far, I have detected the
following #defines exposed through public headers:

PACKAGE_NAME
PACKAGE_RELEASE
PACKAGE_BUGRELEASE
PACKAGE_STRING
PACKAGE_TARNAME

There are also numerous HAS_XXX symbols polluting the pre-processor namespace. 

The existence of these symbols in public headers makes integration of LLVM with
other software that uses autoconf (like mine) awkward at best and impossible at
worst. 

The main culprit seems to be include/Support/DataTypes.h which directly include
"Config/config.h" which is the file that defines all the symbols.

To fix this, it will be necessary to remove any #includes of "Config/config.h"
in public header files to either the .cpp files or internal header files.

I'm going to go ahead and make the necessary changes to eliminate the problem
but wanted to get a little feedback on this before submitting patches.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list