Re: [Tinycc-devel] Problem including pthreadtypes.h

2006-10-30 Thread Fred Weigel
I have a fix for that, as does Rob Landley. In a nutshell, libc.so is a
script, and uses AS_NEEDED, which the tcc elf loader doesn't understand.

Rob has a collection of patches, and a tarball of the updated compiler
(Thanks Rob!). Since his solution is more useful, I'll hold off. If Rob
publishes the location of the tarball, snag it, and everything should
work.

Fred Weigel.

On Mon, 2006-10-30 at 13:33 +, Marc van Dongen wrote:
 * Fred Weigel [EMAIL PROTECTED] [2006-10-28 11:24:45 -0400]:
 
 : On line 70 of /usr/include/bits/pthreadtypes.h, change
 : };
 : to
 : } __NOT_ANON_UNION_TCC;
 : 
 : Fred Weigel.
 
 Thanks a Mille Fred,
 
 That worked. I now get the following:
 
 tcc: file 'AS_NEEDED' not found
 /usr/lib/libc.so:3: filename expected
 /usr/lib/libc.so:3: unrecognized file type
 
 I get this both with tcc-0.9-22 and tcc-0.9.23.
 
 If I try from the command line I get:
 
 $ ./tcc ../tmp.c
 tcc: file 'AS_NEEDED' not found
 /usr/lib/libc.so:3: filename expected
 /usr/lib/libc.so:3: unrecognized file type
 tcc: undefined symbol '__gcc_personality_v0'
 tcc: undefined symbol '_Unwind_Resume'
 tcc: undefined symbol '_Unwind_Backtrace'
 tcc: undefined symbol '_Unwind_GetIP'
 tcc: undefined symbol '_Unwind_GetGR'
 tcc: undefined symbol '_Unwind_GetCFA'
 
 I couldn't find a solution for this problem on the web.
 Any suggestions?
 
 Regards,
 
 
 Marc
 
 
 ___
 Tinycc-devel mailing list
 Tinycc-devel@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/tinycc-devel



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


Re: [Tinycc-devel] Problem including pthreadtypes.h

2006-10-30 Thread Rob Landley
On Monday 30 October 2006 9:20 am, Fred Weigel wrote:
 I have a fix for that, as does Rob Landley. In a nutshell, libc.so is a
 script, and uses AS_NEEDED, which the tcc elf loader doesn't understand.
 
 Rob has a collection of patches, and a tarball of the updated compiler
 (Thanks Rob!). Since his solution is more useful, I'll hold off. If Rob
 publishes the location of the tarball, snag it, and everything should
 work.

It's public: http://landley.net/code/tinycc/tinycc-snapshot.tbz (or with 
mercurial do an hg clone static-http://landley.net/code/tinycc;).  It's 
mostly stuff I collected off of this list (some of it as old as 2004, 
though.)  But I'm not maintaining it anymore now that Fabrice is back.  I 
sent all the patches I'd collected to him as a broken-out tarball, but 
haven't heard back...

No, I don't do CVS. :)

Rob
-- 
Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away. - Antoine de Saint-Exupery


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


Re: [Tinycc-devel] Problem including pthreadtypes.h

2006-10-28 Thread Fred Weigel
Marc

On line 70 of /usr/include/bits/pthreadtypes.h, change
};
to
} __NOT_ANON_UNION_TCC;

The union has to have a name.

Fred Weigel.

On Sat, 2006-10-28 at 15:05 +0100, Marc van Dongen wrote:
 Dear all,
 
 I'm migrating to a new machine, when I got the following error with libtcc:
 In file included from /tmp/bordewijkRpFK11.c:2:
 In file included from /usr/include/stdlib.h:438:
 In file included from /usr/include/sys/types.h:270:
 /usr/include/bits/pthreadtypes.h:69: identifier expected
 tcc: file 'AS_NEEDED' not found
 /usr/lib/libc.so:3: filename expected
 /usr/lib/libc.so:3: unrecognized file type
 The following is a snipped of /usr/include/bits/pthreadtypes.h
 55: typedef union
 56: {
 57:   struct __pthread_mutex_s
 58:   {
 59: int __lock;
 60: unsigned int __count;
 61: int __owner;
 62: /* KIND must stay at this position in the structure to maintain
 63:binary compatibility.  */
 64: int __kind;
 65: unsigned int __nusers;
 66: __extension__ union
 67: {
 68:   int __spins;
 69:   __pthread_slist_t __list;
 70: };
 71:   } __data;
 72:   char __size[__SIZEOF_PTHREAD_MUTEX_T];
 73:   long int __align;
 74: } pthread_mutex_t;
 
 I'm using gcc version 4.1.0 (SUSE Linux) and tcc-0.9.22/.
 
 I noticed there was a thread reporting a similar problem.
 Any suggestions on how to solve this would be much appreciated.
 
 Regards,
 
 
 Marc van Dongen



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