Skip to content

Make Git for Windows compile with GCC 8.x #2149

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

Merged
merged 3 commits into from
Apr 5, 2019

Conversation

dscho
Copy link
Member

@dscho dscho commented Apr 3, 2019

Just a couple of things on top of what upstream already fixed for GCC 8.x.

dscho added 3 commits April 3, 2019 12:17
The return type of the `GetProcAddress()` function is `FARPROC` which
evaluates to `long long int (*)()`, i.e. it cannot be cast to the
correct function signature by GCC 8.

To work around that, we first cast to `void *` and go on with our merry
lives.

Signed-off-by: Johannes Schindelin <[email protected]>
The kwset functionality makes use of the obstack code, which expects to
be handed a function that can allocate large chunks of data. It expects
that function to accept a `size` parameter of type `long`.

This upsets GCC 8 on Windows, because `long` does not have the same
bit size as `size_t` there.

Now, the proper thing to do would be to switch to `size_t`. But this
would make us deviate from the "upstream" code even further, making it
hard to synchronize with newer versions, and also it would be quite
involved because that `long` type is so invasive in that code.

Let's punt, and instead provide a super small wrapper around
`xmalloc()`.

Signed-off-by: Johannes Schindelin <[email protected]>
This is needed to make things compile with GCC 8.x and later.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member Author

dscho commented Apr 3, 2019

@szeder could you have a quick look over these changes?

@szeder
Copy link

szeder commented Apr 4, 2019 via email

@dscho
Copy link
Member Author

dscho commented Apr 5, 2019

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dscho dscho merged commit 61224e4 into git-for-windows:master Apr 5, 2019
@dscho dscho deleted the gcc-8-gfw branch April 5, 2019 18:26
git-for-windows-ci pushed a commit that referenced this pull request Apr 5, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Apr 5, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Apr 5, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Apr 11, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Apr 11, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Apr 11, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jun 7, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jun 7, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request Jun 8, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jun 8, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request Jun 8, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request Jun 8, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request Jun 8, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jun 10, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jun 11, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jun 12, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jun 13, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jun 18, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request Jun 18, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request Jun 19, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request Jun 21, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jun 21, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jun 21, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jun 27, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jul 8, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jul 8, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jul 11, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit to git-for-windows/git-sdk-32 that referenced this pull request Jul 15, 2019
The issues with GCC have been resolved:

- The bug in GCC v8.x was fixed that prevented
  `-fstack-protector-strong` to produce valid code:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86832

- The issues were resolved in Git for Windows' source code that
  triggered build warnings with GCC v8.x (warnings that cause build
  failures with `DEVELOPER=1`):

  git-for-windows/git#2149

- The issue preventing Git for Windows to be compiled with GCC v9.x
  under `DEVELOPER=1` was resolved:

  git-for-windows/git#2258

- The issues preventing Git's `master` to be compiled with GCC v9.x
  (rolling up the fixes for GCC v8.x) were resolved:

  gitgitgadget/git#265

The issue with osslsigncode no longer signing the code after the upgrade
to OpenSSL v1.1.1, but pretending to succeed, has been fixed some time
recently through a rebuild of mingw-w64-osslsigncode.

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git-sdk-64 that referenced this pull request Jul 15, 2019
The issues with GCC have been resolved:

- The bug in GCC v8.x was fixed that prevented
  `-fstack-protector-strong` to produce valid code:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86832

- The issues were resolved in Git for Windows' source code that
  triggered build warnings with GCC v8.x (warnings that cause build
  failures with `DEVELOPER=1`):

  git-for-windows/git#2149

- The issue preventing Git for Windows to be compiled with GCC v9.x
  under `DEVELOPER=1` was resolved:

  git-for-windows/git#2258

- The issues preventing Git's `master` to be compiled with GCC v9.x
  (rolling up the fixes for GCC v8.x) were resolved:

  gitgitgadget/git#265

Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci pushed a commit that referenced this pull request Jul 23, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Jul 25, 2019
Make Git for Windows compile with GCC 8.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants