#55884: mandoc @1.14.3: not using the right compiler
Jan Stary
hans at stare.cz
Sat Mar 3 21:16:41 UTC 2018
> > > mandoc's ./configure sets CC to whatever make(1) thinks CC is:
> > > CC=`printf "all:\\n\\t at echo \\\$(CC)\\n" | env -i make -sf -`
> > > Why exactly is it "not the right compiler"?
> >
> > As env -i clears the environment,
> > how is this supposed to work at all?
> > This does not respect CC in the environment, which is what MacPorts
> > usually does.
> >
> > $ export CC=foo
> > $ printf "all:\\n\\t at echo \\\$(CC)\\n" | env -i make -sf -
> > cc
>
> That's on purpose: compile mandoc with
> whatever the local make(1) thinks $(CC) is.
>
> # You can manually override the compiler to be used.
> # But that's rarely useful because ./configure asks your make(1)
> # which compiler to use, and that answer will hardly be wrong.
>
> mandoc's ./configure does not take CC from the environment.
In fact, configure says
# --- default settings -------------------------------------------------
# Initialize all variables here,
# such that nothing can leak in from the environment.
> It determines it as above. You can override it of course,
> by setting CC=... in configure.local
More information about the macports-dev
mailing list