Skip to content

Commit

Permalink
Patch perl using PR19912
Browse files Browse the repository at this point in the history
This gets PDL to build.

Fixes #93

Also update the libgd version so it passes tests.
  • Loading branch information
shawnlaffan committed May 23, 2023
1 parent c3a2000 commit 895f00a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions share/64bit-5.36.1.1.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
'libmysql' => '<package_url>/kmx/64_libs/gcc71-2017Q2/64bit_mysql-5.7.16-bin_20170517.zip',
# gcc10 libs - not all are needed
extlibs_gcc13_collated => 'https://github.com/StrawberryPerl/build-extlibs/releases/download/dev_gcc13.1_20230502/extlibs_gcc13_collated_20230502.zip',
libgd => 'https://github.com/StrawberryPerl/build-extlibs/releases/download/dev_gcc13.1_20230502/64bit_libgd-2.3.2-bin_20230502.zip',
zdb_gcc83 => '<package_url>/kmx/64_libs/gcc83-2019Q2/64bit_db-6.2.38-bin_20190522.zip',

},
Expand Down Expand Up @@ -58,6 +59,7 @@
'<dist_sharedir>/perl-5.36/rt142390.patch' => '*',
'<dist_sharedir>/perl-5.36/perl_pr20008.diff' => '*',
'<dist_sharedir>/perl-5.36/perl_pr20136.patch' => '*',
'<dist_sharedir>/perl-5.36/perl_pr19912_commit1.patch' => '*',
#'<dist_sharedir>/perl-5.36/GNUmakefile' => 'win32/GNUmakefile',
'config_H.gc' => {
I_DBM => 'define',
Expand Down
37 changes: 37 additions & 0 deletions share/perl-5.36/perl_pr19912_commit1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
diff -wu a/win32/vmem.h b/win32/vmem.h
--- a/win32/vmem.h 2022-06-21 03:57:59.000000000 +1000
+++ b/win32/vmem.h 2022-07-21 02:30:13.000000000 +1000
@@ -69,14 +69,32 @@

#ifdef _USE_LINKED_LIST
class VMem;
+
+/*
+ * Address an alignment issue with x64 mingw-w64 ports of gcc-12 and
+ * (presumably) later. We do the same thing again 16 lines further down.
+ * See https://github.com/Perl/perl5/issues/19824
+ */
+
+#if defined(__MINGW64__) && __GNUC__ > 11
+typedef struct _MemoryBlockHeader* PMEMORY_BLOCK_HEADER __attribute__ ((aligned(16)));
+#else
typedef struct _MemoryBlockHeader* PMEMORY_BLOCK_HEADER;
+#endif
+
typedef struct _MemoryBlockHeader {
PMEMORY_BLOCK_HEADER pNext;
PMEMORY_BLOCK_HEADER pPrev;
VMem *owner;
+
+#if defined(__MINGW64__) && __GNUC__ > 11
+} MEMORY_BLOCK_HEADER __attribute__ ((aligned(16))), *PMEMORY_BLOCK_HEADER;
+#else
} MEMORY_BLOCK_HEADER, *PMEMORY_BLOCK_HEADER;
#endif

+#endif
+
class VMem
{
public:

0 comments on commit 895f00a

Please sign in to comment.