]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
windows-makefile: Don't prefix libdir when it is absolute path
authorNorbert Pocs <norbertp@openssl.org>
Thu, 8 Jan 2026 15:11:10 +0000 (16:11 +0100)
committerNorbert Pocs <norbertp@openssl.org>
Mon, 12 Jan 2026 10:43:43 +0000 (11:43 +0100)
When --libdir was passed to configuration as an absolute path then
the makefile MODULESDIR_dir became concat(prefix, libdir) creating
an invalid path.

Fixes: https://github.com/openssl/project/issues/1797
Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29579)

Configurations/windows-makefile.tmpl

index 408b571d66e34a18a6edba8ab961b02ff85dc8fb..e9f985f8551649de3f9262fcc8120d4e9e112da8 100644 (file)
@@ -208,7 +208,7 @@ OPENSSLDIR_dir={- canonpath($openssldir_dir) -}
 LIBDIR={- our $libdir = $config{libdir} || "lib";
           file_name_is_absolute($libdir) ? "" : $libdir -}
 MODULESDIR_dev={- use File::Spec::Functions qw(:DEFAULT splitpath catpath);
-                  our $modulesprefix = catdir($prefix,$libdir);
+                  our $modulesprefix = file_name_is_absolute($libdir) ? $libdir : catdir($prefix,$libdir);
                   our ($modulesprefix_dev, $modulesprefix_dir,
                        $modulesprefix_file) =
                       splitpath($modulesprefix, 1);