Re: Windows build cookbook

Petr Hluzín
2011-07-31T20:11:21Z

On 31 July 2011 04:19, asmwarrior <asmwarrior@gmail.com> wrote:
> On 2011-7-28 1:17, Tom Tromey wrote:
>>
>> Eli>  Thanks.  That's not Windows-specific, so I guess there are no
>> Eli>  Windows-specific issues here?
>>
>> I would venture to guess that this is just because nobody has written
>> the text for the manual, rather than that there are no issues building
>> on Windows.
>>
>> Tom
>>
> we have create some pages in
> http://code.google.com/p/qp-gcc/wiki/build_gdb_msys_en (English version)
> and
> http://code.google.com/p/qp-gcc/wiki/build_gdb_msys_cn (Chinese version)
>
> Also, the cross build mingw gdb from linux:
> http://code.google.com/p/qp-gcc/wiki/CrossbuildGDB
>
> also, the official Mingw page:
> http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GDB/GDB-7.2/
> which contains an instructions to build gdb 7.2 under MSYS.
>
> As a conclusion, no much difficult to build mingw gdb.

I wish I knew about those links yesterday.

Yesterday I spent 5 hours trying to build the GDB on Windows. After
reading your links was able to build the GDB without expat & python
and then even a full GDB - it took 5 more hours of careful touching
and trying to not upset the tools. (Geez, I knew why I avoided
building from sources.)

Let future generations benefit from my notes below:

whitespace in directory names: PATH=$(echo $PATH | sed 's,Program
Files,PROGRA~1,g')

cp ar.exe mingw32-ar.exe

Using MinGW Shell:
./configure --host=mingw32

Used expat build instructions from
http://code.google.com/p/qp-gcc/wiki/build_gdb_msys_en

$ ./configure --host=mingw32 --target=avr CFLAGS="-s
-L/C/Python27/libs -I/C/Python27/PH-temp/include
-I/c/gdb-7.3/expat-2.0.1/include -static -L/c/gdb-7.3/expat-2.0.1/lib"
--with-python --with-expat

Thanks for the links. I would have given up.

--
Petr Hluzin