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

mercurial