Xiaofan Chen wrote: > On Fri, Oct 12, 2012 at 2:04 AM, Jonathan Dumaresq > <jdumar...@cimeq.qc.ca> wrote: >> sudo ln -s /usr/bin/i686-w64-mingw32-ld /usr/bin/i586-mingw32msvc-ld >> sudo ln -s /usr/bin/i686-w64-mingw32-ar /usr/bin/i586-mingw32msvc-ar >> sudo ln -s /usr/bin/i686-w64-mingw32-ranlib >> /usr/bin/i586-mingw32msvc-ranlib sudo ln -s >> /usr/bin/i686-w64-mingw32-strip /usr/bin/i586-mingw32msvc-strip sudo >> ln -s /tmp/cross-compile/output/include/libusb-1.0 >> /usr/i686-w64-mingw32/include/ >> > > Why do you do this?
Well this is a missunderstood of the whole process. Now I have a better idea of what to do. > You should either use the MinGW.org cross > compiler (i586-mingw32msvc-gcc) or the MinGW-w64 32bit cross compiler > (i686-w64-mingw32-gcc) and do not mix them. Yes now I know. > > Anyway I just tried to cross build openocd git under Ubuntu 12.04 > using MinGW.org and I have no issues. Have you try with the gcc-mingw32 package in ubuntu repository or your have download the toolchain directly from the mingw.org ? > > 607 cd libusb-win32-src-1.2.6.0/ > 611 cd libusb-win32-src-1.2.6.0/ > 614 make host_prefix=i586-mingw32msvc all > 616 sudo cp libusb.a /usr/i586-mingw32msvc/lib > 618 sudo cp src/lusb0_usb.h /usr/i586-mingw32msvc/include/usb.h > > (you can also use libusb-win32 1.2.6.0 binary) > > 619 cd .. > 621 cd libusbx/ > 623 cd libusbx-1.0.14-win/ > 625 sudo cp include/libusbx-1.0/libusb.h > /usr/i586-mingw32msvc/include/ 627 cd MinGW32/ > 633 cd dll/ > 635 sudo cp libusb-1.0.dll.a /usr/i586-mingw32msvc/lib/ > > libusbx-1.0.14 binary > http://sourceforge.net/projects/libusbx/files/releases/1.0.14/Windows/ > > 636 cd .. > 644 cd libftdi/ > 646 cd libftdi_0.20_devkit_mingw32_08April2012/ > 648 cd include/ > 650 sudo cp ftdi.h /usr/i586-mingw32msvc/include/ > 651 cd .. > 653 cd lib/ > 655 sudo cp libftdi.dll.a /usr/i586-mingw32msvc/lib/ > > libftdi-0.20 MinGW 32bit binary > http://code.google.com/p/picusb/downloads/detail?name=libftdi_0.20_devkit_mi ngw32_08April2012.zip > > (but I can cross build it under Ubuntu as well). To cross build libftdi on linux do you use the cmake or the configure way ? > > 656 cd > 657 cd Desktop/build/openocd/ > 659 cd openocd/ > 664 mkdir build_win > 665 git pull > 666 ./bootstrap > 667 cd build_win > 669 ../configure --build=i686-pc-linux-gnu --host=i586-mingw32msvc > --enable-maintainer-mode --disable-werror --disable-shared > --enable-ft2232_libftdi --enable-stlink 670 make > > mcuee@Ubuntu1204VM:~/Desktop/build/openocd/openocd/build_win$ ls -la > src/openocd.exe -rwxrwxr-x 1 mcuee mcuee 5481092 Oct 12 21:17 > src/openocd.exe > > mcuee@Ubuntu1204VM:~/Desktop/build/openocd/openocd/build_win$ > i586-mingw32msvc-strip src/openocd.exe > > mcuee@Ubuntu1204VM:~/Desktop/build/openocd/openocd/build_win$ ls -la > src/openocd.exe -rwxrwxr-x 1 mcuee mcuee 1264128 Oct 12 21:31 > src/openocd.exe > The whole process look like mine (with different compiler and some other minor modification). I will try to reproduce this here. This is a very detailed process. It is very much appreciated ! > > > -- > Xiaofan ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel