mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-27 20:59:36 +08:00
Add flag to build compiler options with G++ on macOS.
Building with G++ on Darwin breaks when either AVX, AVX2, or SSE4.1 compiler option is set, unless G++ is actually CLANG. This commit allows to build with G++, by asking G++ to delegate assembly to the clang integrated assembler, instead of the GNU one.
This commit is contained in:
parent
742a087507
commit
708f55423b
15
configure.ac
15
configure.ac
@ -131,6 +131,21 @@ if $sse41; then
|
||||
AM_CONDITIONAL([SSE41_OPT], true)
|
||||
fi
|
||||
|
||||
# Add platform-specific flags for the supported compiler options.
|
||||
if $avx -o $avx2 -o $sse41; then
|
||||
case "${host_os}" in
|
||||
*darwin* | *-macos10*)
|
||||
if test -z "$CLANG"; then
|
||||
echo "MODIFYING FLAGS"
|
||||
# When using AVX, AVX2, or SSE4.1:
|
||||
# Must tell AS to use clang integrated assembler,
|
||||
# instead of the GNU based system assembler.
|
||||
CXXFLAGS="$CXXFLAGS -Wa,-q"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
includedir="${includedir}/tesseract"
|
||||
|
||||
AC_ARG_WITH([extra-includes],
|
||||
|
Loading…
Reference in New Issue
Block a user