Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnat 11.1.0: new formula #77641

Closed
wants to merge 2 commits into from
Closed

Conversation

paperchalice
Copy link
Contributor

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

GNAT use gcc as it compilation driver
add zstd to support lto code compression

@BrewTestBot BrewTestBot added the automerge-skip `brew pr-automerge` will skip this pull request label May 20, 2021
depends_on "binutils"
end

conflicts_with "gcc", because: "both install gcc"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the files that conflict with gcc, so that this doesn't conflict with gcc? That's basically what libgccjit does.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GNAT invokes gcc to compile ada source code so that is inevitable.

Copy link
Member

@carlocab carlocab May 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be persuaded to invoke gcc from the gcc formula? libgccjit also invokes gcc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If use gcc from gcc formula

% gnat make --GCC=gcc-11 hello.adb
gcc-11 -c hello.adb
gcc-11: error: hello.adb: Ada compiler not installed on this system
gnatmake: "hello.adb" compilation error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specs.h in gcc formula doesn't include gcc/ada/gcc-interface/lang-specs.h so it can't handle ada source file.

--libdir=#{lib}/gcc/#{version_suffix}
--disable-nls
--enable-checking=release
--enable-languages=c,ada
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is enabling C necessary to build Ada?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ada depends on C

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but that doesn't mean I need to build a C compiler just to build an Ada compiler. Why can't I build an Ada compiler while still using my already existing C compiler?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ada part of GNAT need use some gcc's C code.

@paperchalice
Copy link
Contributor Author

--program-suffix option conflict with GNAT, GNAT need all program without suffix to work correctly.

@carlocab carlocab requested a review from fxcoudert May 20, 2021 07:41
@fxcoudert
Copy link
Member

add zstd to support lto code compression

This should be added to GCC itself, as it is not specific to Ada.

--program-suffix option conflict with GNAT, GNAT need all program without suffix to work correctly

That's going to make it difficult to work with the main GCC formula.

@paperchalice
Copy link
Contributor Author

paperchalice commented May 20, 2021

add zstd to support lto code compression

This should be added to GCC itself, as it is not specific to Ada.

--program-suffix option conflict with GNAT, GNAT need all program without suffix to work correctly

That's going to make it difficult to work with the main GCC formula.

If keep --program-suffix, test will become

system bin/"gnatmake-#{version_suffix}", "--GCC=gcc-#{version_suffix}",
      "--GNATLINK=gnatlink-#{version_suffix} --GCC=gcc-#{version_suffix}", "hello.adb"

which means user need pass more arguments.

@paperchalice
Copy link
Contributor Author

Re-adding the --program-suffix option.

Formula/gnat.rb Outdated
Comment on lines 17 to 22
pour_bottle? do
on_macos do
reason "The bottle needs the Xcode CLT to be installed."
satisfy { MacOS::CLT.installed? }
end
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rylan12 we have new syntax for this now right?

Copy link
Member

@Rylan12 Rylan12 May 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but we need to wait for a new tag for it to be used in Homebrew/core.

Once that's been made, it should be:

Suggested change
pour_bottle? do
on_macos do
reason "The bottle needs the Xcode CLT to be installed."
satisfy { MacOS::CLT.installed? }
end
end
pour_bottle? only_if: :clt_installed

No need to wait for the new syntax, though. If desired this can be merged now and I'll update it to the new syntax when I do the rest of the formulae.

@paperchalice
Copy link
Contributor Author

Use new pour_bottle? syntax.

@cho-m cho-m added the new formula PR adds a new formula to Homebrew/homebrew-core label May 26, 2021
@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Jun 16, 2021
@github-actions github-actions bot closed this Jun 24, 2021
@paperchalice paperchalice deleted the gnat branch June 26, 2021 10:10
@github-actions github-actions bot added the outdated PR was locked due to age label Jul 27, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge-skip `brew pr-automerge` will skip this pull request new formula PR adds a new formula to Homebrew/homebrew-core outdated PR was locked due to age stale No recent activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants