Tue, 29 Mar 2011 20:04:34 +0200
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 Index: dbus/dbus-internals.c
2 --- dbus/dbus-internals.c.orig 2006-11-17 20:12:18 +0100
3 +++ dbus/dbus-internals.c 2006-11-18 12:35:56 +0100
4 @@ -516,6 +516,14 @@
5 uuid->as_uint32s[DBUS_UUID_LENGTH_WORDS - 1] = DBUS_UINT32_TO_BE (now);
7 _dbus_generate_random_bytes_buffer (uuid->as_bytes, DBUS_UUID_LENGTH_BYTES - 4);
8 +
9 + /* brand UUID as variant DCE 1.1 */
10 + uuid->as_bytes[8] &= ~0xc0;
11 + uuid->as_bytes[8] |= (0x02 << 6);
12 +
13 + /* brand UUID as version 4 */
14 + uuid->as_bytes[6] &= ~0xf0;
15 + uuid->as_bytes[6] |= (0x04 << 4);
16 }
18 /**
19 Index: dbus/dbus-sysdeps-util-unix.c
20 --- dbus/dbus-sysdeps-util-unix.c.orig 2006-11-02 20:19:08 +0100
21 +++ dbus/dbus-sysdeps-util-unix.c 2006-11-18 12:33:22 +0100
22 @@ -31,6 +31,7 @@
23 #include "dbus-test.h"
25 #include <sys/types.h>
26 +#include <sys/param.h>
27 #include <stdlib.h>
28 #include <string.h>
29 #include <signal.h>
30 @@ -728,6 +729,8 @@
31 # else
32 # if defined(NAME_MAX)
33 name_max = NAME_MAX;
34 +# elif defined(MAXPATHLEN)
35 + name_max = MAXPATHLEN;
36 # else
37 # error "buffer size for readdir_r cannot be determined"
38 # endif
39 @@ -1233,4 +1236,4 @@
40 _dbus_string_free (&cmdline);
41 _dbus_string_free (&path);
42 return FALSE;
43 -}
44 \ No newline at end of file
45 +}
46 Index: bus/config-parser-trivial.c
47 --- bus/config-parser-trivial.c.orig 2009-01-13 16:12:32.838078473 +0100
48 +++ bus/config-parser-trivial.c 2009-01-13 16:11:58.375810360 +0100
49 @@ -131,6 +131,25 @@
50 }
52 dbus_bool_t
53 +bus_config_parser_check_doctype (BusConfigParser *parser,
54 + const char *doctype,
55 + DBusError *error)
56 +{
57 + _DBUS_ASSERT_ERROR_IS_CLEAR (error);
58 +
59 + if (strcmp (doctype, "busconfig") != 0)
60 + {
61 + dbus_set_error (error,
62 + DBUS_ERROR_FAILED,
63 + "Configuration file has the wrong document type %s",
64 + doctype);
65 + return FALSE;
66 + }
67 + else
68 + return TRUE;
69 +}
70 +
71 +dbus_bool_t
72 bus_config_parser_start_element (BusConfigParser *parser,
73 const char *element_name,
74 const char **attribute_names,