D and FreeBSD

Jona Joachim jaj13 at web.de
Wed Aug 30 18:22:02 PDT 2006


On Wed, 30 Aug 2006 18:21:59 +0200, Anders F Björklund wrote:

> Jona Joachim wrote:
[...]
>> Do you think there are any concerns about building the sources with GDC
>> instead of DMD? All test programs seamed to work fine. The only warning I
>> got during the build process was:
>> 
>> gdc: unrecognized option `-version=__WXGTK__'
> 
> It should have worked out of the box, using GNU Make ? ("gmake")
> Anyway, -version is the wrong syntax for gdc - it uses -fversion
> So you need to either modify the above, or use "gdmd" instead...

Unfortunately it doesn't work out of the box. There are always small
changes that have to be made when porting to FreeBSD.
For example FreeBSD people tend to add version numbers to executables so
that you can install multiple versions of a software in parallel.
wx-config becomes wxgtk2-2.6-config. The good part is that you don't
really have to worry about this: if you don't define the WX_CONFIG
variable it will be defined automatically by the ports framework if you
tell it that you plan to use wxWidgets.
Furthermore the FreeBSD port of gdc doesn't come with gdmd. That's why I
had to set DMD=gdc. I will change the syntax of the parameters.
Also there is no command called arch in FreeBSD so
ARCH=$(shell (arch 2>/dev/null || echo i386) | sed -e s/i.86/x86/ )
becomes
ARCH=$(shell (uname -m) | sed -e s/i.86/x86/ )
A lot of small changes like these have to be made.

> DMD uses DMC syntax, and GDC uses GCC syntax and they're different.
> gdmd -version=__WXGTK__
> gdc -fversion=__WXGTK__
> 
> Wonder why it didn't include the config. `uname` == "FreeBSD", yes ?

Yes, uname returns "FreeBSD". config.`uname` is included in the Samples
directory but not in the wx directory.

Jona



More information about the Digitalmars-d mailing list