On Tue, Nov 14, 2017 at 01:57:21PM +0100, Rainer Orth wrote: > >> --- a/libsanitizer/configure.ac > >> +++ b/libsanitizer/configure.ac > >> @@ -140,6 +140,24 @@ case "$host" in > >> esac > >> AM_CONDITIONAL(USING_MAC_INTERPOSE, $MAC_INTERPOSE) > >> > >> +# lsan_common_mac.cc needs VM_MEMORY_OS_ALLOC_ONCE which was only > >> +# introduced in Mac OS X 10.9/Darwin 13. > >> +case "$host" in > >> + *-*-darwin[[1-9]] | *-*-darwin[[1-9]].* | *-*-darwin1[[0-2]]*) > >> + LSAN_COMMON=false ;; > >> + *) LSAN_COMMON=true ;; > >> +esac > >> +AM_CONDITIONAL(LSAN_COMMON_SUPPORTED, $LSAN_COMMON) > >> + > >> +# Before Xcode 4.5, the Darwin linker doesn't properly support undefined > >> +# weak symbols. > >> +case "$host" in > > > > $host here and above? Shouldn't that be $target instead? > > AFAIU $host and $target are identical in target libraries, and the > majority of cases uses $host right now.
Didn't know that. Though, e.g. libsanitizer uses $target except for this single MAC_INTERPOSE case. > > That said, I think it would be better to move this stuff except for the > > AM_CONDITIONAL into configure.tgt similarly to how *_SUPPORTED is handled. > > My reasoning was to have purely static based stuff like supported status > or additional compiler/linker flags in configure.tgt, while other tests > which might need configure checks go into configure.ac. But the checks you've added are clearly static, just from parsing the triplet. > > And the preexisting: > > case "$host" in > > *-*-darwin*) MAC_INTERPOSE=true ; enable_static=no ;; > > *) MAC_INTERPOSE=false ;; > > esac > > AM_CONDITIONAL(USING_MAC_INTERPOSE, $MAC_INTERPOSE) > > looks wrong too. > > Wrong in which way? Just the location? I meant for using $host instead of $target (perhaps a non-issue) and for being in configure.ac instead of configure.tgt, where in configure.ac we could have just the AM_CONDITIONAL. Jakub