Bug 65867 - [5 Regression] bootstrap fails for mingw32 due to missing header in ssp.c
Summary: [5 Regression] bootstrap fails for mingw32 due to missing header in ssp.c
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 5.1.0
: P2 trivial
Target Milestone: 6.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2015-04-23 19:12 UTC by Daniel Starke
Modified: 2017-10-10 14:56 UTC (History)
4 users (show)

See Also:
Host: mingw32
Target: mingw32
Build: mingw32
Known to work: 4.9.2
Known to fail: 5.1.0
Last reconfirmed: 2015-04-25 00:00:00


Attachments
patch (234 bytes, patch)
2015-04-23 19:12 UTC, Daniel Starke
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Starke 2015-04-23 19:12:58 UTC
Created attachment 35392 [details]
patch

Bootstrapping gcc 5.1 with ming32 (not mingw32-w64) fails due to missing include of wincrypt.h within ssp.c. See attachment for a possible patch.
Comment 1 Jakub Jelinek 2015-04-24 09:24:31 UTC
Supposedly started with r220559.
Comment 2 Kai Tietz 2015-04-25 07:08:27 UTC
Well, that this include is required seems to me like a bug in mingw.org, as wincrypt.h should be auto-included by windows.h.  Nevertheless this is a trivial patch, so it is ok.  Please post it to ML, and I will take care to apply.

Thanks
Comment 3 Richard Biener 2015-06-30 10:29:18 UTC
So...?  Would be nice to fix for 5.2.
Comment 4 Daniel Starke 2015-07-01 15:08:44 UTC
I have already sent a patch to the ML.
https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01539.html
Comment 5 Richard Biener 2015-07-16 09:13:25 UTC
GCC 5.2 is being released, adjusting target milestone to 5.3.
Comment 6 Richard Biener 2015-12-04 10:46:39 UTC
GCC 5.3 is being released, adjusting target milestone.
Comment 7 Jakub Jelinek 2015-12-21 15:34:30 UTC
Kai or DJ, is the patch ok for trunk/gcc 5?
Is that header always available if
#if defined (_WIN32) && !defined (__CYGWIN__)
or should it be guarded say by
#ifdef HAVE_WINCRYPT_H
and wincrypt.h added to AC_CHECK_HEADERS in configure?
The ChangeLog entry is wrong, libssp/ prefix shouldn't be there and on the other side this PR should be mentioned there, but that is something that can be trivially changed by the committer.
I can commit it if anybody from the GCC maintainers that know something about Windows acks it.
Comment 8 Jeffrey A. Law 2016-02-09 19:17:02 UTC
Author: law
Date: Tue Feb  9 19:16:30 2016
New Revision: 233253

URL: https://gcc.gnu.org/viewcvs?rev=233253&root=gcc&view=rev
Log:
2015-04-25  Daniel Starke  <daniel.f.starke@freenet.de>

	PR target/65867
	* ssp.c: Added wincrypt.h include for Windows targets.

Modified:
    trunk/libssp/ChangeLog
    trunk/libssp/ssp.c
Comment 9 Richard Biener 2016-06-03 10:06:24 UTC
GCC 5.4 is being released, adjusting target milestone.
Comment 10 Jakub Jelinek 2017-10-10 13:44:42 UTC
GCC 5 branch has been closed, should be fixed in GCC 6 and later.