@@ -91,6 +91,8 @@ if [ "$osname" = Darwin ]; then
91
91
# 19: macOS 10.15 Catalina
92
92
# 20: macOS 11 Big Sur
93
93
# 21: macOS 12 Monterey
94
+ # 22: macOS 13 Ventura
95
+ # 23: macOS 14 Sonoma
94
96
95
97
if [ " $osver " = 10 ]; then
96
98
# On Snow Leopard (10.6), build universal
@@ -367,7 +369,9 @@ if [ "$osmesadriver" = 3 ] || [ "$osmesadriver" = 4 ]; then
367
369
if [ " $buildllvm " = 0 ]; then
368
370
# advise user to turn on automatic download, build and install option
369
371
echo " Error: $llvmconfigbinary does not exist, set environment variable LLVM_BUILD to 1 to automatically download and install llvm, as in:"
370
- echo " env LLVM_BUILD=1 $0 "
372
+ echo " env LLVM_BUILD=1 $0 "
373
+ echo " Or alternatively give the path to an existing LLVM installation as in:"
374
+ echo " env LLVM_PREFIX=/opt/local/libexec/llvm-6.0 $0 "
371
375
else
372
376
echo " Error: $llvmconfigbinary does not exist, please install LLVM with RTTI support in $llvmprefix "
373
377
echo " download the LLVM sources from llvm.org, and configure it with:"
@@ -381,7 +385,13 @@ if [ "$osmesadriver" = 3 ] || [ "$osmesadriver" = 4 ]; then
381
385
echo " LLVM 4.0.1 is the best option for Mesa 17.x."
382
386
echo " LLVM 6.0.1 works with Mesa 18.x."
383
387
echo " LLVM 9.0.1 hangs on osdemo16, at least up to Mesa 18.2.8, but may work with Mesa 18.3.6 and later."
388
+ echo " LLVM 15 and greater will NOT work, because of:"
389
+ echo " - https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179/11 (LLVM 15)"
390
+ echo " - https://llvm.org/docs/OpaquePointers.html#frontends (LLVM 16)"
384
391
echo " Please modify this script and file a github issue if it works with this version."
392
+ if version_gt $( " $llvmconfigbinary " --version) 14.99; then
393
+ exit 1
394
+ fi
385
395
echo " Continuing anyway after 10s."
386
396
sleep 10
387
397
fi
@@ -422,6 +432,13 @@ if version_gt $("$llvmconfigbinary" --version) 6.0.1 && version_gt 19.0.0 "$mesa
422
432
echo " Building for an unsupported combination of Mesa/LLVM."
423
433
echo " LLVM 6.0.1 is the best option for Mesa 18.x."
424
434
echo " LLVM 9.0.1 and later hang when running osdemo16 with Mesa up to 18.1.8."
435
+ echo " LLVM 15 and greater will NOT work, because of:"
436
+ echo " - https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179/11 (LLVM 15)"
437
+ echo " - https://llvm.org/docs/OpaquePointers.html#frontends (LLVM 16)"
438
+ echo " Please modify this script and file a github issue if it works with this version."
439
+ if version_gt $( " $llvmconfigbinary " --version) 14.99; then
440
+ exit 1
441
+ fi
425
442
echo " Continuing anyway after 10s."
426
443
sleep 10
427
444
fi
@@ -520,6 +537,8 @@ if [ "$osname" = Darwin ]; then
520
537
patch-include-GL-mesa_glinterop_h.diff \
521
538
missing_clock_gettime.patch \
522
539
"
540
+ SED=gsed
541
+ export SED
523
542
fi
524
543
525
544
for i in $PATCHES ; do
@@ -631,6 +650,7 @@ elif [ "$use_autoconf" = 1 ]; then
631
650
632
651
test -f Mafefile && make -j" ${mkjobs} " distclean # if in an existing build
633
652
653
+ autoupdate
634
654
autoreconf -fi
635
655
636
656
platformsopt=" --with-platforms="
@@ -736,6 +756,10 @@ elif [ "$use_autoconf" = 1 ]; then
736
756
if [ -n " ${SDKROOT+x} " ]; then
737
757
osxflags=" $osxflags -isysroot $SDKROOT "
738
758
fi
759
+ # clang >= 15 started treating int <-> ptr conversions as errors
760
+ if [ " $CC " = " clang" ]; then
761
+ osxflags=" $osxflags -Wno-int-conversion"
762
+ fi
739
763
740
764
if [ -n " $osxflags " ]; then
741
765
CFLAGS=" $CFLAGS $osxflags "
0 commit comments