Hi,
Gdc (c3e22fb3bf19) fails to build phobos on x86_64:
> /home/jerome/abs/gdc-hg/src/gcc-build/./gcc/gdc
> -B/home/jerome/abs/gdc-hg/src/gcc-build/./gcc/
> -B/usr/x86_64-unknown-linux-gnu/bin/ -B/usr/x86_64-unknown-linux-gnu/lib/
> -isystem /usr/x86_64-unknown-linux-gnu/include -isystem
> /usr/x86_64-unknown-linux-gnu/sys-include -o std/regexp.o -g -frelease -O2
> -fversion=GC_Use_Alloc_MMap -fversion=GC_Use_Stack_GLibC
> -fversion=GC_Use_Data_Fixed -nostdinc -pipe \
> -I ../../../gcc-4.4.5-build/libphobos -I
> ../../../gcc-4.4.5-build/libphobos/internal/gc -I ./x86_64-unknown-linux-gnu
> -c ../../../gcc-4.4.5-build/libphobos/std/regexp.d
> ../../../gcc-4.4.5-build/libphobos/std/regexp.d:1632: Error: function
> std.intrinsic.bt (ulong*,ulong) does not match parameter types (uint*,uint)
> ../../../gcc-4.4.5-build/libphobos/std/regexp.d:1632: Error: cannot
> implicitly convert expression (cast(uint*)&this.program[pc + 1LU + 4LU]) of
> type uint* to ulong*
> ../../../gcc-4.4.5-build/libphobos/std/regexp.d:1647: Error: function
> std.intrinsic.bt (ulong*,ulong) does not match parameter types (uint*,uint)
> ../../../gcc-4.4.5-build/libphobos/std/regexp.d:1647: Error: cannot
> implicitly convert expression (cast(uint*)&this.program[pc + 1LU + 4LU]) of
> type uint* to ulong*
> ../../../gcc-4.4.5-build/libphobos/std/regexp.d:1662: Error: function
> std.intrinsic.bt (ulong*,ulong) does not match parameter types (uint*,uint)
> ../../../gcc-4.4.5-build/libphobos/std/regexp.d:1662: Error: cannot
> implicitly convert expression (cast(uint*)&this.program[pc + 1LU + 4LU]) of
> type uint* to ulong*
> make[3]: *** [std/regexp.o] Error 1
> make[3]: Leaving directory
> `/home/jerome/abs/gdc-hg/src/gcc-build/x86_64-unknown-linux-gnu/libphobos'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory
> `/home/jerome/abs/gdc-hg/src/gcc-build/x86_64-unknown-linux-gnu/libphobos'
> make[1]: *** [all-target-libphobos] Error 2
> make[1]: Leaving directory `/home/jerome/abs/gdc-hg/src/gcc-build'
> make: *** [all] Error 2
The attached patch allows it to build (but I haven't tested the
resulting lib since I don't use regexp myself).
Jerome
--
mailto:[email protected]
http://jeberger.free.fr
Jabber: [email protected]
# HG changeset patch
# Parent c3e22fb3bf19523679289f50b83bd0c5c39fc463
Fix phobos 1 build issues on x86_64.
diff -r c3e22fb3bf19 -r f424bf435a88 d/phobos/std/regexp.d
--- a/d/phobos/std/regexp.d Thu Oct 14 14:15:30 2010 +0100
+++ b/d/phobos/std/regexp.d Sat Oct 16 09:09:09 2010 +0200
@@ -1486,7 +1486,7 @@
size_t pop;
size_t ss;
regmatch_t *psave;
- uint c1;
+ size_t c1;
uint c2;
ushort* pu;
uint* puint;
@@ -1629,7 +1629,7 @@
c1 = input[src];
//printf("[x%02x]=x%02x, x%02x\n", c1 >> 3, ((&program[pc + 1 + 4])[c1 >> 3] ), (1 << (c1 & 7)));
if (c1 <= pu[0] &&
- !bt(cast(uint*)&(program[pc + 1 + 4]), c1)) // assumes BitArray implementation
+ !bt(cast(size_t*)&(program[pc + 1 + 4]), c1)) // assumes BitArray implementation
goto Lnomatch;
pc += 1 + 2 * ushort.sizeof + len;
break;
@@ -1644,7 +1644,7 @@
c1 = input[src];
if (c1 > pu[0])
goto Lnomatch;
- if (!bt(cast(uint*)&(program[pc + 1 + 4]), c1)) // assumes BitArray implementation
+ if (!bt(cast(size_t*)&(program[pc + 1 + 4]), c1)) // assumes BitArray implementation
goto Lnomatch;
src++;
pc += 1 + 2 * ushort.sizeof + len;
@@ -1659,7 +1659,7 @@
len = pu[1];
c1 = input[src];
if (c1 <= pu[0] &&
- bt(cast(uint*)&(program[pc + 1 + 4]), c1)) // assumes BitArray implementation
+ bt(cast(size_t*)&(program[pc + 1 + 4]), c1)) // assumes BitArray implementation
goto Lnomatch;
src++;
pc += 1 + 2 * ushort.sizeof + len;
signature.asc
Description: OpenPGP digital signature
