Thread overview | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
May 06, 2014 Porting DMD compiler to haiku OS | ||||
---|---|---|---|---|
| ||||
Good day. Sorry for my bad english. I'm trying to build the dmd compiler to Haiku OS. At compile time get the following error: http://itmages.ru/image/view/1652327/b501e37b What could be the reason? Thanks. |
May 06, 2014 Re: Porting DMD compiler to haiku OS | ||||
---|---|---|---|---|
| ||||
Posted in reply to iridium | On Tuesday, 6 May 2014 at 06:33:51 UTC, iridium wrote:
> Good day. Sorry for my bad english. I'm trying to build the dmd compiler to Haiku OS. At compile time get the following error: http://itmages.ru/image/view/1652327/b501e37b
>
> What could be the reason? Thanks.
Have you already updated all "version ()" blocks with Haiku specific code?
--
Paulo
|
May 06, 2014 Re: Porting DMD compiler to haiku OS | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paulo Pinto | On Tuesday, 6 May 2014 at 07:23:47 UTC, Paulo Pinto wrote: > On Tuesday, 6 May 2014 at 06:33:51 UTC, iridium wrote: >> Good day. Sorry for my bad english. I'm trying to build the dmd compiler to Haiku OS. At compile time get the following error: http://itmages.ru/image/view/1652327/b501e37b >> >> What could be the reason? Thanks. > > Have you already updated all "version ()" blocks with Haiku specific code? > > -- > Paulo Yes. optabtgen now runs correctly. Now another error. I understand the error during assembly: http://itmages.ru/image/view/1652519/5fa513e0 |
May 07, 2014 Re: Porting DMD compiler to haiku OS | ||||
---|---|---|---|---|
| ||||
Posted in reply to iridium | "iridium" wrote in message news:ltcxhbcqltnltbiddqyy@forum.dlang.org... > Yes. optabtgen now runs correctly. Now another error. I understand the error during assembly: http://itmages.ru/image/view/1652519/5fa513e0 Linker error actually. The first one is saying it can't find Obj::init which is in backend/cgobj.c inside a #if OMFOBJ and backend/elfobj.c inside #if ELFOBJ. I'd guess you need to fix the conditioin in cdef.h to include TARGET_HAIKU -#define ELFOBJ (TARGET_LINUX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS) +#define ELFOBJ (TARGET_LINUX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS || TARGET_HAIKU) And the rest are probably similar things. |
May 07, 2014 Re: Porting DMD compiler to haiku OS | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Murphy | On Wednesday, 7 May 2014 at 06:21:48 UTC, Daniel Murphy wrote: > "iridium" wrote in message news:ltcxhbcqltnltbiddqyy@forum.dlang.org... > >> Yes. optabtgen now runs correctly. Now another error. I understand the error during assembly: http://itmages.ru/image/view/1652519/5fa513e0 > > Linker error actually. > > The first one is saying it can't find Obj::init which is in backend/cgobj.c inside a #if OMFOBJ and backend/elfobj.c inside #if ELFOBJ. > > I'd guess you need to fix the conditioin in cdef.h to include TARGET_HAIKU > > -#define ELFOBJ (TARGET_LINUX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS) > +#define ELFOBJ (TARGET_LINUX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS || TARGET_HAIKU) > > And the rest are probably similar things. I was able to build a compiler. Follow the link to see the result: http://itmages.ru/image/view/1654442/ecbf7af1 Now the problem with the assembly of the druntime... http://itmages.ru/image/view/1654445/31a30d8d |
May 07, 2014 Re: Porting DMD compiler to haiku OS | ||||
---|---|---|---|---|
| ||||
Posted in reply to iridium | On Wednesday, 7 May 2014 at 11:40:59 UTC, iridium wrote: > On Wednesday, 7 May 2014 at 06:21:48 UTC, Daniel Murphy wrote: >> "iridium" wrote in message news:ltcxhbcqltnltbiddqyy@forum.dlang.org... >> >>> Yes. optabtgen now runs correctly. Now another error. I understand the error during assembly: http://itmages.ru/image/view/1652519/5fa513e0 >> >> Linker error actually. >> >> The first one is saying it can't find Obj::init which is in backend/cgobj.c inside a #if OMFOBJ and backend/elfobj.c inside #if ELFOBJ. >> >> I'd guess you need to fix the conditioin in cdef.h to include TARGET_HAIKU >> >> -#define ELFOBJ (TARGET_LINUX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS) >> +#define ELFOBJ (TARGET_LINUX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS || TARGET_HAIKU) >> >> And the rest are probably similar things. > > I was able to build a compiler. Follow the link to see the result: http://itmages.ru/image/view/1654442/ecbf7af1 > > Now the problem with the assembly of the druntime... http://itmages.ru/image/view/1654445/31a30d8d Take a look at my recent patches to add Android/x86 support to druntime: https://github.com/D-Programming-Language/druntime/pull/681 https://github.com/D-Programming-Language/druntime/pull/734 https://github.com/D-Programming-Language/druntime/pull/738 You will need at least the first two to get druntime working with a trimmed down mak/SRCS, then a version of the last pull to get all of druntime to compile. |
May 08, 2014 Re: Porting DMD compiler to haiku OS | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joakim | On Wednesday, 7 May 2014 at 15:26:23 UTC, Joakim wrote: > On Wednesday, 7 May 2014 at 11:40:59 UTC, iridium wrote: >> On Wednesday, 7 May 2014 at 06:21:48 UTC, Daniel Murphy wrote: >>> "iridium" wrote in message news:ltcxhbcqltnltbiddqyy@forum.dlang.org... >>> >>>> Yes. optabtgen now runs correctly. Now another error. I understand the error during assembly: http://itmages.ru/image/view/1652519/5fa513e0 >>> >>> Linker error actually. >>> >>> The first one is saying it can't find Obj::init which is in backend/cgobj.c inside a #if OMFOBJ and backend/elfobj.c inside #if ELFOBJ. >>> >>> I'd guess you need to fix the conditioin in cdef.h to include TARGET_HAIKU >>> >>> -#define ELFOBJ (TARGET_LINUX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS) >>> +#define ELFOBJ (TARGET_LINUX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS || TARGET_HAIKU) >>> >>> And the rest are probably similar things. >> >> I was able to build a compiler. Follow the link to see the result: http://itmages.ru/image/view/1654442/ecbf7af1 >> >> Now the problem with the assembly of the druntime... http://itmages.ru/image/view/1654445/31a30d8d > > Take a look at my recent patches to add Android/x86 support to druntime: > > https://github.com/D-Programming-Language/druntime/pull/681 > https://github.com/D-Programming-Language/druntime/pull/734 > https://github.com/D-Programming-Language/druntime/pull/738 > > You will need at least the first two to get druntime working with a trimmed down mak/SRCS, then a version of the last pull to get all of druntime to compile. Which as I collected a druntime. But in the link step, the following: http://itmages.ru/image/view/1655530/a5ca9557 |
May 08, 2014 Re: Porting DMD compiler to haiku OS | ||||
---|---|---|---|---|
| ||||
Posted in reply to iridium | On 08/05/14 05:54, iridium wrote: > Which as I collected a druntime. But in the link step, the following: > http://itmages.ru/image/view/1655530/a5ca9557 You need to link with the C library as well. When compiling with DMD, it uses GCC to link. -- /Jacob Carlborg |
May 08, 2014 Re: Porting DMD compiler to haiku OS | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Thursday, 8 May 2014 at 06:07:23 UTC, Jacob Carlborg wrote: > On 08/05/14 05:54, iridium wrote: > >> Which as I collected a druntime. But in the link step, the following: >> http://itmages.ru/image/view/1655530/a5ca9557 > > You need to link with the C library as well. When compiling with DMD, it uses GCC to link. That's what happens when linking: http://itmages.ru/image/view/1655772/669acb30 |
May 08, 2014 Re: Porting DMD compiler to haiku OS | ||||
---|---|---|---|---|
| ||||
Posted in reply to iridium | On 08/05/14 08:53, iridium wrote: > That's what happens when linking: > http://itmages.ru/image/view/1655772/669acb30 You need to link with both Phobos and the C standard library. Run "dmd -v main.d" and look at the linking step at the end. -- /Jacob Carlborg |
Copyright © 1999-2021 by the D Language Foundation