Hi, 

What happens if you configure as below?

./configure --config-musl --config-elfinterp=/lib/ld-musl-armhf.so.1

If it still fails, can you try this patch?

diff --git a/tcc.h b/tcc.h
index ef69ef5..bfe28b6 100644
--- a/tcc.h
+++ b/tcc.h
@@ -331,9 +331,11 @@ extern long double strtold (const char *__nptr, char 
**__endptr);
 #  if defined(TCC_MUSL)
 #   if defined(TCC_TARGET_I386)
 #     define CONFIG_TCC_ELFINTERP "/lib/ld-musl-i386.so.1"
-#    else
+#   elif defined(TCC_ARM_HARDFLOAT)
+#     define CONFIG_TCC_ELFINTERP "/lib/ld-musl-armhf.so.1"
+#   else
 #     define CONFIG_TCC_ELFINTERP "/lib/ld-musl-arm.so.1"
-#    endif
+#   endif
 #  else
 #   define CONFIG_TCC_ELFINTERP "/lib/ld-linux.so.2"
 #  endif


C
-----Original Message-----
From: Tinycc-devel [mailto:[email protected]] On 
Behalf Of raingloom
Sent: Wednesday, February 23, 2022 00:07
To: [email protected]
Cc: [email protected]
Subject: Re: [Tinycc-devel] wrong interpreter on armhf

On Tue, 22 Feb 2022 07:23:44 -0700
[email protected] wrote:

> Try symlinking the existing file to what tcc wants. Sometimes
> we get lucky... :-)
> 
> Arnold
> 
> raingloom <[email protected]> wrote:
> 
> > Hi! I recently tried tcc on a postmarketOS (Alpine) device. It
> > seems to generate the correct binary for hello world and even -run
> > worked, but the resulting binary can't be run directly.
> > It expects /lib/ld-musl-arm.so.1, but only /lib/ld-musl-armhf.so.1
> > exists.
> >
> > _______________________________________________
> > Tinycc-devel mailing list
> > [email protected]
> > https://lists.nongnu.org/mailman/listinfo/tinycc-devel  

That would work but would be kind of ugly, I'd prefer a proper fix.

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to