New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #16549 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 16 months ago

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@…, 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

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

Change History

Changed 3 years ago by martin.osx@…

The new Portfile for gvv 4.3.2

Changed 3 years ago by martin.osx@…

Command file to create a mdmg

  Changed 3 years ago by martin.osx@…

  • cc martin.osx@… added

Cc Me!

  Changed 3 years ago by macsforever2000@…

  • owner changed from macports-tickets@… to mww@…
  • cc martin.osx@… removed
  • port changed from lang/gcc43 to gcc43
  • summary changed from Ada support for GCC to gcc43: patch to add Ada support

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

  Changed 3 years ago by martin.osx@…

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

  Changed 3 years ago by C.Chryssochoidis@…

  • cc C.Chryssochoidis@… added

Cc Me!

follow-ups: ↓ 7 ↓ 8   Changed 3 years ago by ryandesign@…

  • 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.

  Changed 3 years ago by other@…

  • cc other@… added

Cc Me!

in reply to: ↑ 5   Changed 3 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.

in reply to: ↑ 5   Changed 3 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

  Changed 3 years ago by anonymous

  • milestone Port Enhancements deleted

Milestone Port Enhancements deleted

  Changed 2 years ago by blb@…

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

  Changed 16 months ago by jmr@…

  • status changed from new to closed
  • resolution set to wontfix

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.