[asterisk-bugs] [Zaptel 0012056]: HOSTCC not exported by top level Makefile causes makefw compile to fail

noreply at bugs.digium.com noreply at bugs.digium.com
Sun Mar 2 06:05:42 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12056 
====================================================================== 
Reported By:                davidw
Assigned To:                
====================================================================== 
Project:                    Zaptel
Issue ID:                   12056
Category:                   General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Zaptel Version:              SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 3874 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             02-24-2008 04:19 CST
Last Modified:              03-02-2008 06:05 CST
====================================================================== 
Summary:                    HOSTCC not exported by top level Makefile causes
makefw compile to fail
Description: 
The Makefile does not explicitly export HOSTCC.  As this is not in the
initial environment, GNU Make does not export it by default.  As a result,
the make in the kernel directory, which does not independently include
makeopts, the file that actually includes the definition of HOSTCC,
substitutes a null string for HOSTCC resulting in a command not found when
compiling the, host platform, utiity makefw.
====================================================================== 

---------------------------------------------------------------------- 
 davidw - 03-02-08 06:05  
---------------------------------------------------------------------- 
As far as I can tell, the following need to be propagated in the 2.4
build:

Always:
HOSTCC

If building the hpec modules:
ARCH

If cross compiling (one can assume gcc and friends for a native Linux
compile):
KSRC
LD
CC

When compiling for non-i386 platforms, even if native compiling:
UNAME_M

The install code uses the following, but looks to be broken (substitutes
DESTDIR twice), and is not used:
DESTDIR
KVERS
INSTALL_MODULES
INSTALL

It looks as though kernel/GNUmakefile needs to pass CC and LD to its
subordinate makes to properly support cross-compiles.

The top level Makefile doesn't substitute all of its install's, but one
supsects it will never be run on a system without ginstall.

The ppp directory doesn't seem to get made, but, in principle, requires CC
and, maybe, LD to be passed.  There is no data subdirectory.

The make for utils_subdir doesn't get run in my configuration, because
BUILD_XPP  isn't set.  However, it looks as though, whilst the
kernel/xpp/utils make will take sensible defaults on a native, and
therefore Linux, compile, it will have difficulties for a cross compile. 
Some of the capitalisations differ, as well as not all the parameters being
passed.

Anyway, what I've tried is a native, 2.4, build, with the default menu
selection, and the following explicitly passed through to the
kernel/GNUmakefile make:

KSRC
ARCH
UNAME_M
KVERS
LD
CC
HOSTCC

Of these, I think KVERS is redundant, because it is only used for
isntalls, and the install is now in the top level Makefile.  I haven't 
changed kernel/GNUmakefile, although I believe it does need changing for
cross-compiles. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
03-02-08 06:05  davidw         Note Added: 0083239                          
======================================================================




More information about the asterisk-bugs mailing list