[Home]

Summary:DAHTOOL-00022: [patch] dahdi-tools fails to build if LDFLAGS contains "-Wl,--as-needed"
Reporter:Tony Vroon (chainsaw)Labels:
Date Opened:2009-03-10 12:02:12Date Closed:2009-03-17 04:10:14
Priority:MinorRegression?No
Status:Closed/CompleteComponents:General
Versions:2.1.0.2 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) dahdi-tools-2.1.0.2-asneeded.patch
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.
Comments:By: Digium Subversion (svnbot) 2009-03-17 04:10:13

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 DAHTOOL-22)
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