Up-to-date instructions on Linux based cross-compiler to Win32
Iain Buclaw
ibuclaw at ubuntu.com
Fri Mar 30 11:19:17 PDT 2012
On 30 March 2012 18:58, Johannes Pfau <nospam at example.com> wrote:
> Am Thu, 29 Mar 2012 20:34:42 +0200
> schrieb Marco Leise <Marco.Leise at gmx.de>:
>
>> As the topic suggests, I'm looking for instructions to get a
>> cross-compiler working on Linux and the ones in the Wiki are fairly
>> outdated, referring to old versions of D2 and GCC.
>>
>> The compiler actually builds, but it cannot build Phobos, with these
>> lines of
>> errors: /home/marco/Entwicklung/D/gdc/dev/gcc-4.6.2/windows/./gcc/gdc
>> -B/home/marco/Entwicklung/D/gdc/dev/gcc-4.6.2/windows/./gcc/
>> -L/home/marco/Entwicklung/D/gdc/dev/gcc-4.6.2/windows/i686-mingw32/winsup/mingw
>> -L/home/marco/Entwicklung/D/gdc/dev/gcc-4.6.2/windows/i686-mingw32/winsup/w32api/lib
>> -isystem /home/marco/Entwicklung/D/gdc/dev/gcc-4.6.2/winsup/mingw/include
>> -isystem /home/marco/Entwicklung/D/gdc/dev/gcc-4.6.2/winsup/w32api/include
>> -B/usr/i686-mingw32/bin/ -B/usr/i686-mingw32/lib/
>> -isystem /usr/i686-mingw32/include
>> -isystem /usr/i686-mingw32/sys-include -Wall -g -frelease -O2
>> -nostdinc -pipe -fdeprecated -I ../../../libphobos -I ./i686-mingw32
>> -fintfc-file=import/core/sys/windows/dbghelp.di
>> -fsyntax-only ../../../libphobos/core/sys/windows/dbghelp.d ../../../libphobos/core/sys/posix/sys/un.d:17:
>> Error: import __anonymous sa_family_t not
>> found ../../../libphobos/core/sys/posix/sys/un.d:17: Error: alias
>> core.sys.posix.sys.un.sa_family_t recursive alias dec
>>
>
> Sorry, that's my fault again. I couldn't check whether the new
> backtrace stuff worked on mingw, I guess that's the problem. But I
> should have seen that the new code imports a posix header even on
> windows.
>
> Could you please check if this patch fixes it:
> https://gist.github.com/2253215
>
> (That disables the GCC backtraces for non-Posix systems completely.
> Windows has custom backtrace code anyway.)
>
>
> BTW: @Iain Could you have a look at the build instructions at
> https://github.com/D-Programming-GDC/GDC/wiki ? I just changed the git
> checkout commands and symlinks, but it seems that
> gcc-x.x.x/gcc/libphobos can't be a symlink anymore, so this directory
> needs to be copied?
>
I suggest:
cd gcc-x-x-x
mkdir libphobos
cd libphobos
../symlink-tree ../../d/libphobos
This creates all directories, and individual symbolic links to each
file in libphobos.
--
Iain Buclaw
*(p < e ? p++ : p) = (c & 0x0f) + '0';
More information about the D.gnu
mailing list