openldap/openldap.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
child 380
4f3b1ee715dd
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@174 1 Index: include/ac/fdset.h
michael@174 2 --- include/ac/fdset.h.orig 2008-02-12 00:26:40 +0100
michael@174 3 +++ include/ac/fdset.h 2008-10-13 11:38:23 +0200
michael@174 4 @@ -22,6 +22,13 @@
michael@174 5 #ifndef _AC_FDSET_H
michael@174 6 #define _AC_FDSET_H
michael@174 7
michael@174 8 +#if defined(HAVE_SYS_TYPES_H)
michael@174 9 +#include <sys/types.h>
michael@174 10 +#endif
michael@174 11 +#if defined(HAVE_SYS_SELECT_H)
michael@174 12 +#include <sys/select.h>
michael@174 13 +#endif
michael@174 14 +
michael@174 15 #if !defined( OPENLDAP_FD_SETSIZE ) && !defined( FD_SETSIZE )
michael@174 16 # define OPENLDAP_FD_SETSIZE 4096
michael@174 17 #endif
michael@174 18 Index: include/ldap_int_thread.h
michael@174 19 --- include/ldap_int_thread.h.orig 2008-02-12 00:26:40 +0100
michael@174 20 +++ include/ldap_int_thread.h 2008-10-13 11:38:23 +0200
michael@174 21 @@ -100,6 +100,7 @@
michael@174 22 * *
michael@174 23 ***********************************/
michael@174 24
michael@174 25 +#define _POSIX_PTHREAD_SEMANTICS
michael@174 26 #define PTH_SYSCALL_SOFT 1
michael@174 27 #include <pth.h>
michael@174 28
michael@174 29 Index: libraries/libldap_r/tpool.c
michael@174 30 --- libraries/libldap_r/tpool.c.orig 2008-03-21 01:46:03 +0100
michael@174 31 +++ libraries/libldap_r/tpool.c 2008-10-13 11:38:23 +0200
michael@174 32 @@ -950,6 +950,6 @@
michael@174 33 {
michael@174 34 ldap_int_thread_userctx_t *ctx = vctx;
michael@174 35
michael@174 36 - return ctx->ltu_id;
michael@174 37 + return ctx != NULL ? ctx->ltu_id : 0;
michael@174 38 }
michael@174 39 #endif /* LDAP_THREAD_HAVE_TPOOL */
michael@174 40 Index: servers/slapd/back-perl/config.c
michael@174 41 --- servers/slapd/back-perl/config.c.orig 2008-02-12 00:26:47 +0100
michael@174 42 +++ servers/slapd/back-perl/config.c 2008-10-13 11:38:23 +0200
michael@174 43 @@ -49,6 +49,9 @@
michael@174 44 }
michael@174 45
michael@174 46 #ifdef PERL_IS_5_6
michael@174 47 + if (argc > 2)
michael@174 48 + snprintf( eval_str, EVAL_BUF_SIZE, "require \"%s\";", argv[2] );
michael@174 49 + else
michael@174 50 snprintf( eval_str, EVAL_BUF_SIZE, "use %s;", argv[1] );
michael@174 51 eval_pv( eval_str, 0 );
michael@174 52

mercurial