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 diff -Nau configure.orig configure
2 Index: configure
3 --- configure.orig 2011-03-21 09:30:50.934813866 +0100
4 +++ configure 2011-03-21 09:31:27.459048318 +0100
5 @@ -8748,6 +8748,7 @@
6 cat confdefs.h >>conftest.$ac_ext
7 cat >>conftest.$ac_ext <<_ACEOF
8 /* end confdefs.h. */
9 +#include <sys/socket.h>
10 #include <netinet/sctp.h>
12 int
13 diff -Nau src/net_uuid.c.orig src/net_uuid.c
14 Index: src/net_uuid.c
15 --- src/net_uuid.c.orig 2008-10-25 01:13:44.000000000 +0200
16 +++ src/net_uuid.c 2011-03-21 14:23:16.000000000 +0100
17 @@ -38,8 +38,10 @@
18 #else
19 #include <sys/types.h>
20 #include <sys/time.h>
21 +#if !defined(__APPLE__) && !defined(__MACH__)
22 #include <sys/sysinfo.h>
23 #endif
24 +#endif
26 /* system dependent call to get the current system time. Returned as
27 100ns ticks since UUID epoch, but resolution may be less than
28 diff -Nau src/nettest_bsd.c.orig src/nettest_bsd.c
29 Index: src/nettest_bsd.c
30 --- src/nettest_bsd.c.orig 2011-03-21 09:20:13.471888999 +0100
31 +++ src/nettest_bsd.c 2011-03-21 09:20:16.343927098 +0100
32 @@ -97,6 +97,7 @@
33 #endif /* NOSTDLIBH */
35 #ifdef WANT_SCTP
36 +#include <sys/socket.h>
37 #include <netinet/sctp.h>
38 #endif
40 diff -Nau src/nettest_sctp.c.orig src/nettest_sctp.c
41 Index: src/nettest_sctp.c
42 --- src/nettest_sctp.c.orig 2011-03-21 09:22:57.248890123 +0100
43 +++ src/nettest_sctp.c 2011-03-21 09:23:02.907197031 +0100
44 @@ -58,6 +58,7 @@
45 #include <netinet/sctp.h>
46 #include <arpa/inet.h>
47 #include <netdb.h>
48 +#include <strings.h>
50 /* would seem that not all sctp.h files define a MSG_EOF, but that
51 MSG_EOF can be the same as MSG_FIN so lets work with that