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.

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

mercurial