[LLVMbugs] [Bug 9375] New: __private_extern__ should not be recognized on non-Darwin platforms

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 2 12:55:30 PST 2011


           Summary: __private_extern__ should not be recognized on
                    non-Darwin platforms
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: dimitry at andric.com
                CC: llvmbugs at cs.uiuc.edu

Currently, libdispatch's configure script tries to detect support for
__private_extern__ by simply seeing if a program containing it compiles.
Only if that compilation fails, does it attempt to use the other
approach of __attribute__((visibility("hidden"))).

However, on non-Darwin OSes, __private_extern__ results in a regular
extern symbol, and this causes symbols using it to be visible, leading
to link problems.

Of course, libdispatch's configure script can be fixed to only check for
__private_extern__ on Darwin.

However, if __private_extern__ is a Darwin-only feature, I think it
should simply result in a compile error on non-Darwin platforms.  This
will prevent problems with any other scripts that try to detect this

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list