comp.lang.ada
 help / color / mirror / Atom feed
* Mac OS X cross compiler
@ 2016-06-22 16:46 Lucretia
  2016-06-22 17:55 ` Simon Wright
  0 siblings, 1 reply; 6+ messages in thread
From: Lucretia @ 2016-06-22 16:46 UTC (permalink / raw)


Hi,

I know some people here have built gnat for Mac and I'm wanting some advice on how to get it all built for Mac but as a cross compiler. The problem I have at the start is that binutils doesn't build ld and as for Mac and I cannot get any further.

Thanks,
Luke.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mac OS X cross compiler
  2016-06-22 16:46 Mac OS X cross compiler Lucretia
@ 2016-06-22 17:55 ` Simon Wright
  2016-06-22 18:31   ` Lucretia
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Simon Wright @ 2016-06-22 17:55 UTC (permalink / raw)


Lucretia <laguest9000@googlemail.com> writes:

> I know some people here have built gnat for Mac and I'm wanting some
> advice on how to get it all built for Mac but as a cross compiler. The
> problem I have at the start is that binutils doesn't build ld and as
> for Mac and I cannot get any further.

No, and building it on a Mac gets nowhere too.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mac OS X cross compiler
  2016-06-22 17:55 ` Simon Wright
@ 2016-06-22 18:31   ` Lucretia
  2016-06-22 18:32   ` Lucretia
  2016-06-22 23:58   ` Luke A. Guest
  2 siblings, 0 replies; 6+ messages in thread
From: Lucretia @ 2016-06-22 18:31 UTC (permalink / raw)


On Wednesday, 22 June 2016 18:55:35 UTC+1, Simon Wright  wrote:
> Lucretia <laguest9000@googlemail.com> writes:
> 
> > I know some people here have built gnat for Mac and I'm wanting some
> > advice on how to get it all built for Mac but as a cross compiler. The
> > problem I have at the start is that binutils doesn't build ld and as
> > for Mac and I cannot get any further.
> 
> No, and building it on a Mac gets nowhere too.

I know.

From having a look around, seems that you need to build ld64 and cctools and possible xar, and I think this is in place of binutils.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mac OS X cross compiler
  2016-06-22 17:55 ` Simon Wright
  2016-06-22 18:31   ` Lucretia
@ 2016-06-22 18:32   ` Lucretia
  2016-06-22 23:58   ` Luke A. Guest
  2 siblings, 0 replies; 6+ messages in thread
From: Lucretia @ 2016-06-22 18:32 UTC (permalink / raw)


On Wednesday, 22 June 2016 18:55:35 UTC+1, Simon Wright  wrote:

> No, and building it on a Mac gets nowhere too.

I know.

From having a look around, seems that you need to build ld64 and cctools and possible xar, and I think this is in place of binutils.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mac OS X cross compiler
  2016-06-22 17:55 ` Simon Wright
  2016-06-22 18:31   ` Lucretia
  2016-06-22 18:32   ` Lucretia
@ 2016-06-22 23:58   ` Luke A. Guest
  2016-06-23  8:10     ` Simon Wright
  2 siblings, 1 reply; 6+ messages in thread
From: Luke A. Guest @ 2016-06-22 23:58 UTC (permalink / raw)


Simon Wright <simon@pushface.org> wrote:
>> for Mac and I cannot get any further.
> 
> No, and building it on a Mac gets nowhere too.
> 

Ok, found a port of the required tools, have all required tools now. GCC
4.9.2 still doesn't build, need to look into it more. It's the dread can't
work out object suffix error!

Just wanted to ask though, I don't need a multilib capable compiler anymore
right? Mac OS X is all 64 bit right?

Ta.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mac OS X cross compiler
  2016-06-22 23:58   ` Luke A. Guest
@ 2016-06-23  8:10     ` Simon Wright
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Wright @ 2016-06-23  8:10 UTC (permalink / raw)


Luke A. Guest <laguest@archeia.com> writes:

> Just wanted to ask though, I don't need a multilib capable compiler
> anymore right? Mac OS X is all 64 bit right?

Not quite, but I wouldn't worry.

After some searching I found a 32-bit executable, and it still runs;

$ file /Applications/Hugin/Hugin.app/Contents/MacOS/Hugin
/Applications/Hugin/Hugin.app/Contents/MacOS/Hugin: Mach-O executable
i386

GNAT GPL 2016 has 6 fat binary libraries, all variants of libgcc.

The C compiler can produce a 32-bit executable:

$ which gcc
/opt/gnat-gpl-2016/bin/gcc
$ gcc hi.c
$ file a.out
a.out: Mach-O 64-bit executable x86_64
$ gcc hi.c -m32
$ file a.out
a.out: Mach-O executable i386

and the Ada compiler on its own can produce a 32-bit object:

$ gcc -c hello.adb -m32
$ file hello.o
hello.o: Mach-O object i386

but gnatmake won't:

$ gnatmake -c -u -f -m32 hello.adb 
gnatmake: RTS path not valid: missing adainclude and adalib directories


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-23  8:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-22 16:46 Mac OS X cross compiler Lucretia
2016-06-22 17:55 ` Simon Wright
2016-06-22 18:31   ` Lucretia
2016-06-22 18:32   ` Lucretia
2016-06-22 23:58   ` Luke A. Guest
2016-06-23  8:10     ` Simon Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox