This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Installation question.
> On 13 May 2019, at 17:33, Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Sun, 12 May 2019, Segher Boessenkool wrote:
>
>> "cc" isn't POSIX, since over a decade I think. "c99" is POSIX, and it is
>> a shell script calling whatever "gcc" is first in the PATH, on most distros.
>
> Note that correct semantics for "c99" mean it's not a trivial wrapper;
> some option reordering is needed to follow the POSIX rule that -U options
> take precedence over -D options regardless of ordering on the command
> line; see discussion in bug 40960 regarding support for installing variant
> driver programs such as c99 with such differences in how they behave. (I
> don't know if any distributions actually have wrappers that deal with
> that, e.g. by using different specs in their wrapper. Another such POSIX
> issue is that according to POSIX, dlopen et al should be found without
> needing to special any -l options, but that could be dealt with by
> adjusting the libc.so linker script, on systems using glibc.)
Darwin (Xcode release, not GCC) has stand-alone exes for c89 and c99
which appear to implement the semantics you describe. Adding these
+ “cc” to the Darwin GCC installation is part of what prompted my question.
[the code for the Darwin c89/c99 is open-sourced and based on a freeBSD
2002 edition, so I probably don’t need to generate something new].
It seems, from this thread that there’s no specific reason for me _not_ to install
a ‘cc’ for Darwin’s GCC installation - at least it will make c++/cc consistent.
Iain