Thread overview | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
September 18, 2008 Getting gdc working with xcode 3.1 | ||||
---|---|---|---|---|
| ||||
Today i managed to get gdc compiled and working with the version of gcc that comes with xcode 3.1. i haven't found anyplace that puts together all you need to do to get gdc working with leopard. especially if you want ppc support. so i made one hoping that the next person will experience a little less pain than i did. site is here: http://sites.google.com/site/ylixir/projects/gdc-on-a-mac p.s. i put some patches up there that i don't really know where to submit for inclusion in the main gdc project. specifically a patch for the patches that gdc does to apples compiler, and a patch for the apples linker. anyone know where i should go about submitting those? |
September 18, 2008 Re: Getting gdc working with xcode 3.1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to ylixir | ylixir wrote: > Today i managed to get gdc compiled and working with the version of gcc that comes with xcode 3.1. > > i haven't found anyplace that puts together all you need to do to get gdc working with leopard. especially if you want ppc support. so i made one hoping that the next person will experience a little less pain than i did. site is here: > > http://sites.google.com/site/ylixir/projects/gdc-on-a-mac Thanks for the update, I'm still planning to make a release of "gdcmac" for Leopard and might as well aim for Xcode 3.1 and gcc-5484 instead of 3.0 and gcc-5465. Or maybe stick with the original "plan" and go straight for gcc_42 instead, for the fictional GDC 0.25 release ? Along with upgrading MinGW's GCC to 4.2.1, for "gdcwin"... "gdcgnu" will probably wait for GCC 4.3.0, with Fedora 9. > p.s. i put some patches up there that i don't really know where to submit for inclusion in the main gdc project. specifically a patch for the patches that gdc does to apples compiler, and a patch for the apples linker. anyone know where i should go about submitting those? Here on the NG as good a place as any, as far as I know. Or file another bug report upstream, but those then risk being annoyances and closed as "dupe" rather than helpful. But I think the Apple linker bug also affected e.g. GHC ? I included the patch and a binary in the package meanwhile. --anders |
September 18, 2008 Re: Getting gdc working with xcode 3.1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | Anders F Björklund wrote: > Thanks for the update, I'm still planning to make a > release of "gdcmac" for Leopard and might as well aim > for Xcode 3.1 and gcc-5484 instead of 3.0 and gcc-5465. > > Or maybe stick with the original "plan" and go straight > for gcc_42 instead, for the fictional GDC 0.25 release ? > Along with upgrading MinGW's GCC to 4.2.1, for "gdcwin"... big smiles either way :-D > But I think the Apple linker bug also affected e.g. GHC ? ghc = haskell? |
September 19, 2008 Re: Getting gdc working with xcode 3.1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | On 2008-09-18 04:38:49 -0400, Anders F Björklund <afb@algonet.se> said: > Thanks for the update, I'm still planning to make a > release of "gdcmac" for Leopard and might as well aim > for Xcode 3.1 and gcc-5484 instead of 3.0 and gcc-5465. > > Or maybe stick with the original "plan" and go straight > for gcc_42 instead, for the fictional GDC 0.25 release ? > Along with upgrading MinGW's GCC to 4.2.1, for "gdcwin"... Anything that runs out of the box with no show stopper is an improvement from what we have now. I've been trying too to build a working GDC with the intent of creating a D for Xcode package including the compiler, debugger, linker and my D for Xcode plugin with some project and file templates all together for easy installation. I want to distribute a universal binary compiler capable of PowerPC and Intel output, but I haven't had much success in compiling it up to now. My current approach is to compile four compilers (PowerPC to PowerPC, PowerPC to Intel, Intel to Intel, and Intel to PowerPC) and merge executables into universal binaries using lipo. But I haven't been able to compile anything but the first variant (PowerPC to PowerPC). Do you have any tip for doing the rest, as you seem to have acheived it somehow for gdcmac? -- Michel Fortin michel.fortin@michelf.com http://michelf.com/ |
September 19, 2008 Re: Getting gdc working with xcode 3.1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | Anders F Björklund wrote:
> ylixir wrote:
>> Today i managed to get gdc compiled and working with the version of gcc that comes with xcode 3.1.
>>
>> i haven't found anyplace that puts together all you need to do to get gdc working with leopard. especially if you want ppc support. so i made one hoping that the next person will experience a little less pain than i did. site is here:
>>
>> http://sites.google.com/site/ylixir/projects/gdc-on-a-mac
>
> Thanks for the update, I'm still planning to make a
> release of "gdcmac" for Leopard and might as well aim
> for Xcode 3.1 and gcc-5484 instead of 3.0 and gcc-5465.
>
> Or maybe stick with the original "plan" and go straight
> for gcc_42 instead, for the fictional GDC 0.25 release ?
> Along with upgrading MinGW's GCC to 4.2.1, for "gdcwin"...
>
> "gdcgnu" will probably wait for GCC 4.3.0, with Fedora 9.
>
>> p.s. i put some patches up there that i don't really know where to submit for inclusion in the main gdc project. specifically a patch for the patches that gdc does to apples compiler, and a patch for the apples linker. anyone know where i should go about submitting those?
>
> Here on the NG as good a place as any, as far as I know.
>
> Or file another bug report upstream, but those then risk
> being annoyances and closed as "dupe" rather than helpful.
> But I think the Apple linker bug also affected e.g. GHC ?
>
> I included the patch and a binary in the package meanwhile.
>
> --anders
It would be really nice with a D integration that works with Xcode 3.1
|
September 19, 2008 Re: Getting gdc working with xcode 3.1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Michel Fortin | Yeah, what I wound up with was two sets of binaries, both universal binaries, one targeting intel and one targeting ppc.
i would reccomend going to the site linked in my original post and doing steps two and three, that will give you a patched linker and a destroot directory structure with the whole works in it that you can make a package out of, without impacting your system as a whole.
if you don't want to do that, the gist of what i did is below, but if you have specific problems let me know. worst case i can zip up my destroot and e-mail it, or upload it to my google site for a few days so you can download.
you can get all my patches and scripts from the link in the original post, you'll need the one for the linker and for the actual compiler, unless you already made your own which maybe you did if you already have the ppc->ppc part working. i also modified dave cheney's script that basically automates the whole build/patch process for the compiler, again, see the page linked above.
basically what i did was patch and replace my linker (ld64) before anything else, to avoid those nasty bus errors that keep cropping up. note that ld64 is symlinked to ld, so replacing ld replaces both.
next step is patching the patches that gdc applies to apples compiler. then using the setup-gcc.sh script (more info in the INSTALL file from dgcc).
from there i stopped paying attention to dgcc's instructions and switched to the instructions in the README.Apple file that comes with apples gcc source.
Building the apple way is pretty easy, and does all the dirty work for you, no lipo etc. all you do is make a destination, object, and symlink directory, then execute the build command. here is the command line from my script:
sudo gnumake install RC_OS=macos \
SRCROOT=`pwd` OBJROOT=`pwd`/build/obj \
DSTROOT=$DESTROOT SYMROOT=`pwd`/build/sym
this command should by default build host and target compilers for both platforms, and install them to the place pointed to by DSTROOT. then you can ditto it like i did to install on your system, or make a package from it, or whatever.
p.s. i had to use sudo because apple automatically makes root the owner of all the executables and stuff.
p.p.s. if you don't use the script to build the compiler, it's still a good reference on how to apply the patches, and how to run the build
Michel Fortin wrote:
> On 2008-09-18 04:38:49 -0400, Anders F Björklund <afb@algonet.se> said:
>
>> Thanks for the update, I'm still planning to make a
>> release of "gdcmac" for Leopard and might as well aim
>> for Xcode 3.1 and gcc-5484 instead of 3.0 and gcc-5465.
>>
>> Or maybe stick with the original "plan" and go straight
>> for gcc_42 instead, for the fictional GDC 0.25 release ?
>> Along with upgrading MinGW's GCC to 4.2.1, for "gdcwin"...
>
> Anything that runs out of the box with no show stopper is an improvement from what we have now.
>
> I've been trying too to build a working GDC with the intent of creating a D for Xcode package including the compiler, debugger, linker and my D for Xcode plugin with some project and file templates all together for easy installation. I want to distribute a universal binary compiler capable of PowerPC and Intel output, but I haven't had much success in compiling it up to now.
>
> My current approach is to compile four compilers (PowerPC to PowerPC, PowerPC to Intel, Intel to Intel, and Intel to PowerPC) and merge executables into universal binaries using lipo. But I haven't been able to compile anything but the first variant (PowerPC to PowerPC). Do you have any tip for doing the rest, as you seem to have acheived it somehow for gdcmac?
>
|
September 19, 2008 Re: Getting gdc working with xcode 3.1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Michel Fortin | just a quick correction of my previous post, actually i checked, and i have three sets of binaries, all universal, one that targets intel, one that targets ppc, and one that targets either, depending on the -arch switch, so i'm guessing that is exactly what you need.
Michel Fortin wrote:
> On 2008-09-18 04:38:49 -0400, Anders F Björklund <afb@algonet.se> said:
>
>> Thanks for the update, I'm still planning to make a
>> release of "gdcmac" for Leopard and might as well aim
>> for Xcode 3.1 and gcc-5484 instead of 3.0 and gcc-5465.
>>
>> Or maybe stick with the original "plan" and go straight
>> for gcc_42 instead, for the fictional GDC 0.25 release ?
>> Along with upgrading MinGW's GCC to 4.2.1, for "gdcwin"...
>
> Anything that runs out of the box with no show stopper is an improvement from what we have now.
>
> I've been trying too to build a working GDC with the intent of creating a D for Xcode package including the compiler, debugger, linker and my D for Xcode plugin with some project and file templates all together for easy installation. I want to distribute a universal binary compiler capable of PowerPC and Intel output, but I haven't had much success in compiling it up to now.
>
> My current approach is to compile four compilers (PowerPC to PowerPC, PowerPC to Intel, Intel to Intel, and Intel to PowerPC) and merge executables into universal binaries using lipo. But I haven't been able to compile anything but the first variant (PowerPC to PowerPC). Do you have any tip for doing the rest, as you seem to have acheived it somehow for gdcmac?
>
|
September 19, 2008 Re: Getting gdc working with xcode 3.1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | Jacob Carlborg wrote:
> Anders F Björklund wrote:
>> ylixir wrote:
>>> Today i managed to get gdc compiled and working with the version of gcc that comes with xcode 3.1.
>>>
>>> i haven't found anyplace that puts together all you need to do to get gdc working with leopard. especially if you want ppc support. so i made one hoping that the next person will experience a little less pain than i did. site is here:
>>>
>>> http://sites.google.com/site/ylixir/projects/gdc-on-a-mac
>>
>> Thanks for the update, I'm still planning to make a
>> release of "gdcmac" for Leopard and might as well aim
>> for Xcode 3.1 and gcc-5484 instead of 3.0 and gcc-5465.
>>
>> Or maybe stick with the original "plan" and go straight
>> for gcc_42 instead, for the fictional GDC 0.25 release ?
>> Along with upgrading MinGW's GCC to 4.2.1, for "gdcwin"...
>>
>> "gdcgnu" will probably wait for GCC 4.3.0, with Fedora 9.
>>
>>> p.s. i put some patches up there that i don't really know where to submit for inclusion in the main gdc project. specifically a patch for the patches that gdc does to apples compiler, and a patch for the apples linker. anyone know where i should go about submitting those?
>>
>> Here on the NG as good a place as any, as far as I know.
>>
>> Or file another bug report upstream, but those then risk
>> being annoyances and closed as "dupe" rather than helpful.
>> But I think the Apple linker bug also affected e.g. GHC ?
>>
>> I included the patch and a binary in the package meanwhile.
>>
>> --anders
>
> It would be really nice with a D integration that works with Xcode 3.1
And that has support for DSSS and Tango
|
September 20, 2008 Re: Getting gdc working with xcode 3.1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to ylixir | On 2008-09-19 12:39:05 -0400, ylixir <ylixir@gmail.com> said: > just a quick correction of my previous post, actually i checked, and i have three sets of binaries, all universal, one that targets intel, one that targets ppc, and one that targets either, depending on the -arch switch, so i'm guessing that is exactly what you need. Oh! Great. I didn't realize your script was actually doing what I want. I'll give it a try. Thanks. (And perhaps I should have read Apple's documentation more carefully too.) -- Michel Fortin michel.fortin@michelf.com http://michelf.com/ |
September 20, 2008 Re: Getting gdc working with xcode 3.1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | Jacob Carlborg wrote:
> Jacob Carlborg wrote:
>> Anders F Björklund wrote:
>>> ylixir wrote:
>>>> Today i managed to get gdc compiled and working with the version of gcc that comes with xcode 3.1.
>>>>
>>>> i haven't found anyplace that puts together all you need to do to get gdc working with leopard. especially if you want ppc support. so i made one hoping that the next person will experience a little less pain than i did. site is here:
>>>>
>>>> http://sites.google.com/site/ylixir/projects/gdc-on-a-mac
>>>
>>> Thanks for the update, I'm still planning to make a
>>> release of "gdcmac" for Leopard and might as well aim
>>> for Xcode 3.1 and gcc-5484 instead of 3.0 and gcc-5465.
>>>
>>> Or maybe stick with the original "plan" and go straight
>>> for gcc_42 instead, for the fictional GDC 0.25 release ?
>>> Along with upgrading MinGW's GCC to 4.2.1, for "gdcwin"...
>>>
>>> "gdcgnu" will probably wait for GCC 4.3.0, with Fedora 9.
>>>
>>>> p.s. i put some patches up there that i don't really know where to submit for inclusion in the main gdc project. specifically a patch for the patches that gdc does to apples compiler, and a patch for the apples linker. anyone know where i should go about submitting those?
>>>
>>> Here on the NG as good a place as any, as far as I know.
>>>
>>> Or file another bug report upstream, but those then risk
>>> being annoyances and closed as "dupe" rather than helpful.
>>> But I think the Apple linker bug also affected e.g. GHC ?
>>>
>>> I included the patch and a binary in the package meanwhile.
>>>
>>> --anders
>>
>> It would be really nice with a D integration that works with Xcode 3.1
>
> And that has support for DSSS and Tango
and vi support for xcode imho!
i think xcode support is being worked on (not by me though).
|
Copyright © 1999-2021 by the D Language Foundation