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: tv/tvbrowse.cpp
2 --- tv/tvbrowse.cpp.orig 2000-09-20 22:34:02 +0200
3 +++ tv/tvbrowse.cpp 2006-01-15 00:23:04 +0100
4 @@ -28,8 +28,8 @@
5 #include <stdlib.h>
6 #include <stdio.h>
7 #include <string.h>
8 -#include <iomanip.h>
9 -#include <strstream.h>
10 +#include <sstream>
11 +#include <iomanip>
13 #define Uses_TEvent
14 #include <tvision/tv.h>
15 Index: tv/tvxbase.cpp
16 --- tv/tvxbase.cpp.orig 2000-09-20 22:34:02 +0200
17 +++ tv/tvxbase.cpp 2006-01-15 00:23:04 +0100
18 @@ -23,7 +23,7 @@
19 Foundation, Inc., or see http://www.gnu.org/.
20 */
22 -#include <iostream.h>
23 +#include <iostream>
25 #define Uses_TApplication
26 #define Uses_TButton
27 Index: xbase/dbf.h
28 --- xbase/dbf.h.orig 2001-01-13 21:20:53 +0100
29 +++ xbase/dbf.h 2006-01-15 00:23:04 +0100
30 @@ -65,7 +65,7 @@
31 #include <xbase/xtypes.h>
32 #include <xbase/xdate.h>
34 -#include <iostream.h>
35 +#include <iostream>
36 #include <stdio.h>
38 /*! \file dbf.h
39 Index: xbase/ndx.cpp
40 --- xbase/ndx.cpp.orig 2001-03-21 01:28:53 +0100
41 +++ xbase/ndx.cpp 2006-01-15 00:23:04 +0100
42 @@ -66,7 +66,8 @@
43 #endif
45 #include <xbase/xbase.h>
46 -#include <iostream.h>
47 +#include <iostream>
48 +using std::cout;
50 #ifdef XB_INDEX_NDX
52 Index: xbase/stack.cpp
53 --- xbase/stack.cpp.orig 2000-11-10 20:04:17 +0100
54 +++ xbase/stack.cpp 2006-01-15 00:23:04 +0100
55 @@ -59,7 +59,8 @@
57 #include <string.h>
58 #include <stdlib.h>
59 -#include <iostream.h>
60 +#include <iostream>
61 +using std::cout;
63 #include <xbase/xstack.h>
65 Index: xbase/xbstring.cpp
66 --- xbase/xbstring.cpp.orig 2001-02-20 18:53:26 +0100
67 +++ xbase/xbstring.cpp 2006-01-15 00:23:04 +0100
68 @@ -582,7 +582,7 @@
69 //! Short description.
70 /*!
71 */
72 -XBDLLEXPORT ostream& operator << ( ostream& os, const xbString& xbs ) {
73 +XBDLLEXPORT std::ostream& operator << ( std::ostream& os, const xbString& xbs ) {
74 return os << xbs.data;
75 }
77 Index: xbase/xbstring.h
78 --- xbase/xbstring.h.orig 2001-01-27 06:00:32 +0100
79 +++ xbase/xbstring.h 2006-01-15 00:23:04 +0100
80 @@ -56,7 +56,11 @@
81 #endif
83 #include <stdlib.h>
84 -#include <iostream.h>
85 +#include <iostream>
86 +
87 +using std::endl;
88 +using std::cin;
89 +using std::cout;
91 /*! \file xbstring.h
92 */
93 @@ -119,7 +123,7 @@
94 bool operator <= ( const xbString& ) const;
95 bool operator >= ( const xbString& ) const;
97 - friend ostream& operator << ( ostream&, const xbString& );
98 + friend std::ostream& operator << ( std::ostream&, const xbString& );
100 xbString &remove(size_t pos = 0, int n = npos);
101 xbString mid(size_t pos = 0, int n = npos) const;
102 Index: ltmain.sh
103 --- ltmain.sh.orig 2000-06-01 08:03:18 +0200
104 +++ ltmain.sh 2006-01-15 10:05:44 +0100
105 @@ -728,7 +728,7 @@
106 ;;
107 esac
108 deplibs="$deplibs $arg"
109 - lib_search_path="$lib_search_path `expr $arg : '-L\(.*\)'`"
110 + lib_search_path="$lib_search_path `expr x$arg : 'x-L\(.*\)'`"
111 ;;
113 -l*) deplibs="$deplibs $arg" ;;