9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Compiling ken-cc on Linux
@ 2015-11-28  6:42 da Tyga
  2015-11-28  7:40 ` Brantley Coile
  2015-11-28 20:13 ` Ryan Gonzalez
  0 siblings, 2 replies; 45+ messages in thread
From: da Tyga @ 2015-11-28  6:42 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

I have been following this discussion about the C compiler and can no
longer stop myself from making a (snarky?) comment.

The K&R standard for C was very much written when the C language was a
higher than assembler language for the PDP-11 (at least that's how I became
acquainted with it back in 1976).  Most of us, in those days, welcomed
something that was more high level than macro-assembler and yet amenable to
writing operating systems and utilities (unlike FORTRAN, ALGOL and COBOL of
that era).  Many of us would use the -s switch to check the generated
assembler code and in some cases even modify the assembler code for
selected functions to get exactly the desired result.

The PDP-11 had a rather simple instruction set, thus the compiler produced
relatively predictable code.  The undefined behaviours in many cases meant
that at least on the PDP-11 we would know what to expect.  It was only once
code was ported to other systems that these assumptions started getting
sorely tested.

Fast forward to present time, we have a bloated C standard and even more
bloated C++ standards.  The target instruction sets are rich with lots of
special case instructions; out of sequence execution; multi-level caches
add further constraints.  So today's compilers need to analyse complex
source code to run with good performance on extremely complex targets.  We
shouldn't forget that in the case of the x86 family the compilers need to
optimise for an ever evolving instruction set and retain backward
compatibility across earlier variants.


On 28 November 2015 at 12:01, erik quanstrom <quanstro@quanstro.net> wrote:

> > Funny, but actually I was wondering if there is any subtle issue in the
> > standards of the C language that makes it somehow hard to implement.
> > For example I've met a few times weird implementations of libraries and
> > frameworks dictated by broken standards: once they are in, they can never
> > be removed due to backward compatibility. I thought that Charles (that
> also
> > implemented the Limbo compiler) might have referenced these kind of
> issues
> > in his pun.
>
> i think the simple answer is: no.  but many folks just love complexity,
> and are
> determined to find it.  if you give such a person one problem, they'll
> come back
> with two problems.  i call these folks complicators.  don't be a
> complicator.
>
> (i have to remind myself this from time to time.)
>
> - erik
>
>

[-- Attachment #2: Type: text/html, Size: 2967 bytes --]

^ permalink raw reply	[flat|nested] 45+ messages in thread
* [9fans] Compiling ken-cc on Linux
@ 2015-11-25 17:10 Vasudev Kamath
  2015-11-25 17:15 ` Ryan Gonzalez
  2015-11-26 12:10 ` Charles Forsyth
  0 siblings, 2 replies; 45+ messages in thread
From: Vasudev Kamath @ 2015-11-25 17:10 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


Hi,

I'm trying to compile ken-cc from ¹. Its giving me following error

cc -c -m32 -g -O -I/home/vasudev/Documents/C_programming/compilers/9-cc/Linux/386/include -I/home/vasudev/Documents/C_programming/compilers/9-cc/include -DLINUX_386 -I../cmd/ 9obj.c
In file included from /home/vasudev/Documents/C_programming/compilers/9-cc/Linux/386/include/lib9.h:9:0,
                 from 9obj.c:5:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^
9obj.c:8:22: fatal error: 9c/9.out.h: No such file or directory
compilation terminated.
mk: cc -c -m32 ...  : exit status=exit(1)
mk: for j in ...  : exit status=exit(1)

I can't find 9c under src/cmd folder. Any hints on how to get it
compiled?.

Cheers,

¹ https://bitbucket.org/plan9-from-bell-labs/9-cc/overview



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

end of thread, other threads:[~2015-11-30 15:46 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-28  6:42 [9fans] Compiling ken-cc on Linux da Tyga
2015-11-28  7:40 ` Brantley Coile
2015-11-28 20:31   ` Anthony Sorace
2015-11-28 23:33     ` Brantley Coile
2015-11-29  6:12       ` lucio
2015-11-28 20:13 ` Ryan Gonzalez
2015-11-29  5:57   ` lucio
2015-11-29 16:17     ` tlaronde
  -- strict thread matches above, loose matches on Subject: below --
2015-11-25 17:10 Vasudev Kamath
2015-11-25 17:15 ` Ryan Gonzalez
2015-11-25 17:24   ` Vasudev Kamath
2015-11-26 12:08     ` Charles Forsyth
2015-11-27 16:50   ` Vasudev Kamath
2015-11-27 16:59     ` Ryan Gonzalez
2015-11-27 17:16       ` Vasudev Kamath
2015-11-27 18:24         ` Ryan Gonzalez
2015-11-29  9:41           ` Vasudev Kamath
2015-11-29 14:38             ` Ryan Gonzalez
2015-11-27 18:11   ` trebol
2015-11-26 12:10 ` Charles Forsyth
2015-11-26 12:18   ` David du Colombier
2015-11-26 18:15   ` Ryan Gonzalez
2015-11-26 21:31     ` Charles Forsyth
2015-11-26 21:49       ` Ryan Gonzalez
2015-11-26 21:51         ` Charles Forsyth
2015-11-26 21:56           ` Charles Forsyth
2015-11-26 22:02             ` Ryan Gonzalez
2015-11-26 22:08               ` Charles Forsyth
2015-11-26 22:30                 ` David du Colombier
2015-11-26 23:08                   ` Ryan Gonzalez
2015-11-26 23:21                     ` Charles Forsyth
2015-11-26 23:41                       ` Ryan Gonzalez
2015-11-27  0:02                       ` Brantley Coile
2015-11-27  8:13                       ` Giacomo Tesio
2015-11-27  8:56                         ` arnold
2015-11-27 13:33                           ` Steffen Nurpmeso
2015-11-28  0:55                             ` erik quanstrom
2015-11-30 15:46                               ` Steffen Nurpmeso
2015-11-27 12:42                         ` tlaronde
2015-11-27 14:07                           ` Giacomo Tesio
2015-11-27 14:34                             ` tlaronde
2015-11-28  1:01                             ` erik quanstrom
2015-11-27 12:05                       ` Steffen Nurpmeso
2015-11-27 12:32       ` lucio
2015-11-26 21:40     ` Andrew Simmons

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).