[asterisk-bugs] [DAHDI-tools 0016597]: [patch] Dadhi-tools ignores linker flags when building utilities in xpp/

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Mar 3 14:05:05 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16597 
====================================================================== 
Reported By:                pprindeville
Assigned To:                
====================================================================== 
Project:                    DAHDI-tools
Issue ID:                   16597
Category:                   General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     confirmed
JIRA:                        
Reviewboard Link:            
====================================================================== 
Date Submitted:             2010-01-13 18:36 CST
Last Modified:              2010-03-03 14:05 CST
====================================================================== 
Summary:                    [patch] Dadhi-tools ignores linker flags when
building utilities in xpp/
Description: 
The value of $(LDFLAGS) is not used by xpp/Makefile when doing terminal
link edit.

Example:

fpga_load: fpga_load.o hexfile.o
        $(CC) -L. -o $@ $^ $(EXTRA_LIBS) $(USB_LIB)

astribank_hexload: $(ABHEXLOAD_OBJS)
        $(CC) -L. -o $@ $(ABHEXLOAD_OBJS) $(EXTRA_LIBS) $(USB_LIB)

astribank_tool: $(ABTOOL_OBJS)
        $(CC) -L. -o $@ $(ABTOOL_OBJS) $(EXTRA_LIBS) $(USB_LIB)

astribank_allow: $(ABALLOW_OBJS)
        $(CC) -L. -o $@ $(ABALLOW_OBJS) $(EXTRA_LIBS) $(USB_LIB)

fpga_load.o: CFLAGS+=-D_GNU_SOURCE      # We use memrchr()

test_parse: test_parse.o hexfile.o
        $(CC) -L. -o $@ $^ $(EXTRA_LIBS) $(USB_LIB)


also, it's not clear that there's any value to using $(CC) to link instead
of $(LD).

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

---------------------------------------------------------------------- 
 (0118899) pprindeville (reporter) - 2010-03-03 14:05
 https://issues.asterisk.org/view.php?id=16597#c118899 
---------------------------------------------------------------------- 
Alas, I get:

/home/philipp/alix/build_i586/staging_dir/bin/i586-linux-uclibc-ld
--sysroot=/home/philipp/alix/build_i586/staging_dir
-L/home/philipp/alix/build_i586/staging_dir/lib
-L/home/philipp/alix/build_i586/staging_dir/usr/lib -L. -o astribank_tool
astribank_tool.o astribank_usb.o mpp_funcs.o debug.o  -lusb
/home/philipp/alix/build_i586/staging_dir/bin/i586-linux-uclibc-ld:
warning: cannot find entry symbol _start; defaulting to 0000000008048af8

when building.

Looks like crt0.o (or whatever) is being left out. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-03-03 14:05 pprindeville   Note Added: 0118899                          
======================================================================




More information about the asterisk-bugs mailing list