Skip to content
  • Rolf Eike Beer's avatar
    CheckSymbolExists: force the compiler to keep the referenced symbol · 813eca64
    Rolf Eike Beer authored
    Otherwise the compiler may optimize out the reference to the symbol as the
    previous version was not really using this. This leads to symbols that are
    only in a header but not in the given libraries to be reported as present.
    
    This came up on the first try to fix bug 11333 as "gcc -O3" would optimize
    out the reference to pthread_create() so the correct library the symbol is in
    was not detected.
    
    The new test code was suggested by Brad King.
    813eca64