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 | fi | 487 | fi |
| 488 | esac | 488 | esac |
| 489 | fi | 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 | fi | 490 | fi |
| 499 | else | 491 | else |
| 500 | # can only make guesses about compiler and target | 492 | # can only make guesses about compiler and target |
| @@ -511,14 +503,17 @@ if test "$bigendian" = "yes" ; then · 10 unmodified lines | |||
| 511 | confvars_set BIGENDIAN | 503 | confvars_set BIGENDIAN |
| 512 | fi | 504 | fi |
| 513 | 505 | ||
| 506 | cpuinterp="$cpu" | ||
| 514 | if test "$cpu" = "arm"; then | 507 | if test "$cpu" = "arm"; then |
| 515 | if test "${triplet%eabihf}" != "$triplet" ; then | 508 | if test "${triplet%eabihf}" != "$triplet" ; then |
| 516 | confvars_set arm_eabihf arm_vfp | 509 | confvars_set arm_eabihf arm_vfp |
| 510 | cpuinterp=armhf | ||
| 517 | elif test "${triplet%eabi}" != "$triplet" ; then | 511 | elif test "${triplet%eabi}" != "$triplet" ; then |
| 518 | confvars_set arm_eabi arm_vfp | 512 | confvars_set arm_eabi arm_vfp |
| 519 | elif test -z "$build_cross"; then | 513 | elif test -z "$build_cross"; then |
| 520 | if test "${_triplet%eabihf}" != "$_triplet" ; then | 514 | if test "${_triplet%eabihf}" != "$_triplet" ; then |
| 521 | confvars_set arm_eabihf arm_vfp | 515 | confvars_set arm_eabihf arm_vfp |
| 516 | cpuinterp=armhf | ||
| 522 | elif test "${_triplet%eabi}" != "$_triplet" ; then | 517 | elif test "${_triplet%eabi}" != "$_triplet" ; then |
| 523 | confvars_set arm_eabi arm_vfp | 518 | confvars_set arm_eabi arm_vfp |
| 524 | elif grep -s -q "^Features.* \(vfp\|iwmmxt\) " /proc/cpuinfo ; then | 519 | elif grep -s -q "^Features.* \(vfp\|iwmmxt\) " /proc/cpuinfo ; then |
| @@ -532,6 +527,25 @@ if test "$cpu" = "arm"; then · 7 unmodified lines | |||
| 532 | fi | 527 | fi |
| 533 | fi | 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 | # a final configuration tuning | 549 | # a final configuration tuning |
| 536 | if test "$cc_name" != "tcc"; then | 550 | if test "$cc_name" != "tcc"; then |
| 537 | OPT1="-Wdeclaration-after-statement" #-fno-strict-aliasing | 551 | OPT1="-Wdeclaration-after-statement" #-fno-strict-aliasing |
| @@ -697,7 +711,7 @@ for v in $cpu $confvars ; do · 159 unmodified lines | |||
| 697 | CONFIG_musl=yes) print_num CONFIG_TCC_MUSL 1 | 711 | CONFIG_musl=yes) print_num CONFIG_TCC_MUSL 1 |
| 698 | case "$cpu" in | 712 | case "$cpu" in |
| 699 | arm64) default tcc_elfinterp "/lib/ld-musl-aarch64.so.1";; | 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 | esac | 715 | esac |
| 702 | ;; | 716 | ;; |
| 703 | # other | 717 | # other |