diff options
author | Richard Levitte <levitte@openssl.org> | 2022-11-03 15:24:52 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2022-11-04 10:11:11 +0100 |
commit | 6f6d7eeda1d62affc379b0b91c851d1a17f149d1 (patch) | |
tree | 2ea402e87ecd82a87b14b34875c566d5913d3551 /Configurations/platform | |
parent | ec33ed712665ca65cabcd87d446e5db79a64379e (diff) |
Configurations/*.tmpl: overhaul assembler make rules.
NOTE: Not Configurations/unix-Makefile.tmpl, as that was done 4 years
ago, in commit a23f03166e0ec49ac09b3671e7ab4ba4fa57d42a.
So far assembly modules were intended to be built as .pl->.S->.{asmext}
followed by .{asmext}->.o. This posed a problem in build_all_generated
rule if it was executed on another computer, and also turned out to be
buggy, as .S was also translated to .{asmext} on Windows and VMS.
Both issues are fixed by changing the rule sequence to .pl->.S and then
.S->.s->.o, with the added benefit that the Windows and VMS build file
templates are more in sync with unix-Makefile.tmpl and slightly simpler.
Fixes #19594
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19598)
(cherry picked from commit b8d3cf0954737a9665e3b2bff25bc689a5114010)
Diffstat (limited to 'Configurations/platform')
-rw-r--r-- | Configurations/platform/BASE.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Configurations/platform/BASE.pm b/Configurations/platform/BASE.pm index 1ab4bf18e9..95c2211d83 100644 --- a/Configurations/platform/BASE.pm +++ b/Configurations/platform/BASE.pm @@ -42,7 +42,7 @@ sub def { return __base($_[1], '.ld') . $_[0]->defext() } sub obj { return __base($_[1], '.o') . $_[0]->objext() } sub res { return __base($_[1], '.res') . $_[0]->resext() } sub dep { return __base($_[1], '.o') . $_[0]->depext() } # <- objname -sub asm { return __base($_[1], '.S', '.s') . $_[0]->asmext() } +sub asm { return __base($_[1], '.s') . $_[0]->asmext() } # Another set of convenience functions for standard checks of certain # internal extensions and conversion from internal to platform specific @@ -51,7 +51,8 @@ sub asm { return __base($_[1], '.S', '.s') . $_[0]->asmext() } sub isdef { return $_[1] =~ m|\.ld$|; } sub isobj { return $_[1] =~ m|\.o$|; } sub isres { return $_[1] =~ m|\.res$|; } -sub isasm { return $_[1] =~ m|\.[Ss]$|; } +sub isasm { return $_[1] =~ m|\.s$|; } +sub iscppasm { return $_[1] =~ m|\.S$|; } sub isstaticlib { return $_[1] =~ m|\.a$|; } sub convertext { if ($_[0]->isdef($_[1])) { return $_[0]->def($_[1]); } |