Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
February 06, 2005 Patch for GDC on Sun Solaris | ||||
---|---|---|---|---|
| ||||
Hello, a few weeks ago I asked about a GDC port to Solaris (http://www.digitalmars.com/drn-bin/wwwnews?D.gnu/886). Oskar Linde was right, the crashes are due to unaligned reads and it's not hard to fix. I've done the following modifications to GDC 0.10 (within GCC 3.4.3) in order to get a working D compiler: - added #include <alloca.h> to all files that use alloca() in the d/dmd/ directory - modified Dchar::calcHash() in d/dmd/dchar.c so it doesn't read unaligned memory locations (icalcHash() should probably also be changed) - added -Wcast-align to the D_CC_FLAGS in d/Make-lang.in to aid in finding further unaligned reads - d/target-ver-syms.sh was changed to allow "version (Sparc)" and "version (solaris)" I've changed these things in Phobos: - d/phobos/configure.in : For Solaris' semaphore.h it's necessary to link against librt - d/phobos/config/gen_math.c : (my) Solaris doesn't have C99 FP_ constants and functions - d/phobos/config/config-mid now has a "version (solaris)" block. It doesn't work, however and is just there to allow Phobos to compile. The patch is at http://w148.de/~mmartin/d/gdc-solaris-patch . Remember to run autoconf in d/phobos/ since it changes the configure.in. Results for Thomas Kuehne's Dstress are at http://w148.de/~mmartin/d/solaris-sparc_gdc-0.10 There are still quite a few issues (args.length doesn't work for example), but I'm happy that I even got this far. Marcel |
February 07, 2005 Re: Patch for GDC on Sun Solaris | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marcel Martin | -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Marcel Martin schrieb am Mon, 07 Feb 2005 00:47:08 +0100: > Hello, > > a few weeks ago I asked about a GDC port to Solaris (http://www.digitalmars.com/drn-bin/wwwnews?D.gnu/886). Oskar Linde was right, the crashes are due to unaligned reads and it's not hard to fix. > > I've done the following modifications to GDC 0.10 (within GCC 3.4.3) in > order to get a working D compiler: > - added #include <alloca.h> to all files that use alloca() in the d/dmd/ > directory > - modified Dchar::calcHash() in d/dmd/dchar.c so it doesn't read unaligned > memory locations (icalcHash() should probably also be changed) > - added -Wcast-align to the D_CC_FLAGS in d/Make-lang.in to aid in > finding further unaligned reads > - d/target-ver-syms.sh was changed to allow "version (Sparc)" and > "version (solaris)" > > I've changed these things in Phobos: > - d/phobos/configure.in : For Solaris' semaphore.h it's necessary to link > against librt > - d/phobos/config/gen_math.c : (my) Solaris doesn't have C99 FP_ constants > and functions > - d/phobos/config/config-mid now has a "version (solaris)" block. It doesn't > work, however and is just there to allow Phobos to compile. > > The patch is at http://w148.de/~mmartin/d/gdc-solaris-patch . Remember to run autoconf in d/phobos/ since it changes the configure.in. > > Results for Thomas Kuehne's Dstress are at http://w148.de/~mmartin/d/solaris-sparc_gdc-0.10 I've added your results and the patch. > There are still quite a few issues (args.length doesn't work for example), but I'm happy that I even got this far. Keep going *g* Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCBsFR3w+/yD4P9tIRAnV5AJ9VWY1E40RqYY8p0/AgfkEr4P7+egCdF9GI 6qTpFnE0pna+74HIHOtdNUw= =L2Bw -----END PGP SIGNATURE----- |
February 11, 2005 Re: Patch for GDC on Sun Solaris | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marcel Martin | very nice! It looks promising. "Marcel Martin" <mmar@freenet.de> wrote in message news:cu6a18$2h73$1@digitaldaemon.com... > Hello, > > a few weeks ago I asked about a GDC port to Solaris (http://www.digitalmars.com/drn-bin/wwwnews?D.gnu/886). Oskar Linde was right, the crashes are due to unaligned reads and it's not hard to fix. > > I've done the following modifications to GDC 0.10 (within GCC 3.4.3) in > order to get a working D compiler: > - added #include <alloca.h> to all files that use alloca() in the d/dmd/ > directory > - modified Dchar::calcHash() in d/dmd/dchar.c so it doesn't read unaligned > memory locations (icalcHash() should probably also be changed) > - added -Wcast-align to the D_CC_FLAGS in d/Make-lang.in to aid in > finding further unaligned reads > - d/target-ver-syms.sh was changed to allow "version (Sparc)" and > "version (solaris)" > > I've changed these things in Phobos: > - d/phobos/configure.in : For Solaris' semaphore.h it's necessary to link > against librt > - d/phobos/config/gen_math.c : (my) Solaris doesn't have C99 FP_ constants > and functions > - d/phobos/config/config-mid now has a "version (solaris)" block. It > doesn't > work, however and is just there to allow Phobos to compile. > > The patch is at http://w148.de/~mmartin/d/gdc-solaris-patch . Remember to run autoconf in d/phobos/ since it changes the configure.in. > > Results for Thomas Kuehne's Dstress are at http://w148.de/~mmartin/d/solaris-sparc_gdc-0.10 > > There are still quite a few issues (args.length doesn't work for example), but I'm happy that I even got this far. > > Marcel > |
February 16, 2005 Re: Patch for GDC on Sun Solaris | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marcel Martin | Marcel Martin wrote:
> Hello,
>
> a few weeks ago I asked about a GDC port to Solaris
> (http://www.digitalmars.com/drn-bin/wwwnews?D.gnu/886). Oskar Linde was
> right, the crashes are due to unaligned reads and it's not hard to fix.
>
> I've done the following modifications to GDC 0.10 (within GCC 3.4.3) in
> order to get a working D compiler:
> - added #include <alloca.h> to all files that use alloca() in the d/dmd/
> directory
> - modified Dchar::calcHash() in d/dmd/dchar.c so it doesn't read unaligned
> memory locations (icalcHash() should probably also be changed)
> - added -Wcast-align to the D_CC_FLAGS in d/Make-lang.in to aid in
> finding further unaligned reads
> - d/target-ver-syms.sh was changed to allow "version (Sparc)" and
> "version (solaris)"
>
> I've changed these things in Phobos:
> - d/phobos/configure.in : For Solaris' semaphore.h it's necessary to link
> against librt
> - d/phobos/config/gen_math.c : (my) Solaris doesn't have C99 FP_ constants
> and functions
> - d/phobos/config/config-mid now has a "version (solaris)" block. It doesn't
> work, however and is just there to allow Phobos to compile.
>
> The patch is at http://w148.de/~mmartin/d/gdc-solaris-patch . Remember to
> run autoconf in d/phobos/ since it changes the configure.in.
>
> Results for Thomas Kuehne's Dstress are at
> http://w148.de/~mmartin/d/solaris-sparc_gdc-0.10
>
> There are still quite a few issues (args.length doesn't work for example),
> but I'm happy that I even got this far.
>
> Marcel
>
Great! I'll add this to the next release. Please post/send any new patches.
David
|
February 17, 2005 Re: Patch for GDC on Sun Solaris | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Friedman | David Friedman wrote:
> Great! I'll add this to the next release. Please post/send any new patches.
Good! It might take some time, but I'll continue to work on it.
Marcel
|
February 25, 2005 Re: Patch for GDC on Sun Solaris | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marcel Martin | Marcel Martin wrote:
> I've done the following modifications to GDC 0.10 (within GCC 3.4.3) in
> order to get a working D compiler:
> - d/target-ver-syms.sh was changed to allow "version (Sparc)" and
> "version (solaris)"
Q: Shouldn't this be version(SPARC) ?
Not that "Windows" and "linux" sets a very good example, but anyway ?
--anders
|
March 25, 2005 Re: Patch for GDC on Sun Solaris | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | Both SPARC and Solaris are needed!
You can run Linux on SPARC, and Solaris on Intel.
Anders F Björklund wrote:
> Marcel Martin wrote:
>
>> I've done the following modifications to GDC 0.10 (within GCC 3.4.3) in
>> order to get a working D compiler:
>> - d/target-ver-syms.sh was changed to allow "version (Sparc)" and
>> "version (solaris)"
>
>
> Q: Shouldn't this be version(SPARC) ?
>
> Not that "Windows" and "linux" sets a very good example, but anyway ?
>
> --anders
|
Copyright © 1999-2021 by the D Language Foundation