Re: [Tinycc-devel] dwarf support

2022-05-06 Thread Ivo van Poorten
C'mon, you cannot put a bunch of #defines under a license. Just use
whatever header file has the proper defines.

On Fri, 6 May 2022 18:59:51 +0200 Herman ten Brugge via Tinycc-devel
 wrote:
> I found another dwarf.h. Is this version OK? (See attachment)
> 
>      Herman
> 
> 
> On 5/6/22 17:28, Brian Callahan wrote:
> > An FYI for packagers: dwarf.h is dual-licensed LGPLv3+ or GPLv2+.
> > This is different than the rest of tcc which is LGPLv2+.
> >
> > ~Brian
> >
> > On 5/5/2022 5:13 AM, Herman ten Brugge via Tinycc-devel wrote:
> >> The new gcc12 release does not support stabs any more.
> >> This was a good reason to add support for dwarf.
> >>
> >> You can enable this by configuring with option --dwarf=x where
> >> x=2..5 Most targets should support version 5.
> >>
> >> Apple probably needs some adjustments in tccmacho.c for this to
> >> work. I do not know how well supported dwarf is on apple.
> >>
> >> I tested this on x86_64, i386, arm, arm64 and riscv64 on
> >> fedora/raspberry pi/*bsd.
> >> All testcases work and most targets support dwarf-5.
> >>
> >> Herman
> >>
> >> ___
> >> Tinycc-devel mailing list
> >> Tinycc-devel@nongnu.org
> >> https://lists.nongnu.org/mailman/listinfo/tinycc-devel

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


Re: [Tinycc-devel] (no subject)

2022-02-27 Thread Ivo van Poorten
TCC generates object code directly. There is no assembly intermediate
step, hence tcc -S does not work.

On Sat, 26 Feb 2022 21:14:49 -0500 Yair Lenga
 wrote: 
> I'm interested in understanding the code generation logic of tcc.
> 
> Is there away to see the intermediate representation that tcc
> generates between the "C" source code, and the object file.
> documentation indicates there tcc can compile assembly source code to
> object, but I could not not find the equivalent of "gcc -S", which
> should convert the "C" code into assembly.
> 
> Yair

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


Re: [Tinycc-devel] Can a biggener (and idiot) like me read and understand TCC's backend so I can create my own frontend with it?

2022-02-24 Thread Ivo van Poorten
On Thu, 24 Feb 2022 11:16:54 -0500 Christopher Conforti
 wrote:
> I hope I got this all straight, and I hope it helps!

Yes, you basically nailed it. If you have a parser for language, you
can either execute it directly in the language your parser
is written in (interpreter), or output intermediate code or assembly or
object code directly (like tcc does).

Writing a compiler starts with writing a parser for your language. What
you do after that (interpret or generate code) is of second concern.
Hope the OP understands that.

Regards,
Ivo

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


Re: [Tinycc-devel] Transputer Target

2022-01-29 Thread Ivo van Poorten
On Sat, 29 Jan 2022 15:39:42 + David Smith via Tinycc-devel
 wrote:
> I soon ran into a brick wall where my knowledge wavered. Any TinyCC
> experts out there that could help?

I guess it would help if you explain which brick wall you actually ran
into :)

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


Re: [Tinycc-devel] issues/questions with stddef.h which comes with tcc

2021-01-04 Thread Ivo van Poorten
On Mon, 4 Jan 2021 09:12:20 -0800 Joshua Scholar
 wrote:
> And I want to mention that there's a license problem for people who
> want to embed Tiny C in a product if they have to use GCC headers,
> since GCC is full GPL.

I have the impression that you do not know the difference between
compiler headers and libc headers. 

You don't need GCC compiler headers for tcc.

If you use glibc and its headers, all is fine. Both tcc and glibc are
licensed under the LGPL.
 
> It would be nice to supply people with a solution to that real
> problem.

You can also use other libc implementations, like bionic or musl. If
that doesn't work at first, that means there are bugs to be fixed.
Either in the library, or in tcc.

This separation of concerns is not obsolete. It's in the latest C17
standard.

Regards,
Ivo

P.S. an extreme example: it is not guaranteed by the C standard that you
can link object files compiled by different compilers, say clang, gcc,
icc and tcc. That's because the implementation dependent stuff can
differ between compilers, and then all hope is lost.

Compiler headers define those differences. libc headers define the rest.



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


Re: [Tinycc-devel] issues/questions with stddef.h which comes with tcc

2021-01-01 Thread Ivo van Poorten
On Fri, 1 Jan 2021 08:27:10 -0800 Joshua Scholar
 wrote:
> I had this experience the other day.
> Someone on Github is building a (not yet finished) jit compiler that
> has a C compiler as a test case.

Do you have a link? Always interested in this kind of projects.

Regards,
Ivo

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


Re: [Tinycc-devel] Request: __attribute__((vector_size))

2020-01-09 Thread Ivo van Poorten
On Thu, 9 Jan 2020 17:19:10 +0100 ian  wrote:
> My main point is so far "why not implement then a * operator dedicated
> to vectors" 
> Believe me, from what I did in languages programmation, overwiting
> such a standard operaor is ALWAYS a very bad idea..

I fully agree. Who am I? I just lurk on this mailinglist, but operator
overloading is something I hope stays out of C forever. If you have
ever had to wade through a multitude of header files to figure out what
an operator does on a certain object, I think you'll know what I mean.
So never add it to C. It's a slippery slope.

Regards,
Ivo

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


Re: [Tinycc-devel] match formats and arguments exactly

2019-06-21 Thread Ivo van Poorten
On Fri, 21 Jun 2019 17:24:16 +0200 "Christian Jullien"
 wrote:
> IMHO gcc compatibility (or VC++ on Windows) should be a goal for tcc.
> We are many to use tcc for its fast development cycle but gcc/vc
> remains the only choice for release.

clang/llvm. gcc is on its way out IMHO. Apple uses clang extensively
for both macOS and iOS.  It's the default compiler. And the Android
Linux kernel already builds with clang and soon vanilla will, too.
There are distro's almost fully build with clang already. Seems to work
on Windows, too (not a windows user myself). Not to mention the code
quality of clang/llvm vs gcc :)

Ivo



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


[Tinycc-devel] Small patch

2013-01-30 Thread Ivo van Poorten
Error:

$ ./configure --cc=tcc
Binary  directory   /usr/local/bin
TinyCC directory/usr/local/lib/tcc
Library directory   /usr/local/lib
Include directory   /usr/local/include
Manual directory/usr/local/share/man
Info directory  /usr/local/share/info
Doc directory   /usr/local/share/doc/tcc
Target root prefix  
Source path  /home/ivo/git/tinycc
C compiler   tcc
Target OSLinux
CPU  x86
Big Endian   no
gprof enabledno
cross compilers  no
use libgcc   no
Creating config.mak and config.h
$ make
[..snip..]
gcc -c lib/bcheck.c -o bcheck.o -I. -I/home/ivo/git/tinycc -Wall -g -O2
-mpreferred-stack-boundary=2 -m386 -malign-functions=0 -m32 cc1: error:
unrecognized command line option -m386


88888888

diff --git a/Makefile b/Makefile
index d257464..0333ebe 100644
--- a/Makefile
+++ b/Makefile
@@ -232,7 +232,7 @@ libtcc1.a : FORCE
 lib/%/libtcc1.a : FORCE $(PROGS_CROSS)
@$(MAKE) -C lib cross TARGET=$*
 bcheck.o : lib/bcheck.c
-   gcc -c $ -o $@ $(CPPFLAGS) $(CFLAGS)
+   $(CC) -c $ -o $@ $(CPPFLAGS) $(CFLAGS)
 FORCE:
 
 # install

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


Re: [Tinycc-devel] Allow configuration of tcc libraries search path

2011-07-11 Thread Ivo van Poorten
On Saturday 09 July 2011, 21:28:21, grischka wrote:
 Rob Landley wrote:
  http://landley.net/hg/tinycc/rev/f304c7e3de8d
  http://landley.net/hg/tinycc/rev/374af493d0ac
  http://landley.net/hg/tinycc/rev/647f1a3feb8b
  http://landley.net/hg/tinycc/rev/22b60bb22c83
  http://landley.net/hg/tinycc/rev/c42c2145d359
  http://landley.net/hg/tinycc/rev/a283eb90c0f7
 ...
 
 Thanks for the commit links.
 
 I have it as git branch btw. If anyone is interested I could push
 it on repo.or.cz.

Be aware that Rob changed the license of his fork to GPL and hence is not 
compatible with the LGPL that tcc is under.

--Ivo

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