Hi Scott,
I confirm! I tested this sample with mod on Debian RPi 4 armv7l and had a
similar error:

$ tcc -static foo.c
tcc: error: Unknown relocation type for got: 107
$ tcc foo.c

-hh help says:
  -static                       link to static libraries (not recommended)

Why is it not recommended? Because it is not well supported or just because
shared lib, by ideology, is generally preferred?
My OpenLisp comes in two flavors with gcc: static and shared. When speed
matters, I recommend the static one which is significantly faster.

C.

-----Original Message-----
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org]
On Behalf Of John Scott
Sent: Saturday, May 30, 2020 16:55
To: tinycc-devel@nongnu.org
Subject: [Tinycc-devel] error: Unknown relocation type for got: 23 with
-static

Hi,

I was trying to do a build of Tor statically but ran into this issue with
current master and 0.9.27 package in Debian. I can reproduce with this:
 #include <stdlib.h>
 int main(){ char *p = NULL; free(p); }

and tcc -static gives the error. Is this a bug in tcc or elsewhere?

Sincerely,
John Scott


_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to