--- ./support/shobj-conf_orig	2023-03-08 00:15:10.499077237 +0000
+++ ./support/shobj-conf	2023-03-08 00:16:44.878829862 +0000
@@ -245,7 +245,7 @@
 	SHOBJ_LDFLAGS='-Wl,-bdynamic -Wl,-bnoentry'
 	SHOBJ_XLDFLAGS='-G'
 
-	SHLIB_XLDFLAGS='-bM:SRE'
+	SHLIB_XLDFLAGS='-Wl,-bM:SRE'
 	SHLIB_LIBS='-lcurses -lc'
 	SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
 	;;
--- ./shlib/Makefile.in_orig	2023-03-08 07:50:37.419678094 +0000
+++ ./shlib/Makefile.in	2023-03-08 07:51:00.101707373 +0000
@@ -184,7 +184,7 @@
 $(SHARED_HISTORY):	$(SHARED_HISTOBJ) xmalloc.so xfree.so
 	$(HISTORY_EXP_FILE)
 	$(RM) $@
-	$(SHOBJ_LD) ${SHOBJ_LDFLAGS} -bE:history.exp ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so xfree.so $(SHLIB_LIBS)
+	$(SHOBJ_LD) ${SHOBJ_LDFLAGS} -Wl,-bE:history.exp ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so xfree.so $(SHLIB_LIBS)
 
 # Since tilde.c is shared between readline and bash, make sure we compile 
 # it with the right flags when it's built as part of readline
