mailing list of musl libc
 help / color / mirror / code / Atom feed
* 8cc C Compiler
@ 2015-03-02 11:43 Daniel Cegiełka
  2015-03-02 18:47 ` Charlie Kester
  2015-03-02 18:49 ` Rich Felker
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel Cegiełka @ 2015-03-02 11:43 UTC (permalink / raw)
  To: musl

https://github.com/rui314/8cc

"8cc is a compiler for the C programming language. It's intended to
support all C11 language features while keeping the code as small and
simple as possible."

best regards,
Daniel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 8cc C Compiler
  2015-03-02 11:43 8cc C Compiler Daniel Cegiełka
@ 2015-03-02 18:47 ` Charlie Kester
  2015-03-02 18:49 ` Rich Felker
  1 sibling, 0 replies; 7+ messages in thread
From: Charlie Kester @ 2015-03-02 18:47 UTC (permalink / raw)
  To: musl

On Mon 02 Mar 2015 at 03:43:32 PST Daniel Cegiełka wrote:
>https://github.com/rui314/8cc
>
>"8cc is a compiler for the C programming language. It's intended to
>support all C11 language features while keeping the code as small and
>simple as possible."

In other contexts, "cc" stands for "cubic centimeters".  So naming this
compiler 8cc is a clever way to highlight its small size.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 8cc C Compiler
  2015-03-02 11:43 8cc C Compiler Daniel Cegiełka
  2015-03-02 18:47 ` Charlie Kester
@ 2015-03-02 18:49 ` Rich Felker
  2015-03-02 19:42   ` Daniel Cegiełka
  1 sibling, 1 reply; 7+ messages in thread
From: Rich Felker @ 2015-03-02 18:49 UTC (permalink / raw)
  To: musl

On Mon, Mar 02, 2015 at 12:43:32PM +0100, Daniel Cegiełka wrote:
> https://github.com/rui314/8cc
> 
> "8cc is a compiler for the C programming language. It's intended to
> support all C11 language features while keeping the code as small and
> simple as possible."

Have you done any analysis on what would be needed to get it compiling
musl? I suspect some minor extensions would be needed and it would be
nice to know if the author is open to such changes.

Rich


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 8cc C Compiler
  2015-03-02 18:49 ` Rich Felker
@ 2015-03-02 19:42   ` Daniel Cegiełka
  2015-03-02 19:59     ` Rich Felker
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Cegiełka @ 2015-03-02 19:42 UTC (permalink / raw)
  To: musl

2015-03-02 19:49 GMT+01:00 Rich Felker <dalias@libc.org>:

> Have you done any analysis on what would be needed to get it compiling
> musl? I suspect some minor extensions would be needed and it would be
> nice to know if the author is open to such changes.

I think this is the answer to the above:

"Note: Do not have high expectations on this compiler. If you try to
compile a program other than the compiler itself, there's a good
chance to see compile errors or miscompilations. This is basically a
one-man project, and I have spent only a few months of my spare time
so far."

but it does not change the fact that the compiler is really amazing...

> Rich


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 8cc C Compiler
  2015-03-02 19:42   ` Daniel Cegiełka
@ 2015-03-02 19:59     ` Rich Felker
  2015-03-02 20:42       ` Jens Gustedt
  0 siblings, 1 reply; 7+ messages in thread
From: Rich Felker @ 2015-03-02 19:59 UTC (permalink / raw)
  To: musl

On Mon, Mar 02, 2015 at 08:42:49PM +0100, Daniel Cegiełka wrote:
> 2015-03-02 19:49 GMT+01:00 Rich Felker <dalias@libc.org>:
> 
> > Have you done any analysis on what would be needed to get it compiling
> > musl? I suspect some minor extensions would be needed and it would be
> > nice to know if the author is open to such changes.
> 
> I think this is the answer to the above:
> 
> "Note: Do not have high expectations on this compiler. If you try to
> compile a program other than the compiler itself, there's a good
> chance to see compile errors or miscompilations. This is basically a
> one-man project, and I have spent only a few months of my spare time
> so far."
> 
> but it does not change the fact that the compiler is really amazing...

Assuming it's complete to C11 but without any GNU extensions, that's
really really close to being able to compile musl libc.a. I read that
the author isn't interested in large patches, but that doesn't mean
that proposing the idea of getting it into a state where it could
compile musl would be unreasonable, or that proposing specific small
patches would.

Rich


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 8cc C Compiler
  2015-03-02 19:59     ` Rich Felker
@ 2015-03-02 20:42       ` Jens Gustedt
  0 siblings, 0 replies; 7+ messages in thread
From: Jens Gustedt @ 2015-03-02 20:42 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 1361 bytes --]

Am Montag, den 02.03.2015, 14:59 -0500 schrieb Rich Felker:
> Assuming it's complete to C11 but without any GNU extensions, that's
> really really close to being able to compile musl libc.a. I read that
> the author isn't interested in large patches, but that doesn't mean
> that proposing the idea of getting it into a state where it could
> compile musl would be unreasonable, or that proposing specific small
> patches would.

Hm, I just tried a bit, and there are not much musl files that it
compiles successfully, yet :( On some it gives a clue what's wrong, on
many others it simply crashes, it seems.

Also, support for _Complex, _Atomic, _Static_assert seems to be
missing, which for me makes it a bit pointless to claim C11
conformance.

And it simply doesn't work with the header files that my system
provides. Makes me realize how gcc'ish linux distributions are. But
using it with musl and its clean headers should be easier to do.

Compile time and code size of the compiler are in fact really
impressive.

Jens

-- 
:: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::






[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 8cc C Compiler
       [not found] <20150302070332.dc30d64f61e5ec441c34ffd4f788e58e.fa0cadfe0e.wbe@email22.secureserver.net>
@ 2015-03-02 14:52 ` Daniel Cegiełka
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Cegiełka @ 2015-03-02 14:52 UTC (permalink / raw)
  To: writeonce, musl

2015-03-02 15:03 GMT+01:00 <writeonce@midipix.org>:
>
> Hi Daniel,
>
> Very nice, congratulations!

Oh no! :) I'm not the author of 8cc :) We must thank Rui Ueyama...
On musl list often talked about small compilers (pcc, tcc, cparser/firm etc.).

thx

> And also a small bug report... with German as the UI language of my ubuntu installation, the realpath of my desktop folder is /home/midipix/Arbeitsfläche. After successfully building 8cc at /home/midipix/Arbeitsfläche/8cc, the compiler failed at runtime as it was unable to open its include directory.  When building 8cc at /home/midipix/8cc, everything is fine.
>
> I hope that helps!
>
> Zvi


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-02 20:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-02 11:43 8cc C Compiler Daniel Cegiełka
2015-03-02 18:47 ` Charlie Kester
2015-03-02 18:49 ` Rich Felker
2015-03-02 19:42   ` Daniel Cegiełka
2015-03-02 19:59     ` Rich Felker
2015-03-02 20:42       ` Jens Gustedt
     [not found] <20150302070332.dc30d64f61e5ec441c34ffd4f788e58e.fa0cadfe0e.wbe@email22.secureserver.net>
2015-03-02 14:52 ` Daniel Cegiełka

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).