Commit a1e8bb9c42 for openssl.org
commit a1e8bb9c428e539e1ffac3ff36b1b99010dc2a89
Author: Mohamed Atef Mohamed <mohamedatefsarhan123@gmail.com>
Date: Tue Nov 24 23:04:16 2026 +0200
Configurations: drop legacy SVR4 -B flag from m4 generated-assembly rules
The generated rule for des_enc-sparc.S passes -B 8192 to m4, an option
that was inherited from its initial import in commit e0d769caa2e9 "Very
old submission (from 2000) of UltraSPARC assembler DES implementation.
It was not accepted because code is not PIC, too UltraSPARC-specific
when it doesn't have to and 32-bit only. I'm committing the original
version mostly for reference purposes. 64, PIC, blended CPU tune-up
follows shortly. Obtained from: http://inet.uni2.dk/~svolaf/des.htm",
that was specific to SVR4 Unix flavours such as SunOS[1], but supported
by GNU m4 as well for compatibility purposes, as a no-op. BSD flavours
of m4, including the NetBSD one, do not have such compat, so an attempt
to generate the assembly file there led to an error.
Remove the option from the Makefile and Ninja generators,
and from the expansion command mentioned in des_enc.m4.
[1] http://www.typewritten.org/Manual/Sun/SunOS/5.6/man1/m4.html
Resolves: https://github.com/openssl/openssl/issues/33910
Fixes: 28e276f13928 "Complete integration of SPARC assembler DES implementation. Tested on Solaris only. I'll keep my eyes open for Linux and OpenBSD targets."
Assisted-by: OpenCode:hy4-flash-free
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Merge-date: Tue Dec 1 16:58:34 2026
Merged-from: https://github.com/openssl/openssl/pull/33969
diff --git a/Configurations/build.ninja.tmpl b/Configurations/build.ninja.tmpl
index 05b642eba5..25db47b1a9 100644
--- a/Configurations/build.ninja.tmpl
+++ b/Configurations/build.ninja.tmpl
@@ -795,7 +795,7 @@ build reconfigure reconf: run_console
.$cppflags.$defs.' '.$config{processor}.' '
.cmd_quote($args{src});
} elsif ($gen0 =~ /\.m4$/) {
- $cmd = 'm4 -B 8192'.$gen_incs.' '.cmd_quote($gen0).$gen_args
+ $cmd = 'm4'.$gen_incs.' '.cmd_quote($gen0).$gen_args
.' > '.cmd_quote($args{src});
} elsif ($gen0 =~ /\.S$/) {
$cmd = $cc.' '.$incs.' '.$cppflags.$defs.' -E '
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 686f340309..d1fc35908c 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -1755,7 +1755,7 @@ EOF
$generator = 'CC="$(CC)" $(PERL)'.$gen_incs.' '.$gen0.$gen_args
.' "$(PERLASM_SCHEME)"'.$incs.' '.$cppflags.$defs.' $(PROCESSOR)';
} elsif ($gen0 =~ /\.m4$/) {
- $generator = 'm4 -B 8192'.$gen_incs.' '.$gen0.$gen_args;
+ $generator = 'm4'.$gen_incs.' '.$gen0.$gen_args;
$to_stdout = 1;
} elsif ($gen0 =~ /\.S$/) {
$generator = undef;
diff --git a/crypto/des/asm/des_enc.m4 b/crypto/des/asm/des_enc.m4
index c00ac6184d..8365578a19 100644
--- a/crypto/des/asm/des_enc.m4
+++ b/crypto/des/asm/des_enc.m4
@@ -5,7 +5,7 @@
! in the file LICENSE in the source distribution or at
! https://www.openssl.org/source/license.html
!
-! To expand the m4 macros: m4 -B 8192 des_enc.m4 > des_enc.S
+! To expand the m4 macros: m4 des_enc.m4 > des_enc.S
!
! Global registers 1 to 5 are used. This is the same as done by the
! cc compiler. The UltraSPARC load/store little endian feature is used.