On 28/12/2015 10:25 p.m., Kinkie wrote: > Hi, > > On Mon, Dec 28, 2015 at 1:32 AM, Amos Jeffries wrote: >> On 24/12/2015 11:32 a.m., Kinkie wrote: >>> Hi, >>> libatomic detection is currently broken in configure.ac; it will >>> define -latomic even in case where it wouldn't be required (e.g. >>> because it's already provided by the compiler). >>> The attached patch fixes the broken case. Unfortunately I don't know a >>> system where this library is required, I'm convinced there's room for >>> further simplification. >> >> It was for Clang builds IIRC. At least 3.5 needs it added. >> >> Does this work instead for shorter code? >> AC_SEARCH_LIBS([__atomic_load_8],[atomic],[ >> ATOMICLIB="$ac_cv_search___atomic_load_8" >> ],[]) > > unfortunately not, as the result could be "none required" or "no", > too. The former is actually the error case which bought me to the > topic. > Documentation states that if a library is needed it should get > automatically added to LIBS though.
"Unless the 3rd and 4th parameters are specified". So it will be automatically added under your patch, but not under the existing/older code. Which was an intentional omission from LIBS to avoid build warnings on some distros about unnecessary dependencies being linked in (such as <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770928>). Since most of the helper binaries do not use atomics (yet, though we could thread them in future) the -latomic addition is only needed by squid_LDADD not the generic LIBS / LDADD. Amos _______________________________________________ squid-dev mailing list squid-dev@lists.squid-cache.org http://lists.squid-cache.org/listinfo/squid-dev