git: 82a2ee4733f0 - main - lang/libhx: fix build with lld 17

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sat, 25 Nov 2023 18:45:41 UTC
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/ports/commit/?id=82a2ee4733f06470946894f5e38329274a29057d

commit 82a2ee4733f06470946894f5e38329274a29057d
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-11-25 17:59:54 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-11-25 18:43:29 +0000

    lang/libhx: fix build with lld 17
    
    Building lang/libhx with lld 17 results in the following link errors:
    
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_basename' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_basename_exact' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_chomp' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_copy_dir' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_copy_file' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_dirname' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_dlclose' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_dlerror' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_dlopen' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_dlsym' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_drand' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_exit' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_ffs' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_fls' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_getl' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_getopt' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_getopt_help' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_getopt_help_cb' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_getopt_usage' failed: symbol not defined
      ld: error: version script assignment of 'LIBHX_3.25' to symbol 'HX_getopt_usage_cb' failed: symbol not defined
    
    Since the linker version script is also used for a "rtcheck" library
    which does not implement any of the symbols, suppress errors with lld >=
    17 due to these undefined symbols.
    
    PR:             273753
    MFH:            2023Q4
---
 lang/libhx/files/patch-src_Makefile.in | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lang/libhx/files/patch-src_Makefile.in b/lang/libhx/files/patch-src_Makefile.in
new file mode 100644
index 000000000000..4df051ad5886
--- /dev/null
+++ b/lang/libhx/files/patch-src_Makefile.in
@@ -0,0 +1,11 @@
+--- src/Makefile.in.orig	2023-11-02 08:30:27 UTC
++++ src/Makefile.in
+@@ -94,7 +94,7 @@ host_triplet = @host@
+ @WITH_GNU_LD_TRUE@am__append_2 = -Wl,--version-script=${srcdir}/libHX.map
+ @MINGW32_TRUE@am__append_3 = ux-file.c ux-mmap.c
+ @MINGW32_TRUE@am__append_4 = -lws2_32
+-@WITH_GNU_LD_TRUE@am__append_5 = -Wl,--version-script=${srcdir}/libHX.map
++@WITH_GNU_LD_TRUE@am__append_5 = -Wl,--version-script=${srcdir}/libHX.map -Wl,--undefined-version
+ check_PROGRAMS = tc-compile$(EXEEXT) tc-cast$(EXEEXT) \
+ 	tc-deque$(EXEEXT) tc-dir$(EXEEXT) tc-format$(EXEEXT) \
+ 	tc-io$(EXEEXT) tc-list$(EXEEXT) tc-list2$(EXEEXT) \