www.digitalmars.com         C & C++   DMDScript  

D.gnu - Building GDC on AIX PowerPC

reply John Gibbons <JohnAGibbons bigpond.com> writes:
I am trying to build GDC on AIX (PowerPC) using GCC 3.3.3.

When I get to libphobos it stops with the configuration error

	checking for __libc_stack_end: no
	no usable data segment information

There is no reference to __libc_stack_end in AIX libc.a

Is there a way around this? Has anyone tried gdc on AIX?

I looked at the code in libphobos and it seems that it caters for 
alternative strategies to obtain the stack base but I am not sure how to 
cleanly hack into it and bypass the checks in the m4 config files.

Some people on the net have suggested that environ (extern 
char**environ) is a reasonable choice for a stack end value on most UNIX 
systems. Any suggestion as to how I could try that?

John
May 12 2005
parent reply David Friedman <d3rdclsmail_a t_earthlink_d.t_net> writes:
John Gibbons wrote:
 I am trying to build GDC on AIX (PowerPC) using GCC 3.3.3.
 
 When I get to libphobos it stops with the configuration error
 
     checking for __libc_stack_end: no
     no usable data segment information
 
 There is no reference to __libc_stack_end in AIX libc.a
 
 Is there a way around this? Has anyone tried gdc on AIX?
 
 I looked at the code in libphobos and it seems that it caters for 
 alternative strategies to obtain the stack base but I am not sure how to 
 cleanly hack into it and bypass the checks in the m4 config files.
 
 Some people on the net have suggested that environ (extern 
 char**environ) is a reasonable choice for a stack end value on most UNIX 
 systems. Any suggestion as to how I could try that?
 
 John

There is, in fact, a fallback option for detecting the end of the stack. The problem is the static data segment. I have attached a patch for AIX (AIX 5?). I have not been able to test it yet, but it should work. David
May 13 2005
parent reply John Gibbons <JohnAGibbons bigpond.com> writes:
David,

I could not find the attached patch.

Thanks in advance

John


David Friedman wrote:
 John Gibbons wrote:
 
 I am trying to build GDC on AIX (PowerPC) using GCC 3.3.3.

 When I get to libphobos it stops with the configuration error

     checking for __libc_stack_end: no
     no usable data segment information

 There is no reference to __libc_stack_end in AIX libc.a

 Is there a way around this? Has anyone tried gdc on AIX?

 I looked at the code in libphobos and it seems that it caters for 
 alternative strategies to obtain the stack base but I am not sure how 
 to cleanly hack into it and bypass the checks in the m4 config files.

 Some people on the net have suggested that environ (extern 
 char**environ) is a reasonable choice for a stack end value on most 
 UNIX systems. Any suggestion as to how I could try that?

 John

There is, in fact, a fallback option for detecting the end of the stack. The problem is the static data segment. I have attached a patch for AIX (AIX 5?). I have not been able to test it yet, but it should work. David

May 16 2005
parent David Friedman <d3rdclsmail_a_ _t_earthlink_d_._t_net> writes:
John Gibbons wrote:

Sorry, I left it out of the earlier post.

I was finally able to test it myself, but I found there is a lot more 
that needs to be fixed for AIX.  I'll post something once I get it working.

David

 David,
 
 I could not find the attached patch.
 
 Thanks in advance
 
 John
 
 
 David Friedman wrote:
 
 John Gibbons wrote:

 I am trying to build GDC on AIX (PowerPC) using GCC 3.3.3.

 When I get to libphobos it stops with the configuration error

     checking for __libc_stack_end: no
     no usable data segment information

 There is no reference to __libc_stack_end in AIX libc.a

 Is there a way around this? Has anyone tried gdc on AIX?

 I looked at the code in libphobos and it seems that it caters for 
 alternative strategies to obtain the stack base but I am not sure how 
 to cleanly hack into it and bypass the checks in the m4 config files.

 Some people on the net have suggested that environ (extern 
 char**environ) is a reasonable choice for a stack end value on most 
 UNIX systems. Any suggestion as to how I could try that?

 John

There is, in fact, a fallback option for detecting the end of the stack. The problem is the static data segment. I have attached a patch for AIX (AIX 5?). I have not been able to test it yet, but it should work. David


May 17 2005