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

[Win32] Fix win32/GNUmakefile to accommodate gcc-13 #21038

Closed
sisyphus opened this issue Apr 19, 2023 · 0 comments · Fixed by #21666
Closed

[Win32] Fix win32/GNUmakefile to accommodate gcc-13 #21038

sisyphus opened this issue Apr 19, 2023 · 0 comments · Fixed by #21666

Comments

@sisyphus
Copy link
Contributor

sisyphus commented Apr 19, 2023

Description

Of course, gcc-13 has not yet been released. I'm just trying to stay one step ahead. (Sick to death of playing catchup ;-)

The mingw-w64 ports of gcc-13 will be built with MCF threads enabled.
CORRECTION: Not all mingw-w64 ports of gcc-13 are built with MCF threads enabled - https://winlibs.com is currently providing the option of MCF or POSIX threads. The single line insertion in the below patch caters for the MCF builds, while not interfering with the POSIX builds.

This is no big deal, but it means that perls built using these compilers will need to find libmfcgthread-1.dll at runtime.
This is only an issue when running in taint mode - as happens during the running of perl's test suite.
This simple patch to the win32/GNUmakefile allows the test suite to pass - even when libmcfgthread-1.dll is a runtime dependency:

$ diff -u GNUmakefile_orig GNUmakefile
--- GNUmakefile_orig    2023-04-19 23:31:52.394439300 +1000
+++ GNUmakefile 2023-04-19 23:32:31.041501800 +1000
@@ -1829,6 +1829,7 @@
        if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL)
        if exist $(CCDLLDIR)\libwinpthread-1.dll $(XCOPY) $(CCDLLDIR)\libwinpthread-1.dll ..\t\$(NULL)
        if exist $(CCDLLDIR)\libquadmath-0.dll $(XCOPY) $(CCDLLDIR)\libquadmath-0.dll ..\t\$(NULL)
+       if exist $(CCDLLDIR)\libmcfgthread-1.dll $(XCOPY) $(CCDLLDIR)\libmcfgthread-1.dll ..\t\$(NULL)

 endif

NOTE: The white space at the beginning of each of those lines is a tab, not a series of single spaces.

On perls built with gcc-12 or earlier this new addition to the GNUmakefile does nothing.
But without the new addition, perls built with MCF-enabled gcc-13 will not only register test failures for any tests run in taint mode, but will produce a large number of annoying pop-ups (complaining that libmcfgthread-1.dll cannot be found) that need to be individually acknowledged before the tests can continue on.

This change to the win32/GNUmakefile could be applied at any time, without fear of causing breakage - except that it might be necessary to also rewrite any test scripts that don't cater for alterations being made to the win32/GNUmakefile (like, perhaps, porting/manifest.t.)

Cheers,
Rob

sisyphus pushed a commit to sisyphus/perl5 that referenced this issue Nov 24, 2023
Avoids test failures when gcc is configured to use MCF threads.
See Issue Perl#21038
khwilliamson pushed a commit that referenced this issue Nov 28, 2023
Avoids test failures when gcc is configured to use MCF threads.
See Issue #21038
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants