On Sat, May 5, 2012 at 9:36 PM, Peter Stuge <[email protected]> wrote: > Xiaofan Chen wrote: >> BTW, my configure script is like this. >> >> LDFLAGS="-L/usr/local/lib -lusb-1.0" ../configure > > In general CFLAGS and LDFLAGS are not a very reliable method to add > flags because they can only specify one set of flags, and configure > may have more complex cases, one example is the handling of both > static and shared linking. > >> --enable-maintainer-mode --disable-option-checking >> --prefix=/usr/local/Cellar/open-ocd/HEAD --enable-jlink >> --enable-ft2232_libftdi --enable-stlink --disable-werror >> --disable-shared > > Since you want to link statically I suggest to use different linker > flags. If you just want to make the build work this once then set > LDFLAGS to only the correct .dylib filename with full path. No -L -l.
Good idea. I will try. > It's obviously not the correct fix, but it should make your build > work. The correct fix is for OpenOCD configure to use pkg-config for > libusb-1.0 and all other libraries. That is kind of true. I have pointed this out before, for libftdi-1.0 at that time. libftdi-1.0 needs libusb-1.0 and both have similar header file structure like libusb-1.0/libusb.h and libftdi/ftdi.h. However, since OpenOCD build process needs to work under MinGW as well, pkg-config is a bit heavy for MinGW. So you may still have to use the CFLAGS and LDFLAGS for MinGW. > When configure does not > just work<tm> then that is IMO a pretty serious error. It seems that > my feedback failed to educate the original patch poster and the > maintainer who included the patch enough to understand this issue. :( This is where I disagree. The auto-tool scripts are not perfect since they are difficult to get it right. Is this a bug? Yes. Is it that serious as you sound, I do not think so. -- Xiaofan ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
