GCC driver-driver [was: Re: standard way to require c++11?]

Clemens Lang cal at macports.org
Wed Apr 22 12:03:24 PDT 2015


Hi,

----- On 22 Apr, 2015, at 20:23, Mihai Moldovan ionic at macports.org wrote:

> First, a compiler is a somewhat delicate matter and I do not think I've got
> experience to "get it right". I don't want to completely break (or break in
> subtle ways) FSF GCC on OS X.

Feel free to ask me if you stumble across problems. I've done some compiler stuff
in the past (even though not in C++ and not for GCC, but the general concepts are
the same everywhere).


> Even in a "complete rewrite" case, I'd be concerned with legal problems because
> the general concept of a GCC driver-driver was their idea. Given that we'd want
> the new driver-driver to behave like the 4.2 one, there inadvertently will be
> similarities.

Unless there is a patent filed for the concept (which I doubt, but I didn't check)
there is no issue. There's no copyright on ideas, but you're right that you cannot
just copy their code. I don't think Apple would object to better GCC support for
their platform, though, so they may actually welcome somebody doing it (even
though they'd probably not state it publicly, or anywhere, really).

That being said, IANAL and you should take what I said with the obvious grain of
salt.

> Does anyone here have:
>  - a clear understanding of the legal matter?

I'd say if have that, even though I'm not a lawyer.

>  - experience with writing robust code and maybe even a little bit of knowledge
>  of GCC's internals (likely helpful)?

Not enough knowledge of GCC internals to be helpful here, sorry.

>  - enough time to backport/implement this?

Definitely not.

>  - confidence a backport will be accepted by the GCC project?

Somewhat, unless RMS shows up and sees Apple attacking his freedom. That being
said, I'd be surprised if Apple didn't try to upstream the change back in the days
(heck, they even tried pushing LLVM into GCC under GPL, but the GCC people
wouldn't have it).


> [1] This would only be useful for MacPorts on recent OS X releases if
> -stdlib=libc++ would make GCC not link to its own libstdc++ at all. I don't
> know if that's the case.

Are you aware of http://stackoverflow.com/questions/22228208/using-g-with-libc?
I haven't tried it in a while, but when I last did it was actually pretty easy
to make GCC compile against libc++.

-- 
Clemens Lang


More information about the macports-dev mailing list