[asterisk-bugs] [DAHDI-tools 0014638]: [patch] dahdi-tools fails to build if LDFLAGS contains "-Wl, --as-needed"

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Mar 17 04:10:13 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14638 
====================================================================== 
Reported By:                Chainsaw
Assigned To:                
====================================================================== 
Project:                    DAHDI-tools
Issue ID:                   14638
Category:                   General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2009-03-10 12:02 CDT
Last Modified:              2009-03-17 04:10 CDT
====================================================================== 
Summary:                    [patch] dahdi-tools fails to build if LDFLAGS
contains "-Wl,--as-needed"
Description: 
-lm ends up being discarded if --as-needed is in use:
x86_64-pc-linux-gnu-gcc -Wl,--as-needed -lm -o fxotune fxotune.o
version.o
fxotune.o: In function `power_of':
/var/tmp/portage/net-misc/dahdi-tools-2.1.0.2/work/dahdi-tools-2.1.0.2/fxotune.c:285:
undefined reference to `sqrtf'
fxotune.o: In function `one_point_dft':
/var/tmp/portage/net-misc/dahdi-tools-2.1.0.2/work/dahdi-tools-2.1.0.2/fxotune.c:318:
undefined reference to `sincos'
fxotune.o: In function `gentone':
/var/tmp/portage/net-misc/dahdi-tools-2.1.0.2/work/dahdi-tools-2.1.0.2/fxotune.c:206:
undefined reference to `sin'
fxotune.o: In function `genwaveform':
/var/tmp/portage/net-misc/dahdi-tools-2.1.0.2/work/dahdi-tools-2.1.0.2/fxotune.c:228:
undefined reference to `sin'
fxotune.o: In function `gentone':
/var/tmp/portage/net-misc/dahdi-tools-2.1.0.2/work/dahdi-tools-2.1.0.2/fxotune.c:206:
undefined reference to `sin'
/var/tmp/portage/net-misc/dahdi-tools-2.1.0.2/work/dahdi-tools-2.1.0.2/fxotune.c:206:
undefined reference to `sin'
fxotune.o: In function `genwaveform':
/var/tmp/portage/net-misc/dahdi-tools-2.1.0.2/work/dahdi-tools-2.1.0.2/fxotune.c:228:
undefined reference to `sin'
fxotune.o: In function `db_loss':
/var/tmp/portage/net-misc/dahdi-tools-2.1.0.2/work/dahdi-tools-2.1.0.2/fxotune.c:309:
undefined reference to `logf'
collect2: ld returned 1 exit status
make[1]: *** [fxotune] Error 1
make[1]: *** Waiting for unfinished jobs....

This is caused by the Makefile using LDFLAGS to pass libraries, resulting
in an incorrect ordering. As a result -lm is discarded. I have a patch for
this which I will attach shortly.
====================================================================== 

---------------------------------------------------------------------- 
 (0101850) svnbot (reporter) - 2009-03-17 04:10
 http://bugs.digium.com/view.php?id=14638#c101850 
---------------------------------------------------------------------- 
Repository: dahdi
Revision: 6185

U   tools/trunk/Makefile

------------------------------------------------------------------------
r6185 | tzafrir | 2009-03-17 04:10:13 -0500 (Tue, 17 Mar 2009) | 13 lines

Use LIBS instead of LDFLAGS directly in tools Makefile

The Makefile of dahdi-tools set the variable LDFLAGS directly, rather
than adding to LIBS. This does not allow placing LIBS after all the
linked objects.

(closes issue http://bugs.digium.com/view.php?id=14638)
Reported by: Chainsaw
Patches:
      dahdi-tools-2.1.0.2-asneeded.patch uploaded by Chainsaw (license
723)



------------------------------------------------------------------------

http://svn.digium.com/view/dahdi?view=rev&revision=6185 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-03-17 04:10 svnbot         Checkin                                      
2009-03-17 04:10 svnbot         Note Added: 0101850                          
======================================================================




More information about the asterisk-bugs mailing list