Ticket #62779: patch-hints-darwin_sh.2.diff
File patch-hints-darwin_sh.2.diff, 2.4 KB (added by ghosthound, 4 years ago) |
---|
-
hints/darwin.sh
old new 301 301 # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by 302 302 # capturing its value and adding it to the flags. 303 303 case "$MACOSX_DEPLOYMENT_TARGET" in 304 10.*)304 [1-9][0-9].*) 305 305 add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET 306 306 add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET 307 307 ;; … … 313 313 314 314 *** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET 315 315 *** 316 *** Please either set it to 10.something,or to empty.316 *** Please either set it to a valid macOS version number (e.g., 10.15) or to empty. 317 317 318 318 EOM 319 319 exit 1 … … 327 327 # "ProductVersion: 10.11" "10.11" 328 328 prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'` 329 329 case "$prodvers" in 330 10.*)330 [1-9][0-9].*) 331 331 add_macosx_version_min ccflags $prodvers 332 332 add_macosx_version_min ldflags $prodvers 333 333 ;; … … 344 344 345 345 # The X in 10.X 346 346 prodvers_minor=$(echo $prodvers|awk -F. '{print $2}') 347 darwin_major=$(echo $osvers|awk -F. '{print $1}') 347 348 348 # macOS (10.12) deprecated syscall(). 349 # but it's still available on both macOS 10.12 and 10.13 350 # for compatibility with perl5.24 allow syscall() configuration on Sierra and later 351 # will auto-configure without syscall() if and when it's actually removed 352 # if [ "$prodvers_minor" -ge 12 ]; then 353 # d_syscall='undef' 354 # # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime() 355 # case "$MACOSX_DEPLOYMENT_TARGET" in 356 # 10.[6-9]|10.10|10.11) 357 # ccflags="$ccflags -Werror=partial-availability -D_DARWIN_FEATURE_CLOCK_GETTIME=0" 358 # ;; 359 # *) 360 # ;; 361 # esac 362 # fi 349 # macOS 10.12 (darwin 16.0.0) deprecated syscall(). 350 if [ "$darwin_major" -ge 16 ]; then 351 d_syscall='undef' 352 # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime() 353 case "$MACOSX_DEPLOYMENT_TARGET" in 354 10.[6-9]|10.10|10.11) 355 ccflags="$ccflags -Werror=partial-availability -D_DARWIN_FEATURE_CLOCK_GETTIME=0" 356 ;; 357 *) 358 ;; 359 esac 360 fi 363 361 364 362 lddlflags="${ldflags} -bundle -undefined dynamic_lookup" 365 363 ;;