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
[PATCH] remove all exported symbols from GCC win32 miniperl #16466
Comments
From @bulk88Created by @bulk88See attached patch. my attempts at speeding up the GCC build. Perl Info
|
From @bulk880001-remove-all-exported-symbols-from-GCC-win32-miniperl.patchFrom 6cdb8b0a36c7afe87a4db5607d18fc2f526c5800 Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Wed, 14 Mar 2018 20:11:51 -0400
Subject: [PATCH] remove all exported symbols from GCC win32 miniperl
Similar to commit a19baa613 and same reasoning. Makes binary smaller/more
chances for optimization but mingw linker is still much less smart than
the VC linker.
Remaining problems are that GCC miniperl.exe still links to WS2_32.dll
(winsock library) yet the win32_* socket functions have nothing calling
them.
GCC 4.9.2 i686-w64-mingw32
miniperl.exe 1660KB before this no exports commit
miniperl.exe 1584KB after this no exports commit
---
EXTERN.h | 2 +-
INTERN.h | 3 ++-
win32/win32.h | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/EXTERN.h b/EXTERN.h
index b8c4512..558f762 100644
--- a/EXTERN.h
+++ b/EXTERN.h
@@ -21,7 +21,7 @@
# if (defined(WIN32) || defined(__SYMBIAN32__)) && !defined(PERL_STATIC_SYMS)
/* miniperl should not export anything */
-# if defined(PERL_IS_MINIPERL) && !defined(UNDER_CE) && defined(_MSC_VER)
+# if defined(PERL_IS_MINIPERL) && !defined(UNDER_CE)
# define EXT extern
# define dEXT
# define EXTCONST extern const
diff --git a/INTERN.h b/INTERN.h
index eaaf6b2..35bb4ee 100644
--- a/INTERN.h
+++ b/INTERN.h
@@ -19,7 +19,8 @@
#undef EXTCONST
#undef dEXTCONST
-# if (defined(WIN32) && defined(__MINGW32__)) || defined(__SYMBIAN32__)
+# if (defined(WIN32) && defined(__MINGW32__) && ! defined(PERL_IS_MINIPERL)) \
+ || defined(__SYMBIAN32__)
# ifdef __cplusplus
# define EXT __declspec(dllexport)
# define dEXT
diff --git a/win32/win32.h b/win32/win32.h
index cdfadfe..be75665 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -85,7 +85,7 @@
/* now even GCC supports __declspec() */
/* miniperl has no reason to export anything */
-#if defined(PERL_IS_MINIPERL) && !defined(UNDER_CE) && defined(_MSC_VER)
+#if defined(PERL_IS_MINIPERL) && !defined(UNDER_CE)
# define DllExport
#else
# if defined(PERLDLL)
--
1.7.9.msysgit.0
|
From @bulk88On Wed, 14 Mar 2018 19:20:54 -0700, bulk88 wrote:
Bump. |
From @steve-m-hayThanks for the patch. Now in blead - commit 1b80876. |
The RT System itself - Status changed from 'new' to 'open' |
@steve-m-hay - Status changed from 'open' to 'pending release' |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release today of Perl 5.30.0, this and 160 other issues have been Perl 5.30.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#132982 (status was 'resolved')
Searchable as RT132982$
The text was updated successfully, but these errors were encountered: