Even though cpu is detected to be "arm", chance is high it's a hard-float CPU, which is further deduced by looking at the compiler triplet. In this case, interpreter is also supposed to include "hf" suffix. On Alpine/armv7 this fixes both suggestion to use "--config-musl" during ./configure step and the tests.
Unified · Split
| @@ -487,14 +487,6 @@ if test -z "$build_cross"; then · 486 unmodified lines | ||
| 487 | 487 | fi |
| 488 | 488 | esac |
| 489 | 489 | fi |
| 490 | − if test "$suggest" = "yes"; then | |
| 491 | − if test -f "/lib/ld-uClibc.so.0" ; then | |
| 492 | − echo "Perhaps you want ./configure --config-uClibc" | |
| 493 | − fi | |
| 494 | − if test -f "/lib/ld-musl-${cpu}.so.1"; then | |
| 495 | − echo "Perhaps you want ./configure --config-musl" | |
| 496 | − fi | |
| 497 | − fi | |
| 498 | 490 | fi |
| 499 | 491 | else |
| 500 | 492 | # can only make guesses about compiler and target |
| @@ -511,14 +503,17 @@ if test "$bigendian" = "yes" ; then · 10 unmodified lines | ||
| 511 | 503 | confvars_set BIGENDIAN |
| 512 | 504 | fi |
| 513 | 505 | |
| 506 | +cpuinterp="$cpu" | |
| 514 | 507 | if test "$cpu" = "arm"; then |
| 515 | 508 | if test "${triplet%eabihf}" != "$triplet" ; then |
| 516 | 509 | confvars_set arm_eabihf arm_vfp |
| 510 | + cpuinterp=armhf | |
| 517 | 511 | elif test "${triplet%eabi}" != "$triplet" ; then |
| 518 | 512 | confvars_set arm_eabi arm_vfp |
| 519 | 513 | elif test -z "$build_cross"; then |
| 520 | 514 | if test "${_triplet%eabihf}" != "$_triplet" ; then |
| 521 | 515 | confvars_set arm_eabihf arm_vfp |
| 516 | + cpuinterp=armhf | |
| 522 | 517 | elif test "${_triplet%eabi}" != "$_triplet" ; then |
| 523 | 518 | confvars_set arm_eabi arm_vfp |
| 524 | 519 | elif grep -s -q "^Features.* \(vfp\|iwmmxt\) " /proc/cpuinfo ; then |
| @@ -532,6 +527,25 @@ if test "$cpu" = "arm"; then · 7 unmodified lines | ||
| 532 | 527 | fi |
| 533 | 528 | fi |
| 534 | 529 | |
| 530 | +case "$cpuinterp" in | |
| 531 | + arm64) cpuinterp=aarch64;; | |
| 532 | +esac | |
| 533 | + | |
| 534 | +if test -z "$build_cross"; then | |
| 535 | + if test "$mingw32" = "no" ; then | |
| 536 | + if test "$suggest" = "yes"; then | |
| 537 | + if test "$suggest" = "yes"; then | |
| 538 | + if test -f "/lib/ld-uClibc.so.0" ; then | |
| 539 | + echo "Perhaps you want ./configure --config-uClibc" | |
| 540 | + fi | |
| 541 | + if test -f "/lib/ld-musl-${cpuinterp}.so.1"; then | |
| 542 | + echo "Perhaps you want ./configure --config-musl" | |
| 543 | + fi | |
| 544 | + fi | |
| 545 | + fi | |
| 546 | + fi | |
| 547 | +fi | |
| 548 | + | |
| 535 | 549 | # a final configuration tuning |
| 536 | 550 | if test "$cc_name" != "tcc"; then |
| 537 | 551 | OPT1="-Wdeclaration-after-statement" #-fno-strict-aliasing |
| @@ -697,7 +711,7 @@ for v in $cpu $confvars ; do · 159 unmodified lines | ||
| 697 | 711 | CONFIG_musl=yes) print_num CONFIG_TCC_MUSL 1 |
| 698 | 712 | case "$cpu" in |
| 699 | 713 | arm64) default tcc_elfinterp "/lib/ld-musl-aarch64.so.1";; |
| 700 | − *) default tcc_elfinterp "/lib/ld-musl-${cpu}.so.1";; | |
| 714 | + *) default tcc_elfinterp "/lib/ld-musl-${cpuinterp}.so.1";; | |
| 701 | 715 | esac |
| 702 | 716 | ;; |
| 703 | 717 | # other |