Skip to content

Commit

Permalink
Clean up the patches that fixed up ldflags for stdlib modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-Sommerfeld committed Feb 6, 2024
1 parent 1dca4e4 commit c41b120
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 130 deletions.
3 changes: 0 additions & 3 deletions components/python/python-312/TODO
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,10 @@ Look through omnios 3.11 python patches:

- mod-posix-sched-priority.patch


debugger support: see the ustack.patch from omnios:

https://github.com/omniosorg/omnios-build/commit/5aa7971dd8a7360d6d4f5357a4f9ff510c1b93cf#diff-49692a87e8445fd7943cb3b8fb0a696e062f39c74df2f567442e896dba02bdaf



patches not needed:

09-ossaudiodev.patch: Not needed; upstream wraps all the exports in #ifdef so the missing ioctls are ok.
Expand Down
65 changes: 0 additions & 65 deletions components/python/python-312/patches-todo/01-setup.patch

This file was deleted.

21 changes: 0 additions & 21 deletions components/python/python-312/patches/00-include-ncurses.patch

This file was deleted.

30 changes: 0 additions & 30 deletions components/python/python-312/patches/00-socket-test-2.patch

This file was deleted.

11 changes: 0 additions & 11 deletions components/python/python-312/patches/00-socket-test.patch

This file was deleted.

54 changes: 54 additions & 0 deletions components/python/python-312/patches/01-stdlib_ldflags.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Add /usr/gnu/lib/amd64 to the library search path when looking for
-lpanelw and when linking _curses_panel; it also needs to appear in
the module's library runpath

The nis module always needs -lnsl; the sockets module needs -lresolv for h_errno.

Readline needs -Wl,-zrecord to "avoid rl_insert() elimination"

--- Python-3.12.1/configure.ac.~1~ Thu Dec 7 12:45:44 2023
+++ Python-3.12.1/configure.ac Tue Feb 6 11:14:01 2024
@@ -3988,7 +3988,7 @@
["none required"], [libnsl=""],
[libnsl="$ac_cv_search_yp_match"]
)
- LIBNSL_LIBS=${LIBNSL_LIBS-$libnsl}
+ LIBNSL_LIBS=-lnsl
])

AS_VAR_IF([have_nis], [yes], [
@@ -6102,7 +6102,7 @@
AC_CHECK_LIB([readline], [readline], [
LIBREADLINE=readline
READLINE_CFLAGS=${LIBREADLINE_CFLAGS-""}
- READLINE_LIBS=${LIBREADLINE_LIBS-"-lreadline"}
+ READLINE_LIBS=${LIBREADLINE_LIBS-"-Wl,-zrecord -lreadline -lncurses"}
], [with_readline=no])
], [with_readline=no])
])
@@ -6470,6 +6470,7 @@
have_panel=panelw
], [
WITH_SAVE_ENV([
+ AS_VAR_APPEND([LDFLAGS], [" -L/usr/gnu/lib/amd64"])
AC_CHECK_LIB([panelw], [update_panels], [
have_panel=panelw
PANEL_CFLAGS=${PANEL_CFLAGS-""}
@@ -7395,7 +7396,7 @@
PY_STDLIB_MOD([_socket],
[], m4_flatten([test "$ac_cv_header_sys_socket_h" = "yes"
-a "$ac_cv_header_sys_types_h" = "yes"
- -a "$ac_cv_header_netinet_in_h" = "yes"]))
+ -a "$ac_cv_header_netinet_in_h" = "yes"]), [], [-lresolv -lnsl])

dnl platform specific extensions
PY_STDLIB_MOD([grp], [], [test "$ac_cv_func_getgrgid" = yes -o "$ac_cv_func_getgrgid_r" = yes])
@@ -7453,7 +7454,7 @@
)
PY_STDLIB_MOD([_curses_panel],
[], [test "$have_panel" != "no"],
- [$PANEL_CFLAGS $CURSES_CFLAGS], [$PANEL_LIBS $CURSES_LIBS]
+ [$PANEL_CFLAGS $CURSES_CFLAGS], [-L/usr/gnu/lib/amd64 -Wl,-R/usr/gnu/lib/amd64 $PANEL_LIBS $CURSES_LIBS]
)
PY_STDLIB_MOD([_decimal], [], [], [$LIBMPDEC_CFLAGS], [$LIBMPDEC_LDFLAGS])
PY_STDLIB_MOD([_dbm],

0 comments on commit c41b120

Please sign in to comment.