Re: [Tinycc-devel] tcc shared libraries with gcc programs

2011-09-01 Thread grischka

Rob Heatherly wrote:

tcc -Wall -Wunsupported -bench -shared -soname libyLOG.so.1 -o
libyLOG.so.1.0  -lrt  yLOG.c

It performs as expected when my main program is compiled with tcc, but
when that same main program is complied with gcc I get the following
when linking...

libyLOG.so: file not recognized: File format not recognized

When I recompile the yLOG library with the tcc "-g" flag, the main gcc
program compiles/links to it with no problem.  Small, but maybe
confusing deal.  Am I missing or doing something classically stupid?


Indeed that looks confusing.  I tried this setup with a _very_
simple foo.so (with only one "hello world" type function) and it
seemed to work finr, regardless of -g. (using a gcc 4.3.2 on an
older ubuntu64 for the main program).

However I also tried that with libtcc.so as produced with
./configure --disable-static
and then running the result gave a lot of errors about relocations
out of range and then crashed.  Also regardless of -g.

Which suggests that there might be something wrong with tcc's
shared libraries on x86-64.  I can't tell what however.

One thing to note is that tcc does not support -fPIC while gcc
actually requires it for libtcc.so.  Maybe it has to do with
that, maybe not.

--- grischka


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


Re: [Tinycc-devel] introduction, patch, and bug report

2011-09-01 Thread grischka

Damian Gryski wrote:

Hi,

I've submitted some bug reports and patches for TCC in the past, and I
figured I'd introduce myself before pushing a fix to the mob branch.


You're welcome.



My patch adds support for Ubuntu 11.04 x86_64, and possibly others.


Looks acceptable.

Maybe instead of TCC_TARGET_UBUNTU (which sounds too specific and
ubuntu is not a processor target really) you could use something
like
CONFIG_MULTIARCHDIR=\"x86_64-linux-gnu\"

But feel free to do as you see fit.

--- grischka


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