Opened 12 years ago

Closed 12 years ago

#19733 closed enhancement (fixed)

Gnatmake uses Apple's gcc by default

Reported by: jarimatti@… Owned by: krischik@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: gnatmake Cc: jarimatti@…
Port: gnat-gcc

Description

After installation the gnatmake uses Apple's gcc (4.0.1), which does not have Ada. The workaround is to pass parameters via the command line (or via other means).

Would it be possible to make the gnatmake use the gnat-gcc compilers out of the box? Or at least output a note when installing that you need to do this?

Sample call and output:

% gnatmake hello.adb 
gcc -c hello.adb
i686-apple-darwin8-gcc-4.0.1: hello.adb: Ada compiler not installed on this system
gnatmake: "hello.adb" compilation error

Sample call with compiler defined:

% gnatmake --GCC=gcc-gnat-4.3 --GNATLINK="gnatlink --GCC=gcc-gnat-4.3" hello.adb
gcc-gnat-4.3 -c -gnato -fstack-check -gnatE -gnaty hello.adb
gnatbind -x hello.ali
gnatlink hello.ali -fstack-check --GCC=gcc-gnat-4.3

Change History (5)

comment:1 Changed 12 years ago by jarimatti@…

Cc: jarimatti@… removed

Cc Me!

comment:2 Changed 12 years ago by jarimatti@…

Cc: jarimatti@… added

Cc Me!

comment:3 Changed 12 years ago by krischik@…

Owner: changed from macports-tickets@… to krischik@…
Status: newassigned

Hello,

as with all MacPorts gcc compiler you need to install gcc-select and use sudo gcc_select gnat-gcc.

But a post-install message would indeed be helpful.

Martin

comment:4 in reply to:  3 Changed 12 years ago by jarimatti@…

Replying to krischik@…:

Hello,

as with all MacPorts gcc compiler you need to install gcc-select and use sudo gcc_select gnat-gcc.

Hi,

A-ha! Error spotted between keyboard and chair. I installed the port gcc_select, chose the gnat-gcc compiler and everything works fine.

Thanks!

Jarimatti

comment:5 Changed 12 years ago by krischik@…

Resolution: fixed
Status: assignedclosed

A note has been added to inform the user to use gcc-select after activating the port.

Note: See TracTickets for help on using tickets.