diff options
author | Ruud van der Pas <ruud.vanderpas@oracle.com> | 2022-07-22 06:32:51 -0700 |
---|---|---|
committer | Vladimir Mezentsev <vladimir.mezentsev@oracle.com> | 2022-07-25 15:05:49 -0700 |
commit | 872ae1027e3a4d344333acf7507a32874444e3b0 (patch) | |
tree | 1c64c3bd1bb33306c8bc88092cdb0528967c47c6 /gprofng/gp-display-html | |
parent | 24d2cbc42ccf08dba79394635db3be084eed9062 (diff) | |
download | binutils-872ae1027e3a4d344333acf7507a32874444e3b0.zip binutils-872ae1027e3a4d344333acf7507a32874444e3b0.tar.gz binutils-872ae1027e3a4d344333acf7507a32874444e3b0.tar.bz2 |
gprofng: fix bug 29351 - Move dynamic loading of modules to a later stage
gprofng/Changelog:
2022-07-22 Ruud van der Pas <ruud.vanderpas@oracle.com>
PR gprofng/29351
* gp-display-html/gp-display-html.in: the dynamic loading of
modules occurred too early, resulting in the generation of the
man page to fail in case a module is missing; the loading part is
now done somewhat later in the execution to avoid this problem.
Diffstat (limited to 'gprofng/gp-display-html')
-rw-r--r-- | gprofng/gp-display-html/gp-display-html.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gprofng/gp-display-html/gp-display-html.in b/gprofng/gp-display-html/gp-display-html.in index 54a87d7..9b207b9 100644 --- a/gprofng/gp-display-html/gp-display-html.in +++ b/gprofng/gp-display-html/gp-display-html.in @@ -8852,6 +8852,8 @@ sub handle_module_availability { my $subr_name = get_my_name (); + gp_message ("verbose", $subr_name, "Handling module requirements"); + #------------------------------------------------------------------------------ # This is clunky at best, but there is a chicken egg problem here. For the # man page to be generated, the --help and --version options need to work, @@ -8868,7 +8870,9 @@ sub handle_module_availability "List::Util", "Cwd", "File::Basename", + "File::stat", "POSIX", + "bigint", "bignum"); my @missing_modules = (); @@ -8895,12 +8899,17 @@ sub handle_module_availability { $cmd = $m . "->import ( qw (min max))"; } + elsif ($m eq "bigint") + { + $cmd = $m . "->import ( qw (hex))"; + } else { $cmd = $m . "->import"; } $cmd .= ";"; $result = eval ("$cmd"); + gp_message ("debugM", $subr_name, "cmd = $cmd"); } else { |