[asterisk-bugs] [Asterisk 0016596]: [patch] LD (llinker) options not used by main/ and channels/ builds

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jan 13 13:44:06 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16596 
====================================================================== 
Reported By:                pprindeville
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16596
Category:                   Core/BuildSystem
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.2.0 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-01-13 13:39 CST
Last Modified:              2010-01-13 13:44 CST
====================================================================== 
Summary:                    [patch] LD (llinker) options not used by main/ and
channels/ builds
Description: 
The top-level makefile passes $(ASTLDFLAGS) which is user-specified and
$(_ASTLDFLAGS) which is system-generated to the subdirs main/ and channels/
when they are built.  Unfortunately, the makefiles in these directories
don't use them.

If building in an environment that requires additional flags for
correctness (e.g. when building against multiple versions of the same
libraries), this may cause linkage against the wrong libraries (in this
case, the system default libraries would be used) which would result in
incorrect binaries being built.

Since the binaries are somewhat likely to succeed (with the default
libraries), this would result in incorrect test results when doing software
validation (since the desired libraries would not have been used, and hence
not tested).

====================================================================== 

---------------------------------------------------------------------- 
 (0116628) pprindeville (reporter) - 2010-01-13 13:44
 https://issues.asterisk.org/view.php?id=16596#c116628 
---------------------------------------------------------------------- 
This is the simplest fix I could come up with in terms of lines changes and
proving correctness.

However, a better strategy might have been to do the following in the
top-level Makefile:

 ifeq ($(OSARCH),OpenBSD)
   SOLINK=-shared -fpic
 endif
+
+_ASTCFLAGS+=$(ASTCFLAGS)
+_ASTLDFLAGS+=$(ASTLDFLAGS)

 # comment to print directories during submakes
 #PRINT_DIR=yes

and just made use of $(_ASTLDFLAGS) in all cases, and never used
$(ASTLDFLAGS) directly, either in the top-level makefile or in the subdirs'
makefiles. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-13 13:44 pprindeville   Note Added: 0116628                          
======================================================================




More information about the asterisk-bugs mailing list