summaryrefslogtreecommitdiff
path: root/security/openssl/patches/patch-ab
blob: c46b361fa4ed7f50c31b3825c3fba994ce19f5fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
$NetBSD: patch-ab,v 1.2 1999/10/19 04:09:19 erh Exp $

--- Configure.orig	Mon Oct 18 21:46:47 1999
+++ Configure	Mon Oct 18 22:28:19 1999
@@ -153,9 +153,6 @@
 "linux-aout",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm",
 "linux-mips",    "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
 -Wuninitialized:::BN_LLONG:",
-"NetBSD-sparc",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
-"NetBSD-m68",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
-"NetBSD-x86",	"gcc:-DTERMIOS -D_ANSI_SOURCE -O3 -fomit-frame-pointer -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:",
 #"FreeBSD",   "gcc:-DTERMIOS -DL_ENDIAN -D_ANSI_SOURCE -fomit-frame-pointer -O3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm",
 "FreeBSD",      "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm",
 "FreeBSD-elf",  "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
@@ -172,6 +169,20 @@
 "aix-cc",   "cc:-O -DAIX -DB_ENDIAN::BN_LLONG RC4_CHAR:::",
 "aix-gcc",  "gcc:-O2 -DAIX -DB_ENDIAN::BN_LLONG RC4_CHAR:::",
 
+# NetBSD
+"NetBSD-alpha", "gcc:-DTERMIOS -O3 -Wall::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:::",
+"NetBSD-arm32", "gcc:-DTERMIOS -O3 -Wall -DL_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
+"NetBSD-i386", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DBN_ASM::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm",
+"NetBSD-i386elf", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DBN_ASM::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
+"NetBSD-m68k", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
+"NetBSD-mipseb", "gcc:-DTERMIOS -O3 -Wall -DB_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
+"NetBSD-mipsel", "gcc:-DTERMIOS -O3 -Wall -DL_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
+"NetBSD-ns32k", "gcc:-DTERMIOS -O3 -Wall -DL_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
+"NetBSD-powerpc", "gcc:-DTERMIOS -O3 -Wall -DB_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
+"NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
+"NetBSD-sparc64", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC1:::",
+"NetBSD-vax", "gcc:-DTERMIOS -O3 -Wall -DL_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
+
 #
 # Cray T90 (SDSC)
 # It's Big-endian, but the algorithms work properly when B_ENDIAN is NOT
@@ -282,19 +293,23 @@
 my $flags="";
 my $libs="";
 my $target="";
+my $usersaref=0;
+my $xmakelib="	cd .. && csh \${MAKELIB} libcrypto.so.1.0 libcrypto.a";
+
 foreach (@ARGV)
 	{
 	if ($_ =~ /^no-asm$/)
 		{ $no_asm=1; }
 	elsif ($_ =~ /^-/)
 		{
-		if ($_ =~ /^-[lL](.*)$/)
+		if ($_ =~ /^-([lLR]|Wl,)(.*)$/)
 			{
 			$libs.=$_." ";
 			}
 		elsif ($_ =~ /^-D(.*)$/)
 			{
 			$flags.=$_." ";
+			$usersaref=1 if ($_ =~ /^-DRSAref(.*)$/);
 			}
 		elsif ($_ =~ /^-[fK](.*)$/)
 			{
@@ -321,6 +336,11 @@
 		}
 	}
 
+if ($usersaref == 1)
+	{
+	$xmakelib.=" libRSAglue.a";
+	}
+
 if (!defined($table{$target}))
 	{
 	&bad_target;
@@ -370,6 +390,19 @@
 #	$rmd160_obj=$rmd160_enc;
 	$cflags.=" -DRMD160_ASM";
 	}
+
+rename("crypto/Makefile.ssl", "crypto/Makefile.org") unless -e "crypto/Makefile.org";
+open(IN,'<crypto/Makefile.org') || die "unable to read crypto/Makefile.org:$!\n";
+open(OUT,">crypto/Makefile.ssl") || die "unable to create crypto/Makefile.ssl:$!\n";
+
+while (<IN>)
+	{
+	chop;
+	s/^	XMAKELIB$/$xmakelib/;
+	print OUT $_."\n";
+	}
+close(IN);
+close(OUT);
 
 open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
 open(OUT,">$Makefile") || die "unable to create $Makefile:$!\n";