Re: [Tinycc-devel] tcc_relocate is missing in libtcc.dll

2019-05-12 Thread Christian Jullien
Antoni,

 

If it helps, I maintain https://sourceforge.net/projects/wintcc/

Which easily builds a tcc multi-arch standalone archive for Windows.

It bootstraps tcc from Cygwin gcc and finally generates tcc buit by tcc
Windows build (i.e. a reproducible build).

 

It contains only a Makefile you just have to drop on win32 tcc directory.

 

The generated dll contains in this case tcc_relocate you were looking for.

 

It can also generate small zip and tar.gz you can then deploy on any Windows
machine wo. C compiler.

 

C.

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org]
On Behalf Of Antoni Nowinowski
Sent: Sunday, May 12, 2019 00:47
To: tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] tcc_relocate is missing in libtcc.dll

 

Hi,

I'm sorry for my own stupidity. Both msvc and gcc implicitly generated i386
output, but I'm using x86_64 windows so the TCC_IS_NATIVE flag wasn't
defined. That's why tcc_relocate wasn't exported. Sadly, I discovered this
after few days of digging into the code.

Best wishes,

Antoni Nowinowski



Od: Michael Matz

Wysłano: niedziela, 12 maja, 00:25

Temat: Re: [Tinycc-devel] tcc_relocate is missing in libtcc.dll

Do: tinycc-devel@nongnu.org



Hi,

On Fri, 10 May 2019, Antoni Nowinowski wrote:

> I'm working on small jit project that's already worked with precompiled
tcc

> downloaded from bellard.org/tcc/. To be more "professional" I compiled tcc

> from source as described in tcc-win32.txt . Resulting libtcc.dll wasn't

> exporting tcc_relocate (I used both gcc and msvc in both mob and master

> branches).

I can't say much about this as I'm not using Windows, but AFAICS 

tcc_relocate isn't defined or declared different from (say) 

tcc_compile_string or tcc_add_file, which I assume you're using as well. 

So I would be surprised if one is exported but the other isn't.  Are you 

100% sure the problem is libtcc.dll not exporting a function, and not 

something like a missing declaration or the like?

> To my suprise libtcc.dll compiled by tcc contained the missing

> function but it was crashing jit project executable compiled with

> appropriate lib file. Is this expected behaviour?

No.

> If yes, how to achieve effect similar to libtcc_test.c? Finally, why 

> libtcc_test.c is gone? Thank you for your patience.

libtcc_test.c is there just fine:

% ls -l tests/libtcc_test.c

-rw-r--r-- 1 matz users 2273 Mär 18 04:20 tests/libtcc_test.c



Ciao,

Michael.



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


Re: [Tinycc-devel] tcc_relocate is missing in libtcc.dll

2019-05-11 Thread Antoni Nowinowski
Hi,
I'm sorry for my own stupidity. Both msvc and gcc implicitly generated i386 
output, but I'm using x86_64 windows so the TCC_IS_NATIVE flag wasn't defined. 
That's why tcc_relocate wasn't exported. Sadly, I discovered this after few 
days of digging into the code.

Best wishes,
Antoni Nowinowski


Od: Michael Matz
Wysłano: niedziela, 12 maja, 00:25
Temat: Re: [Tinycc-devel] tcc_relocate is missing in libtcc.dll
Do: tinycc-devel@nongnu.org


Hi,

On Fri, 10 May 2019, Antoni Nowinowski wrote:

> I'm working on small jit project that's already worked with precompiled tcc
> downloaded from bellard.org/tcc/. To be more "professional" I compiled tcc
> from source as described in tcc-win32.txt . Resulting libtcc.dll wasn't
> exporting tcc_relocate (I used both gcc and msvc in both mob and master
> branches).

I can't say much about this as I'm not using Windows, but AFAICS
tcc_relocate isn't defined or declared different from (say)
tcc_compile_string or tcc_add_file, which I assume you're using as well.
So I would be surprised if one is exported but the other isn't.  Are you
100% sure the problem is libtcc.dll not exporting a function, and not
something like a missing declaration or the like?

> To my suprise libtcc.dll compiled by tcc contained the missing
> function but it was crashing jit project executable compiled with
> appropriate lib file. Is this expected behaviour?

No.

> If yes, how to achieve effect similar to libtcc_test.c? Finally, why
> libtcc_test.c is gone? Thank you for your patience.

libtcc_test.c is there just fine:

% ls -l tests/libtcc_test.c
-rw-r--r-- 1 matz users 2273 Mär 18 04:20 tests/libtcc_test.c


Ciao,
Michael.


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


Re: [Tinycc-devel] tcc_relocate is missing in libtcc.dll

2019-05-11 Thread Michael Matz

Hi,

On Fri, 10 May 2019, Antoni Nowinowski wrote:


I'm working on small jit project that's already worked with precompiled tcc
downloaded from bellard.org/tcc/. To be more "professional" I compiled tcc
from source as described in tcc-win32.txt . Resulting libtcc.dll wasn't
exporting tcc_relocate (I used both gcc and msvc in both mob and master
branches).


I can't say much about this as I'm not using Windows, but AFAICS 
tcc_relocate isn't defined or declared different from (say) 
tcc_compile_string or tcc_add_file, which I assume you're using as well. 
So I would be surprised if one is exported but the other isn't.  Are you 
100% sure the problem is libtcc.dll not exporting a function, and not 
something like a missing declaration or the like?



To my suprise libtcc.dll compiled by tcc contained the missing
function but it was crashing jit project executable compiled with
appropriate lib file. Is this expected behaviour?


No.

If yes, how to achieve effect similar to libtcc_test.c? Finally, why 
libtcc_test.c is gone? Thank you for your patience.


libtcc_test.c is there just fine:

% ls -l tests/libtcc_test.c
-rw-r--r-- 1 matz users 2273 Mär 18 04:20 tests/libtcc_test.c


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


[Tinycc-devel] tcc_relocate is missing in libtcc.dll

2019-05-10 Thread Antoni Nowinowski
Hello,
I'm working on small jit project that's already worked with precompiled tcc 
downloaded from bellard.org/tcc/. To be more 
"professional" I compiled tcc from source as described in tcc-win32.txt . 
Resulting libtcc.dll wasn't exporting tcc_relocate (I used both gcc and msvc in 
both mob and master branches). To my suprise libtcc.dll compiled by tcc 
contained the missing function but it was crashing jit project executable 
compiled with appropriate lib file. Is this expected behaviour? If yes, how to 
achieve effect similar to libtcc_test.c? Finally, why libtcc_test.c is gone? 
Thank you for your patience.

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