- Recognise explicit shared library arguments when linking dependency
libraries to a shared library, like exists when linking a program.
+ - Support OpenMP with macOS clang by processing '-Xpreprocessor
+ -fopenmp' as one token.
+
** Bug fixes:
- Store cygpath file path conversions correctly for MSYS2 and MSVC.
# See if our shared archives depend on static archives.
test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+ # make sure "-Xpreprocessor -fopenmp" is processed as one token
+ case $@ in
+ *-Xpreprocessor\ -fopenmp*)
+ fopenmp_match="-Xpreprocessor -fopenmp"
+ ;;
+ *)
+ fopenmp_match=-fopenmp
+ ;;
+ esac
+
# Go through the arguments, transforming them on the way.
while test "$#" -gt 0; do
arg=$1
continue
;;
-mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
- |-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ |-threads|$fopenmp_match|fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
func_append compiler_flags " $arg"
func_append compile_command " $arg"
func_append finalize_command " $arg"
continue
;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
- |-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ |-threads|$fopenmp_match|fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
if test prog,link = "$linkmode,$pass"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"