Opened 16 years ago

Closed 14 years ago

#16549 closed enhancement (wontfix)

gcc43: patch to add Ada support

Reported by: martin.osx@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: C.Chryssochoidis@…, ryandesign (Ryan Carsten Schmidt), other@…
Port: gcc43

Description

The current lang/gcc ports are missing Ada support. Probably due to the fact that Ada is self hosted. Nothing wrong with beeing self hosted - I think every self resprecting programming language should have at least one self hosted implementation.

But the tiny twist ist: you need an Ada compiler to compile Ada. But this is no problem on Mac OS X as MacAda provides a working Ada implementating.

Once you got an Ada compiler you can always use it to create a new version of itself.

The attached patch will use either the MacAda compiler (+macada) or and an allready created MacPorts GCC with Ada support (+ada) to create a fully working GCC with all it's languages enabled.

I hope this patch is accepted. I also atteched a little command file which will create a dmg from the new compiler.

Attachments (2)

Portfile (6.3 KB) - added by martin.osx@… 16 years ago.
The new Portfile for gvv 4.3.2
Build_GCC.command (644 bytes) - added by martin.osx@… 16 years ago.
Command file to create a mdmg

Download all attachments as: .zip

Change History (13)

Changed 16 years ago by martin.osx@…

Attachment: Portfile added

The new Portfile for gvv 4.3.2

Changed 16 years ago by martin.osx@…

Attachment: Build_GCC.command added

Command file to create a mdmg

comment:1 Changed 16 years ago by martin.osx@…

Cc: martin.osx@… added

Cc Me!

comment:2 Changed 16 years ago by mf2k (Frank Schima)

Cc: martin.osx@… removed
Owner: changed from macports-tickets@… to mww@…
Port: gcc43 added; lang/gcc43 removed
Summary: Ada support for GCCgcc43: patch to add Ada support

Assigning to maintainer. Note: The ticket reporter is automatically Cc'ed!

comment:3 Changed 16 years ago by martin.osx@…

I have created a binary release for download to ease up testing the patch (so I hope).

comment:4 Changed 16 years ago by C.Chryssochoidis@…

Cc: C.Chryssochoidis@… added

Cc Me!

comment:5 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

You should attach patches, not full Portfiles, so we can see what you changed.

You should use ${prefix} instead of hardcoding /opt/local

I don't like the +ada variant because it causes the entire port to be built using MacPorts' gcc 4.3 instead of with Apple's gcc 4.0.

I don't like the +macada variant because it uses things that were not installed by MacPorts, which is against MacPorts policy. And it causes the entire port to be built using the external gcc 4.3 in /usr/local/ada-4.3.

If a port needs a bootstrap program, the port should download and internally use that bootstrap program. It should not rely on other software to be installed externally, and it really should not rely on an earlier version of itself having been installed.

comment:6 Changed 16 years ago by other@…

Cc: other@… added

Cc Me!

comment:7 in reply to:  5 Changed 16 years ago by martin.osx@…

Replying to ryandesign@…:

You should attach patches, not full Portfiles, so we can see what you changed.

Ok!

I don't like the +ada variant because it causes the entire port to be built using MacPorts' gcc 4.3 instead of with Apple's gcc 4.0. I don't like the +macada variant because it uses things that were not installed by MacPorts, which is against MacPorts policy. And it causes the entire port to be built using the external gcc 4.3 in /usr/local/ada-4.3. If a port needs a bootstrap program, the port should download and internally use that bootstrap program. It should not rely on other software to be installed externally, and it really should not rely on an earlier version of itself having been installed.

But this is how a self hosted system works. It uses an older version of a system to create the newer version. In the GCC tool chain the C and Ada compiler are self hosted. C++, Fortran and Java are not. And as such: for the C compiler you are already doing what you condemn: You use the externally provided Apple GCC 4.0 to create MacPorts GCC 4.3. If Apple would not have provided you with ready made GCC C compiler you could not create a new one. And it is the same for the Ada compiler: If MacPorts would not have provided and initial Ada compiler for Mac OS X we would not be able to create a new version either.

To create the initial compiler of a self hosted system you need to create a cross compiler on a system where the tool chain already exists. A no go for MacPorts.

comment:8 in reply to:  5 Changed 16 years ago by martin.osx@…

Replying to ryandesign@…:

I don't like the +ada variant because it causes the entire port to be built using MacPorts' gcc 4.3 instead of with Apple's gcc 4.0. And it causes the entire port to be built using the external gcc 4.3 in /usr/local/ada-4.3.

Forgot to mention: The compiler is never build with Apple's gcc 4.0. Apple's gcc 4.0 is only used in stage 1 after which the the build system starts to use the compiler freshly created in stage 1 to recreate itself yet again. Pretty standart behavior for a self hosted system.

Martin

comment:9 Changed 16 years ago by (none)

Milestone: Port Enhancements

Milestone Port Enhancements deleted

comment:10 Changed 15 years ago by blb@…

Is this still needed, now that the gnat-gcc port exists?

comment:11 Changed 14 years ago by jmroot (Joshua Root)

Resolution: wontfix
Status: newclosed

This is probably really bitrotted by now. Reopen if it's still needed and you can supply a diff against the current portfile.

Note: See TracTickets for help on using tickets.