On Fri, Jun 24, 2011 at 14:12, Mike Frysinger wrote:
> On Thu, Jun 16, 2011 at 09:18, Peter Budny wrote:
>> When trying to compile UrJTAG with ftd2xx support, it fails to link the
>> executables. This seems to be because @FTD2XXLIB@ is being added to
>> liburjtag_la_LIBADD in src/Makefile.am (where it does not help define any
>> symbols) instead of jtag_LDADD in src/apps/jtag/Makefile.am (where the EXE
>> is linked).
>
> libtool should look at all the libraries encoded in liburjtag.la and
> pull them in as needed when linking jtag since jtag depends on the .la
> file.  so what you describe does not sound incorrect, but expected
> behavior.  otherwise, the change you're proposing would break shared
> library creation as it is liburjtag that is using FTDI symbols and not
> the jtag app.
>
>> However, I tried editing the Makefile.am’s, reconfiguring and making, and
>> that fails because libtool turns
>
> i'm interested in what the original code looked like, not what your
> hacked up version is doing

as an example, on my system, liburjtag.la says it needs these libraries:
dependency_libs=' -L/usr/lib64 -lm /usr/lib64/libftdi.la -lusb
/usr/lib64/libusb.la -lreadline /usr/lib64/libusb-1.0.la -lrt'

so when it goes to link the jtag app, it says it only needs liburjtag.la:
/bin/sh ../../../libtool  --tag=CC   --mode=link gcc -std=gnu99 -Wall
-Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -g
-O2   -o jtag jtag.o ../../../src/liburjtag.la  -lreadline

and libtool reads the .la file to expand the other deps:
libtool: link: gcc -std=gnu99 -Wall -Wmissing-prototypes
-Wstrict-prototypes -Wpointer-arith -Werror -g -O2 -o .libs/jtag
jtag.o  ../../../src/.libs/liburjtag.so -L/usr/lib64 -lm
/usr/lib64/libftdi.so /usr/lib64/libusb.so /usr/lib64/libusb-1.0.so
-lrt -lreadline -pthread

(technically, when linking with the shared liburjtag.so, the extra
deps are actually unnecessary, but that's an unrelated bug with
libtool)
-mike

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to