diff --git a/NEWS.md b/NEWS.md index 5fbe86b76..8b15449e8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,8 @@ 2. Continued work to remove non-API C functions, [#6180](https://github.com/Rdatatable/data.table/issues/6180). Thanks Ivan Krylov for the PR and for writing a clear and concise guide about the R API: https://aitap.codeberg.page/R-api/. +3. `data.table` again properly detects OpenMP support when built using `gcc` on macOS, [#6409](https://github.com/Rdatatable/data.table/issues/6409). Thanks @barracuda156 for the report and @kevinushey for the fix. + # data.table [v1.16.0](https://github.com/Rdatatable/data.table/milestone/30) (25 August 2024) ## BREAKING CHANGES diff --git a/configure b/configure index 853c0d5fa..2402ecef1 100755 --- a/configure +++ b/configure @@ -121,6 +121,17 @@ detect_openmp () { echo "no" fi + # https://github.com/Rdatatable/data.table/issues/6409 + printf "%s" "* checking if R installation supports OpenMP with \"-fopenmp\" ... " + if CPPFLAGS="${CPPFLAGS} -fopenmp" "${R_HOME}/bin/R" CMD SHLIB test-omp.c >> config.log 2>&1; then + echo "yes" + export PKG_CFLAGS="${PKG_CFLAGS} -fopenmp" + export R_OPENMP_ENABLED=1 + return + else + echo "no" + fi + if [ "$(uname -m)" = "arm64" ]; then HOMEBREW_PREFIX=/opt/homebrew else