tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] wrong interpreter on armhf


From: Christian Jullien
Subject: Re: [Tinycc-devel] wrong interpreter on armhf
Date: Wed, 23 Feb 2022 07:39:29 +0100

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:tinycc-devel-bounces+eligis=orange.fr@nongnu.org] On 
Behalf Of raingloom
Sent: Wednesday, February 23, 2022 00:07
To: arnold@skeeve.com
Cc: tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] wrong interpreter on armhf

On Tue, 22 Feb 2022 07:23:44 -0700
arnold@skeeve.com wrote:

> Try symlinking the existing file to what tcc wants. Sometimes
> we get lucky... :-)
> 
> Arnold
> 
> raingloom <raingloom@riseup.net> 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
> > Tinycc-devel@nongnu.org
> > 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
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]