Fix GCC detection in ERTS' Makefiles

Jean-Sébastien Pédron jean-sebastien.pedron@REDACTED
Wed Dec 16 23:13:14 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

ERTS’ Makefiles check if $(CC) equals to "gcc" to determine if some
options, like optimization flags, should be added to CFLAGS.

Thus, one can’t use an alternate compiler name while still using GCC
(eg. "gcc-4.4" or "/home/user/my-gcc/bin/gcc"). On FreeBSD, the
lang/erlang port (ie. FreeBSD's package of Erlang) is built with CC=cc
and this results in Erlang being awfully slow[1].

I propose a fix for this, described on this article:
http://wiki.github.com/dumbbell/otp/gcc-detection-in-makefiles

The patch is available in my "gcc_detection" branch:
git fetch git://github.com/dumbbell/otp.git gcc_detection

[1] Just for the record, a simple test where a process sends 10,000,000
messages to another one takes 6.8" when Erlang is compiled with "CC=cc"
but takes only 2.7" when Erlang is compiled with "CC=gcc".

- --
Jean-Sébastien Pédron
http://www.dumbbell.fr/

PGP Key: http://www.dumbbell.fr/pgp/pubkey.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkspW3oACgkQa+xGJsFYOlPVXwCfTUlWNF/2mHyHNzGtSikZfD1A
zOsAnjmMb2cfjXLgdTLpEKhryF/hExUB
=FZnO
-----END PGP SIGNATURE-----


More information about the erlang-patches mailing list