forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]>
@szeder could you have a quick look over these changes? |
It seems upstream obstack code has been using size_t since 266ac1b98
(obstack: 64-bit obstack support, part 1, 2014-10-29) [1], so
switching to size_t in our copy would actually bring it closer to
upstream :)
Considering the alternatives, namely:
- switching from long to size_t in our copy, or
- re-importing from upstream and applying our necessary
modifications on top [2], thereby risking messing up the conflict
resolutions and/or requiring further modifications to kwset,
I think that your small wrapper function is a simple and reasonable
solution.
[1] http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=266ac1b98dbf76a78cdc584b10ed73355a084e7a
[2] I tried to 'cp -v ../tmp/gnulib/lib/obstack.{c,h} compat/ &&
make', and got about two screenful errors...
I think only 3254310 (obstack.c: Fix some sparse warnings,
2011-09-11) and d190a08 (obstack: Fix portability issues,
2011-08-28) are necessary, as in the meantime upstream had fixed
what our other changes did.
|
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just a couple of things on top of what upstream already fixed for GCC 8.x.