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

Fix build with GCC v14.1 #4962

Merged

Conversation

dscho
Copy link
Member

@dscho dscho commented May 21, 2024

The GCC v14.1 upgrade broke the build of git-artifacts. Partially, this has been fixed upstream already, but the i686 build requires a separate fix.

This addresses #4953.

gitster and others added 3 commits May 13, 2024 10:19
Windows compiler suddenly started complaining that calloc(3) takes
its arguments in <nmemb, size> order.  Indeed, there are many calls
that has their arguments in a _wrong_ order.

Fix them all.

A sample breakage can be seen at

  https://github.com/git/git/actions/runs/9046793153/job/24857988702#step:4:272

Signed-off-by: Junio C Hamano <gitster@pobox.com>
* jc/compat-regex-calloc-fix:
  compat/regex: fix argument order to calloc(3)

This is a backport of 077c4e1 (Merge branch
'jc/compat-regex-calloc-fix' into next, 2024-05-13) to fix compile
errors in Git for Windows' SDK since GCC was upgraded to v14.1.
The `__MINGW64__` constant is defined, surprise, surprise, only when
building for a 64-bit CPU architecture.

Therefore using it as a guard to define `_POSIX_C_SOURCE` (so that
`localtime_r()` is declared, among other functions) is not enough, we
also need to check `__MINGW32__`.

Technically, the latter constant is defined even for 64-bit builds. But
let's make things a bit easier to understand by testing for both
constants.

Making it so fixes this compile warning (turned error in GCC v14.1):

  archive-zip.c: In function 'dos_time':
  archive-zip.c:612:9: error: implicit declaration of function 'localtime_r';
  did you mean 'localtime_s'? [-Wimplicit-function-declaration]
    612 |         localtime_r(&time, &tm);
        |         ^~~~~~~~~~~
        |         localtime_s

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho self-assigned this May 21, 2024
@dscho dscho merged commit f3b93ac into git-for-windows:main May 22, 2024
44 checks passed
@dscho dscho deleted the fix-upstream-git-build-with-gcc-v14.1-gfw branch May 22, 2024 06:38
@dscho dscho added this to the Next release milestone May 22, 2024
dscho added a commit that referenced this pull request May 27, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
dscho added a commit that referenced this pull request May 27, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
dscho added a commit that referenced this pull request May 27, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request May 28, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request May 28, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
dscho added a commit to dscho/git that referenced this pull request Jun 3, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses git-for-windows#4953.
dscho added a commit that referenced this pull request Jun 3, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
dscho added a commit that referenced this pull request Jun 3, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jun 3, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jun 3, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jun 4, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jun 4, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jun 4, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jun 4, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jun 4, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jun 5, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jun 5, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jun 6, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jun 6, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jun 6, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jun 6, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jun 6, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
dscho added a commit that referenced this pull request Jun 6, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 2, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 2, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 2, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 2, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 2, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 2, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
dscho added a commit that referenced this pull request Jul 2, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
dscho added a commit that referenced this pull request Jul 2, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
dscho added a commit that referenced this pull request Jul 2, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 3, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 3, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 4, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 4, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 4, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 4, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 9, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 9, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 10, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 10, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 10, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 10, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 10, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
dscho added a commit that referenced this pull request Jul 10, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 10, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 11, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
dscho added a commit that referenced this pull request Jul 11, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 11, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 11, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 12, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
git-for-windows-ci pushed a commit that referenced this pull request Jul 12, 2024
The GCC v14.1 upgrade broke the build of `git-artifacts`. Partially,
this has been fixed upstream already, but the i686 build requires a
separate fix.

This addresses #4953.
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