OpenBSD Journal

Tendra Imported into Ports Tree

Contributed by jose on from the alternative-compilers dept.

The ports tree has a new entry, lang/tendra . Tendra 20030803 was imported recently. We've discussed Tendra, a BSD licensed C compiler , and how it now works on OpenBSD . This provides a nice healthy alternative ot GCC. Thanks, Anil.

(Comments are closed)

  1. By sbalneav () on

    I haven't (as yet) played around with Tendra. Although my compiler construction course at university was a long time ago now, maybe it's time to dust off the Dragon Book and play around with the internals of Tendra. I'd love to see a BSD licensed compiler become part of OpenBSD.


  2. By William Ahern () on

    I just hopes that it never becomes the default compiler, like many on tech@ have alluded/threatened. Shared-code is a Good Thing(tm). They say GCC is too complicated. But how long would
    the realpath(3) bug have lurked if realpath(3) wasn't so widely used in other software? There's a fine line between being security conscious, and missing-out on the "many eye-balls" phenomenon.
    And that's not a slight against Tendra. Not only
    would OpenBSD be the only ones using Tendra, but
    OpenBSD users might be forced to re-write many applications which depend on GCC, thus creating
    even more niche software with few users.

    The fact of the matter is that GCC is a de facto
    free software and open source platform, every bit
    as much as Java or .Net is a platform. Tendra would make a superb adjunct, but not a replacement.

    1. By schubert () on

      Where did you get the idea that GCC would suddenly go away if tendra became the default? just like if perl gets taken out of base its not just going to magically disappear forever. gcc would obviously become a port (as would perl) and this is only in the hypothetical situation described.

      The bit about "many eyes" doesn't really hold much water given OpenBSD's smaller development team and track record and it doesn't apply in the idea of switching compilers; a bug in some code should still exist regardless of which compiler you use (otherwise someone is doing something wrong).

      It also comes down to what is more important to OpenBSD in terms of goals... is the idea of shipping a pure BSD licensed OS (excluding ports) paramount?

      1. By Anonymous Coward () on

        Obviously, no. The necessity would have driven Tendra or a Tendra-like alternative much sooner into the light.

        But there is segregation in the Open Source community. Too many times, we see GPL licensed projects focus primarily on GPL'd OS to the detriment of other licenses; meanwhile, they took full advantage of more open/free licensed projects (X using the X license; Apache and the Apache license--heck, most people don't realize these are non-GPL'd). (I tend to replace your "pure BSD licensed" to really mean BSD flavor licenses.)

        (The classic case to me was Mozilla--the developers prioritized putting a kitchen sink ascii in before committing OBSD patches that allowed the code to compile on OBSD.)

        Tendra gives people another option. Further, if people work on this, maybe it also will allow optimizations and what not to occur quicker. I don't see this as a bad thing, and not really as an avoidance of potential future philosophy or license issues, although Tendra certainly may, soon, be a option if such a thing took place.

        That said, I don't believe gcc is going to go pull an IPF with it's license or some crap. But having alternatives and competition is a good thing, imnsho.

    2. By Anonymous Coward () on

      OpenBSD is trying to avoid as much GPL'd softwares as possible.

      FreeBSD would be close to your needs.

      1. By Anonymous Coward () on

        OpenBSD is trying to avoid as much GPL'd softwares as possible.
        Duh. Read the GPL. It's "free" nature contains restrictions.
        FreeBSD would be close to your needs.
        Fine. You use it then too. And don't come back.

      2. By Jadipai () on

        This discussion is not about avoiding GPL'ed software and GCC is not going away. What are you telling what OS people should use...

    3. By Anonymous Coward () on

      "OpenBSD users might be forced to re-write many applications which depend on GCC"

      Is this a joke?
      Have you ever heard about portable code ?

      Specific GNU extensions are just pure shit.

    4. By grey () on

      Theo has spoken a bit about this informally at one time or another. My recollection is that he wasn't too impressed with Tendra (at least several months ago), and I don't think was anywhere near to thinking of switching to it. He also had a bit of opinion on how gcc's optimizations are turning up some problems and that he would rather have completely unoptimized code that gave him predictable output than the other way around. For such reasons, as the time he lamented that he wished that the plan9 compiler was given a more apropriate license since that would best fit some of his preferences.

      Keep in mind that none of this is verbatim, and I've likely munged up some of the finer points (or even big glaring issues) of what he was saying; but that might give you kind of the jist.

      I think a BSD licensed C compiler is very promising - whether OpenBSD moves to it ultimately would depend a lot more on how it evolves, and how it compares with the alternatives as well. Sort of like CVS vs OpenCM - one works OK now, and while the other has some more attractive aspects, it's just not ready for OpenBSD's usage right now. Things may change in the future.

      1. By Jeroen Ruigrok van der Werven () on

        That's right. I can definately understand that Theo wasn't impressed yet, we have over 4 years to catch up to, including C99.

        The thing that I dislike is that GCC puts the emphasis on wrong aspects of what a compiler should do. Like OpenBSD wants to make sure it has the best secure installation out of the base system and pro-active security auditing and set-up, so is TenDRA's primary goal to always produce correct code. I've seen GCC drop too many balls in that aspect.

        Theo's idea is something I've been advocating within the TenDRA Project for a while. I am a strong proponent of the 'always produce correct code' idea. For what it is worth I have been looking at plan9's architecture as well.

        Are there any pointers to the stack protection stuff or would it mean delving into the gcc in the OpenBSD and comparing it to a stock version?

        Personally I think the error reporting from TenDRA outweighs GCC's.

        1. By Anil () avsm@ on mailto:avsm@

          You can check out Etoh's patches against gcc-3.3 ... he also has a really good writeup of what he does at a higher level, which is probably more useful to tendra ...

          1. By Jeroen Ruigrok van der Werven () on

            Thanks Anil...

    5. By Anil () avsm@ on mailto:avsm@

      Look, we are just getting tendra working on OpenBSD as a port. Not switching our base compiler or anything.

      If you are actually interested in seeing it capable of compiling the base system (let alone becoming default), then start hacking around with it and report bugs back to the tendra team. If you are not interested in this, then don't do anything, and it will probably never happen.

      Or, you could sit around here posting lyrical about "de facto free softare and open source platforms" and other such crap, I guess.

    6. By RC () on

      > The fact of the matter is that GCC is a de facto
      free software and open source platform

      Monoculture is bad... Even with compilers.

      Besides, your arguement just doesn't hold water. If "many eyeballs" or "de facto"-"platform" was an issue, OpenBSD would be using BASH instead of KSH. In fact, there wouldn't even be an OpenBSD since Linux has more eyeballs, and is (seeming to) becomming a defacto platform.

      Frankly, I think one thing the Open Source software world needs more than anything else is some real competition in the compilier arena. A good compilier is crucial to all software, and gcc is really quite awful. Intel's release of their own compilier showed just how poor gcc really is, and competition from tendra would only help the Open Source world as a whole.

      Besides, look at it this way... Any code that goes into tendra can be leeched into gcc, but code that goes into gcc can't be used in tendra.

  3. By Anonymous Coward () on

    pkg_create: tar command failed with code 256
    ===> Cleaning for tendra-20030803p0
    rm -f /usr/ports/packages/i386/all/tendra-20030803p0.tgz
    *** Error code 1

    Stop in /usr/ports/lang/tendra (line 1710 of /usr/ports/infrastructure/mk/
    *** Error code 1

    Stop in /usr/ports/lang/tendra (line 522 of /usr/ports/infrastructure/mk/

  4. By Anonymous Coward () on

    It's really great to hear that tendra is continuing to grow. Hopefully it'll someday be a viable alternative to gcc as OpenBSD's default compiler (as soon as it has stuff like the stack protection etc.)

    If we could get rid of gcc in base, the way to a fully bsd-licensed OS is open :-)

    1. By Anonymous Coward () on

      If getting "stack protection" work on TenDRA is our issue we're doing good. :)

Latest Articles


Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]