forked from ocaml-cross/opam-cross-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update configure patch to be more finer-grained when deciding to link
against gcc_egh. Fixes: ocaml-cross#313
- Loading branch information
Showing
2 changed files
with
34 additions
and
36 deletions.
There are no files selected for viewing
68 changes: 33 additions & 35 deletions
68
packages/ocaml-windows64/ocaml-windows64.5.1.1/files/patches/configure.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,43 @@ | ||
--- ocaml-5.1.1/configure.orig 2024-02-25 18:21:29.787786010 +0000 | ||
+++ ocaml-5.1.1/configure 2024-02-25 18:21:31.795786011 +0000 | ||
@@ -13947,6 +13947,14 @@ | ||
--- a/configure.orig 2024-02-27 21:22:55.384420013 +0000 | ||
+++ a/configure 2024-02-27 21:19:10.686935006 +0000 | ||
@@ -14274,17 +14274,9 @@ | ||
|
||
|
||
|
||
+ flexlink_where_cmd_prefix='' | ||
+ case $build in #( | ||
+ *-w64-mingw32*|*-pc-windows) : | ||
+ flexlink_where_cmd_prefix="cmd /c" ;; #( | ||
+ *) : | ||
+ ;; | ||
+esac | ||
+ | ||
if test -n "$flexlink" && test -z "$flexdir" | ||
- flexlink_exec_cmd='' | ||
- case $build in #( | ||
- *-w64-mingw32*|*-pc-windows) : | ||
- flexlink_exec_cmd=cmd /c ;; #( | ||
- *) : | ||
- ;; | ||
-esac | ||
- | ||
case $host in #( | ||
*-w64-mingw32*|*-pc-windows) : | ||
- flexlink_where="$($flexlink_exec_cmd "$flexlink" -where 2>/dev/null)" | ||
+ flexlink_where="$(cmd /c "$flexlink" -where 2>/dev/null)" | ||
if test -z "$flexlink_where" | ||
then : | ||
as_fn_error $? "$flexlink is not executable from a native Win32 process" "$LINENO" 5 | ||
opam@7bc71e662445:/tmp/ocaml$ diff -urN configure configure.new | ||
--- configure 2024-02-27 21:22:55.384420013 +0000 | ||
+++ configure.new 2024-02-27 21:19:10.686935006 +0000 | ||
@@ -14274,17 +14274,9 @@ | ||
|
||
@@ -14024,7 +14032,7 @@ | ||
|
||
|
||
- flexlink_exec_cmd='' | ||
- case $build in #( | ||
- *-w64-mingw32*|*-pc-windows) : | ||
- flexlink_exec_cmd=cmd /c ;; #( | ||
- *) : | ||
- ;; | ||
-esac | ||
- | ||
case $host in #( | ||
*-w64-mingw32*|*-pc-windows) : | ||
- flexlink_where="$(cmd /c "$flexlink" -where 2>/dev/null)" | ||
+ flexlink_where="$($flexlink_where_cmd_prefix "$flexlink" -where 2>/dev/null)" | ||
if test -z "$flexlink_where" | ||
- flexlink_where="$($flexlink_exec_cmd "$flexlink" -where 2>/dev/null)" | ||
+ flexlink_where="$(cmd /c "$flexlink" -where 2>/dev/null)" | ||
if test -z "$flexlink_where" | ||
then : | ||
as_fn_error $? "$flexlink is not executable from a native Win32 process" "$LINENO" 5 | ||
@@ -18358,9 +18366,17 @@ | ||
|
||
## Determine how to link with the POSIX threads library | ||
|
||
+extra_mingw_pthread_lib='' | ||
+case $build in #( | ||
+ *-*-mingw32*) : | ||
+ extra_mingw_pthread_lib="-lgcc_eh" ;; #( | ||
+ *) : | ||
+ ;; | ||
+esac | ||
+ | ||
case $host in #( | ||
*-*-mingw32*) : | ||
- PTHREAD_LIBS="-l:libpthread.a -lgcc_eh" ;; #( | ||
+ PTHREAD_LIBS="-l:libpthread.a $extra_mingw_pthread_lib" ;; #( | ||
*-pc-windows) : | ||
PTHREAD_LIBS="-l:libpthread.lib" ;; #( | ||
*) : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters