[asterisk-dev] Re: zaptel 1.4.1 gendigits + HOSTCC

Tony Mountifield tony at softins.clara.co.uk
Fri Mar 23 03:43:46 MST 2007

In article <2d9149cd0703222341w8ae3a14y80c4a0c38b62f1de at mail.gmail.com>,
Kristian Kielhofner <kristian.kielhofner at gmail.com> wrote:
> Hey everyone,
>   In the Zaptel Makefile (confirmed in 1.4.1) why isn't gendigits
> built with HOSTCC instead of CC?

Hi Kris,

The use of HOSTCC in Zaptel has historically been very confused. See bug
number 9207, which I raised in Mantis.

Until last July, the Zaptel Makefile used HOSTCC to build kernel modules,
and CC to build user-space utilities. This distinction was quite important
on earlier Fedora releases based on the 2.4 kernel, because the kernel
was built with gcc32 and user-space utils were built with gcc (v3.3).
So on such systems, I always used to build with HOSTCC=gcc32 to ensure
the Zaptel kernel modules were built with the correct compiler (otherwise
I would get loads of compiler warnings about __set_64bit_var or something).

When I recently discovered that the distinction between kernel-space
and user-space object compilation had disappeared (uses of $(HOSTCC) had
been changed to $(CC)), I raised the above-mentioned bug, which turned
out to be a very frustrating experience.

I originally thought this was a standard usage of HOSTCC, but it turns
out that the original use of HOSTCC in Zaptel was opposite to conventions
elsewhere, which probably accounts for the confusion. However, there
still needs to be a way to distinguish between kernel-space and
user-space compilation, which there currently is not.

When the bug report hit a brick wall, I did correspond privately with Kevin
and Russell, but then it all went quiet without the issue being addressed
at all. I really can't be bothered to pursue it any more - at least I know
how to fix it on my own systems as required, even if TPTB want it to remain
wrong in SVN! When I submit a patch, it's not to pursue an agenda of my own,
but because I want to improve Asterisk/Zaptel for everyone else!

Of course, if you are cross-compiling, there are potentially three compilers
to distinguish between: one for kernel-space modules on the target, one for
user-space programs for the target, and one for build utilities on the host!

Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org

More information about the asterisk-dev mailing list