[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dependency tracking problem using "-l" to link libraries.

From: Xochitl Lunde
Subject: Dependency tracking problem using "-l" to link libraries.
Date: Thu, 22 Apr 2010 10:48:20 -0500

I have a problem with my dependency tracking in my auto tools build.  I 
have a program like this for an embedded target:

pald_SOURCES = \

if ac_netos_build
# From Makefile.appbuild.ns9215, additional code needs to be compiled.
pald_SOURCES+= $(ac_netos_dir)/src/bsp/common/appconf_api.c
pald_CXXFLAGS= -W -Wall -Werror --pedantic -O2 -g -fno-strict-aliasing 
pald_LDFLAGS= -Wl,-T,${ac_netos_linkcmd} -Wl,--cref,-Map,pald$(MAP_EXT)

pald_LDADD = $(am_ldadd)

am_ldadd = \


There are more libraries in am_ldadd, but I wanted to shorten it. 
Basically if I use "-lstartup" in my am_ldadd, the "pald" program does not 
get relinked if I make a change in "libstartup.a", even though 
"libstartup.a" does get relinked.  If I change my reference of 
libstartup.a from "-lstartup" to "$(top_srcdir)/src/startup/libstartup.a", 
then "pald" does relink.  What is wrong with using the "-l" instead of 
specifying the full library name?  I think I had switched to using "-l" 
exclusivey because on some platforms I use dynamic libraries instead and I 
didn't want to have to rewrite long lists in for platforms 
that make dynamic libraries.

 I am using the -T {$ac_netos_linkcmd}... Do you think the problem could 
be in my linker script, "image.ld" provided by my hardware maker?  I 
looked inside this file, but it looks like it is just setting up sections 
like "_NAAppOffsetInFlash" "_NABootloaderSizeInFlash".

arm-elf$autoconf --version
autoconf (GNU Autoconf) 2.61

arm-elf$automake --version
automake (GNU automake) 1.9.6

arm-elf$aclocal --version
aclocal (GNU automake) 1.9.6

reply via email to

[Prev in Thread] Current Thread [Next in Thread]