64-bit erlang
Raimo Niskanen
raimo@REDACTED
Tue Nov 15 09:03:25 CET 2005
fritchie@REDACTED (Scott Lystig Fritchie) writes:
> >>>>> "ks" == Kostis Sagonas <kostis@REDACTED> writes:
>
> ks> Issuing the simple command:
>
> ks> alias gcc='gcc -m64'
>
> ks> would have achieved the same effect.
>
> Here's my reply to Andrae Muys, who suggested using "CC='gcc -m64'
> ./configure".
>
> I didn't spend much time on it, but IIRC there was a sub-package that
> assumed that $(CC)'s value contained no whitespace -- the assumption
> was violated, and "make" stopped. {shrug} I've run into that quite a
> bit, and I didn't want to discover how many other places made the same
> assumption, so I resorted to my "exec gcc -m64 $*" trick and hoped
Did you make a two line wrapper a'la:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
#! /bin/sh
exec gcc -m64 ${1+"$@"}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In that case note the little improvement to instead of
$* use ${1+"$@"}, that quotes all arguments separately,
and (unimportant for gcc) does not pass an empty
argument if there are none.
That would work even with $(CC) arguments containing whitespace.
> that there weren't any hidden assumptions that $(CC) *arguments*
> didn't contain whitespace & thus break /bin/sh's "$*" expansion.
> There were none, hooray.
>
> The same Makefile assumption about lack-of-whitespace-in-$(CC) is the
> same assumption that screws up attempts to use tools like CCache or
> DistCC. "CC='distcc gcc'" or "CC='ccache gcc'" are the easiest ways
> to use those tools ... until you encounter a broken Makefile. Or a
> broken "libtool". {shudder}
>
> -Scott
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the erlang-questions
mailing list