pgp2/pgp2.patch

Tue, 29 Mar 2011 20:04:34 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 29 Mar 2011 20:04:34 +0200
changeset 334
4a34d7a82eab
permissions
-rw-r--r--

Rework package yet again, correcting and introducing new buildconf logic:
Conditionally disable bootstrap stage comparison correctly, correct
english grammar, better find system as(1) and ld(1), indotruce detailed
optimization option messages, more completely guess cpu types, allow
profiled bootstrapping without a preinstalled GCC because many other
compilers have long since implemented 64-bit arithmetic, instruct make
to build sequentially (not in sparallel) when building a profiled
bootstrap as GCC online documents recommend, and generally improve
comment blocks.

The single most important correction in this changeset relates to the
GCC changed optimization policy since at least GCC 4.5, in which -march
is always passed and not always correctly guessed. In the case of this
package, allowing GCC to guess the architecture leads to wild build
errors at various subcomponents (zlib, libgcc, libiberty...) and
bootstrap stages. It seems quite platform specific, and the safest
approach to correcting this seems to be explicitly always specifying the
-march argument when bootstrapping GCC. Because the best choice 'native'
is not available when bootstrapping using a foreign (non GCC) compiler,
a guess is made according to rpmmacros l_platform in that case.

It is questionable as to whether these recent optimization changes
on the part of GCC or this package are compatible with each other,
or if either are complete or correct at all. At least applying these
corrections allows this package to build again in most cases test.

michael@95 1 --- src/system.c.orig Tue Aug 27 12:53:39 2002
michael@95 2 +++ src/system.c Tue Aug 27 12:53:38 2002
michael@95 3 @@ -344,7 +344,7 @@
michael@95 4 #if (defined(MACH) || defined(SVR2) || defined(_BSD)) && !defined(NEXT) \
michael@95 5 && !defined(AUX) && !defined(__MACHTEN__) || (defined(sun) && defined(i386))
michael@95 6 int remove(name)
michael@95 7 -char *name;
michael@95 8 +const char *name;
michael@95 9 {
michael@95 10 return unlink(name);
michael@95 11 }
michael@95 12 --- src/mpilib.h.orig Tue Aug 29 05:03:30 1995
michael@95 13 +++ src/mpilib.h Fri Oct 6 09:08:35 2000
michael@95 14 @@ -321,7 +321,15 @@
michael@95 15 #endif /* mp_smul */
michael@95 16
michael@95 17 #define MIN_KEY_BITS 384
michael@95 18 +#ifdef USA
michael@95 19 #define MAX_KEY_BITS 2048
michael@95 20 +#else /* USA */
michael@95 21 +/*
michael@95 22 + * MAX_KEY_BITS changed from 2048 to 4096
michael@95 23 + * by Rich Wales <richw@webcom.com>, 06oct2000
michael@95 24 + */
michael@95 25 +#define MAX_KEY_BITS 4096
michael@95 26 +#endif /* USA */
michael@95 27
michael@95 28 /* MAX_BIT_PRECISION is upper limit that assembly primitives can handle.
michael@95 29 It must be less than 32704 bits, or 4088 bytes. It should be an
michael@95 30 --- src/randpool.h.orig Fri Jul 15 05:59:32 1994
michael@95 31 +++ src/randpool.h Fri Oct 6 09:08:38 2000
michael@95 32 @@ -1,7 +1,15 @@
michael@95 33 #include "usuals.h"
michael@95 34
michael@95 35 /* Set this to whatever you need (must be > 512) */
michael@95 36 +#ifdef USA
michael@95 37 #define RANDPOOLBITS 3072
michael@95 38 +#else /* USA */
michael@95 39 +/*
michael@95 40 + * RANDPOOLBITS changed from 3072 to 10240
michael@95 41 + * by Rich Wales <richw@webcom.com>, 06oct2000
michael@95 42 + */
michael@95 43 +#define RANDPOOLBITS 10240
michael@95 44 +#endif /* USA */
michael@95 45
michael@95 46 void randPoolStir(void);
michael@95 47 void randPoolAddBytes(byte const *buf, unsigned len);
michael@95 48 --- src/pgp.c.orig Wed Apr 24 10:34:19 1996
michael@95 49 +++ src/pgp.c Fri Oct 6 09:09:59 2000
michael@95 50 @@ -101,6 +101,7 @@
michael@95 51 Version 2.6.2i - 7 May 95
michael@95 52 Version 2.6.3(i) - 18 Jan 96
michael@95 53 Version 2.6.3(i)a - 4 Mar 96
michael@95 54 + Version 2.6.3(i)a+4K - 6 Oct 00 - richw@webcom.com
michael@95 55
michael@95 56 */
michael@95 57
michael@95 58 @@ -193,7 +194,7 @@
michael@95 59 " Amiga 68000 version by Rob Knop <rknop@mop.caltech.edu>";
michael@95 60 # endif
michael@95 61 #else
michael@95 62 -static const char __DOSVer[] = "$VER: PGP 2.6.3ia (04.03.96)"
michael@95 63 +static const char __DOSVer[] = "$VER: PGP 2.6.3ia+4K (06.10.00)"
michael@95 64 # ifdef _M68020
michael@95 65 " Amiga 68020 version by Peter Simons <simons@peti.rhein.de>";
michael@95 66 # else
michael@95 67 @@ -205,10 +206,11 @@
michael@95 68 /* Global filenames and system-wide file extensions... */
michael@95 69 #ifdef USA
michael@95 70 char rel_version[] = _LANG("2.6.3a"); /* release version */
michael@95 71 -#else
michael@95 72 -char rel_version[] = _LANG("2.6.3ia"); /* release version */
michael@95 73 -#endif
michael@95 74 char rel_date[] = "1996-03-04"; /* release date */
michael@95 75 +#else /* USA */
michael@95 76 +char rel_version[] = _LANG("2.6.3ia+4K"); /* release version */
michael@95 77 +char rel_date[] = "2000-10-06"; /* release date */
michael@95 78 +#endif /* USA */
michael@95 79 char PGP_EXTENSION[] = ".pgp";
michael@95 80 char ASC_EXTENSION[] = ".asc";
michael@95 81 char SIG_EXTENSION[] = ".sig";
michael@95 82 @@ -390,13 +392,15 @@
michael@95 83 #ifdef USA
michael@95 84 fputs(LANG(signon_legalese), stderr);
michael@95 85 #endif
michael@95 86 - fputs(
michael@95 87 #ifdef USA
michael@95 88 + fputs(
michael@95 89 LANG("Export of this software may be restricted by the U.S. government.\n"),
michael@95 90 -#else
michael@95 91 -LANG("International version - not for use in the USA. Does not use RSAREF.\n"),
michael@95 92 -#endif
michael@95 93 + /*
michael@95 94 + * Non-RSAREF warning removed (now that RSA patent has expired)
michael@95 95 + * by Rich Wales <richw@webcom.com>, 06oct2000
michael@95 96 + */
michael@95 97 stderr);
michael@95 98 +#endif
michael@95 99
michael@95 100 get_timestamp((byte *) & tstamp); /* timestamp points to tstamp */
michael@95 101 fprintf(pgpout, LANG("Current time: %s\n"), ctdate(&tstamp));

mercurial