@@ -1,19 +1,7 @@
1−diff a/build/unix/compiledata.sh b/build/unix/compiledata.sh
2−--- a/build/unix/compiledata.sh
3−+++ b/build/unix/compiledata.sh
4−@@ -47,7 +47,7 @@ fi
5−
6− if [ "$ARCH" = "macosx" ] || [ "$ARCH" = "macosx64" ] || \
7− [ "$ARCH" = "macosxicc" ]; then
8−- macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2`
9−+ macosx_minor=12
10− SOEXT="so"
11− if [ $macosx_minor -ge 5 ]; then
12− if [ "x`echo $SOFLAGS | grep -- '-install_name'`" != "x" ]; then
131diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
142--- a/cmake/modules/SetUpMacOS.cmake
153+++ b/cmake/modules/SetUpMacOS.cmake
16−@@ -2,17 +2,8 @@ set(ROOT_ARCHITECTURE macosx)
4+@@ -8,17 +8,10 @@ set(ROOT_ARCHITECTURE macosx)
175 set(ROOT_PLATFORM macosx)
186
197 if (CMAKE_SYSTEM_NAME MATCHES Darwin)
@@ -21,8 +9,8 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
219- COMMAND cut -d . -f 1-2
2210- OUTPUT_VARIABLE MACOSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
2311-
24−- MESSAGE(STATUS "Found a Mac OS X System ${MACOSX_VERSION}")
25−-
12+ MESSAGE(STATUS "Found a macOS system ${MACOSX_VERSION}")
13+
2614- if(MACOSX_VERSION VERSION_GREATER 10.7 AND ${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
2715 set(libcxx ON CACHE BOOL "Build using libc++" FORCE)
2816- endif()
@@ -31,7 +19,7 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
3119 #TODO: check haveconfig and rpath -> set rpath true
3220 #TODO: check Thread, define link command
3321 #TODO: more stuff check configure script
34−@@ -25,23 +16,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
22+@@ -37,23 +30,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
3523 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
3624 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
3725 SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64")
@@ -56,7 +44,7 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
5644
5745 if (CMAKE_COMPILER_IS_GNUCXX)
5846 message(STATUS "Found GNU compiler collection")
59−@@ -104,7 +79,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
47+@@ -115,7 +92,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
6048 endif()
6149
6250 #---Set Linker flags----------------------------------------------------------------------
@@ -67,33 +55,33 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
6755diff a/config/root-config.in b/config/root-config.in
6856--- a/config/root-config.in
6957+++ b/config/root-config.in
70−@@ -306,12 +306,6 @@ macosxicc)
71− auxlibs="-lm -ldl"
58+@@ -312,12 +312,6 @@ macosxicc)
7259 ;;
73− macosx64)
74−- # MacOS X with gcc (GNU cc v4.x) in 64 bit mode
60+ macosx64|macosxarm64)
61+ # MacOS X with gcc (GNU cc v4.x) in 64 bit mode
62+- macosx_major=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1 | sed -e 's/^[[:space:]]*//'`
7563- macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2`
7664- # cannot find the one linked to libGraf if relocated after built
77−- if [ $macosx_minor -le 4 ]; then
65+- if [ $macosx_major -eq 10 -a $macosx_minor -le 4 ]; then
7866- rootlibs="$rootlibs -lfreetype"
7967- fi
8068 auxcflags="${cxxversionflag} -m64"
8169 auxldflags="-m64"
8270 auxlibs="-lm -ldl"
83−@@ -375,18 +369,11 @@ freebsd* | openbsd* | linux*)
71+@@ -378,18 +372,11 @@ freebsd* | openbsd* | linux*)
72+ done
73+ ;;
8474 macosx*)
75+- if [ \( $macosx_major -eq 10 -a $macosx_minor -ge 5 \) -o $macosx_major -gt 10 ]; then
76+ auxcflags="-pthread $auxcflags"
77+ auxlibs="-lpthread $auxlibs"
78+- else
79+- auxcflags="-D_REENTRANT $auxcflags"
80+- auxlibs="-lpthread $auxlibs"
81+- fi
8582 for f in $features ; do
86− if test "x$f" = "xthread" ; then
87−- if [ $macosx_minor -ge 5 ]; then
88− auxcflags="-pthread $auxcflags"
89− auxlibs="-lpthread $auxlibs"
90−- else
91−- auxcflags="-D_REENTRANT $auxcflags"
92−- auxlibs="-lpthread $auxlibs"
93−- fi
94− fi
9583 if test "x$f" = "xrpath" ; then
96−- if [ $macosx_minor -ge 5 ]; then
84+- if [ \( $macosx_major -eq 10 -a $macosx_minor -ge 5 \) -o $macosx_major -gt 10 ]; then
9785 auxlibs="-Wl,-rpath,$libdir $auxlibs"
9886- fi
9987 fi