On Sun, Jul 31, 2022, 4:48 AM Po Lu <luangruo@yahoo.com> wrote:
Eli Zaretskii <eliz@gnu.org> writes:
Maybe this would work? (This question is also partly intended for Lynn)

diff --git a/lisp/loadup.el b/lisp/loadup.el
index 21a87dbd77..e81eccb58e 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -387,7 +387,8 @@
 ;; you may load them with a "site-load.el" file.
 ;; But you must also cause them to be scanned when the DOC file
 ;; is generated.
-(let ((lp load-path))
+(let ((lp load-path)
+      (purify-flag nil))
   (load "site-load" t)
   ;; We reset load-path after dumping.
   ;; For a permanent change in load-path, use configure's

When I tried switching the purify-flag on and off selectively in site-load itself resulted in pdumper never completing.
It was easier to just add a variable dedicated solely to turning the hack off that has no other dependencies.  Keep in mind I'm only worried about 28.x for this exercise.  

Lynn