aboutsummaryrefslogtreecommitdiff
path: root/devel/hp48xgcc
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2013-10-09 20:53:22 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2013-10-09 20:53:22 +0000
commite9caa18e52f4d8e3536513aea370ecff4b97b4c5 (patch)
tree888b094a78ea6233f4d365ecf3451ba6b3165761 /devel/hp48xgcc
parent11e5e1251c5c9fec73ef0e6b00705d7e2fcb29db (diff)
downloadports-e9caa18e52f4d8e3536513aea370ecff4b97b4c5.tar.gz
ports-e9caa18e52f4d8e3536513aea370ecff4b97b4c5.zip
Notes
Diffstat (limited to 'devel/hp48xgcc')
-rw-r--r--devel/hp48xgcc/Makefile4
-rw-r--r--devel/hp48xgcc/files/patch-class+LKV+Bstream.cc29
-rw-r--r--devel/hp48xgcc/files/patch-class+LKV+Bstream.h31
-rw-r--r--devel/hp48xgcc/files/patch-class+LKV+List.h17
-rw-r--r--devel/hp48xgcc/files/patch-class+LKV+Str.h17
-rw-r--r--devel/hp48xgcc/files/patch-class+LKV+StrIO.cc25
-rw-r--r--devel/hp48xgcc/files/patch-class+class.cc252
-rw-r--r--devel/hp48xgcc/files/patch-class+clld.cc143
-rw-r--r--devel/hp48xgcc/files/patch-class+resolve.cc68
-rw-r--r--devel/hp48xgcc/files/patch-objdump+Makefile18
-rw-r--r--devel/hp48xgcc/files/patch-objdump+bool.cc25
11 files changed, 598 insertions, 31 deletions
diff --git a/devel/hp48xgcc/Makefile b/devel/hp48xgcc/Makefile
index 7bb0aaffe0c6..334ea9f83f51 100644
--- a/devel/hp48xgcc/Makefile
+++ b/devel/hp48xgcc/Makefile
@@ -33,7 +33,7 @@ INSTALL_TARGET= build-lib
MAKE_ARGS= GCC_SRC="${GCC_DIR}" GCC_VERSION="${GCC_VER}" \
CFLAGS="${CFLAGS}" CLIB="" ROOT="${PREFIX}" \
INSTALL_PROG="${INSTALL_PROGRAM}" \
- INSTALL_DATA="${INSTALL_DATA}"
+ INSTALL_DATA="${INSTALL_DATA}" LDXX="${CXX}"
post-extract: .SILENT
# Extract GCC distribution separately because of USE_ZIP/.tar.gz conflict
@@ -49,8 +49,6 @@ post-extract: .SILENT
${ECHO_CMD} '#define HAVE_VPRINTF' >> ${GCC_DIR}/config/xm-freebsd.h
# Do not install extra copies of GPL (we use license framework instead)
${REINPLACE_CMD} -e '/COPYING/d' ${WRKSRC}/make.pubfiles
-# Unbreak against Clang and other strict C++ compilers
- ${REINPLACE_CMD} -e 's/main (/int &void/' ${WRKSRC}/objdump/bool.cc
NO_STAGE= yes
do-configure:
diff --git a/devel/hp48xgcc/files/patch-class+LKV+Bstream.cc b/devel/hp48xgcc/files/patch-class+LKV+Bstream.cc
index 37e111361141..4759c0b7e843 100644
--- a/devel/hp48xgcc/files/patch-class+LKV+Bstream.cc
+++ b/devel/hp48xgcc/files/patch-class+LKV+Bstream.cc
@@ -1,20 +1,41 @@
--- class/LKV/Bstream.cc 3 Nov 2004 06:57:51 -0000 1.1
+++ class/LKV/Bstream.cc 3 Nov 2004 11:24:06 -0000 1.2
-@@ -17,7 +17,7 @@
+@@ -10,15 +10,15 @@ extern "C" {
+ #include "Bstream.h"
+
+ #ifndef OBSOLETE_LIBGXX
+-BOstream::BOstream ( ostream & orig ) : ostream(orig.rdbuf()) {
+- ostream::setf(ios::scientific);
+- ostream::precision(190);
++BOstream::BOstream ( std::ostream & orig ) : std::ostream(orig.rdbuf()) {
++ std::ostream::setf(std::ios::scientific);
++ std::ostream::precision(190);
+ }
#endif
void BOstream::ewrite(const void * p, int size) {
- write ((const unsigned char *)p, size);
+- if (ostream::fail()) {
+ write ((const char *)p, size);
- if (ostream::fail()) {
++ if (std::ostream::fail()) {
set_error("BOstream::operator<< ","write-error");
}
-@@ -34,7 +34,7 @@
+ }
+@@ -28,14 +28,14 @@ void BOstream::ewrite(const void * p, in
+ // ==============================================================
+
+ #ifndef OBSOLETE_LIBGXX
+-BIstream::BIstream( istream & orig ) : istream(orig.rdbuf()) {
++BIstream::BIstream( std::istream & orig ) : std::istream(orig.rdbuf()) {
+
+ }
#endif
void BIstream::eread(void * p, int size) {
- read ((unsigned char *)p, size);
+- if (istream::fail()) {
+ read ((char *)p, size);
- if (istream::fail()) {
++ if (std::istream::fail()) {
set_error("BIstream::operator>> ","read-error");
}
+ }
diff --git a/devel/hp48xgcc/files/patch-class+LKV+Bstream.h b/devel/hp48xgcc/files/patch-class+LKV+Bstream.h
index 793147bde69b..a3bd6219f9a2 100644
--- a/devel/hp48xgcc/files/patch-class+LKV+Bstream.h
+++ b/devel/hp48xgcc/files/patch-class+LKV+Bstream.h
@@ -1,5 +1,14 @@
--- class/LKV/Bstream.h 3 Nov 2004 06:57:51 -0000 1.1
+++ class/LKV/Bstream.h 20 Feb 2006 10:55:38 -0000
+@@ -2,7 +2,7 @@
+ #ifndef Bstream_h
+ #define Bstream_h
+
+-#include <iostream.h>
++#include <iostream>
+
+ #ifdef OBSOLETE_LIBGXX
+ #include <fstream.h>
@@ -10,7 +10,7 @@
@@ -9,7 +18,16 @@
#else
class BOstream : public ofstream {
#endif
-@@ -34,13 +34,13 @@
+@@ -22,7 +22,7 @@ protected:
+ public:
+
+ #ifndef OBSOLETE_LIBGXX
+- BOstream( ostream & orig );
++ BOstream( std::ostream & orig );
+ #endif
+
+ BOstream & operator<< (int n) { ewrite(&n, sizeof(n)); return *this; }
+@@ -34,13 +34,13 @@ public:
BOstream & operator<< (const void * n) { ewrite(&n, sizeof(n)); return *this; }
int mem_dump(const void * p, int size) {
@@ -25,7 +43,16 @@
#else
class BIstream : public ifstream {
#endif
-@@ -64,12 +64,12 @@
+@@ -52,7 +52,7 @@ protected:
+ public:
+
+ #ifndef OBSOLETE_LIBGXX
+- BIstream( istream & orig );
++ BIstream( std::istream & orig );
+ #endif
+
+ BIstream & operator>> (int & n) { eread(&n, sizeof(n)); return *this; }
+@@ -64,12 +64,12 @@ public:
BIstream & operator>> (void * & n) { eread(&n, sizeof(n)); return *this; }
int mem_undump(void * p, int size) {
diff --git a/devel/hp48xgcc/files/patch-class+LKV+List.h b/devel/hp48xgcc/files/patch-class+LKV+List.h
index 57d6f69d7a76..9b75095691ab 100644
--- a/devel/hp48xgcc/files/patch-class+LKV+List.h
+++ b/devel/hp48xgcc/files/patch-class+LKV+List.h
@@ -9,7 +9,7 @@
template <class T>
class List;
-@@ -35,13 +35,13 @@
+@@ -35,13 +35,13 @@ public:
ListItem( void ) : T()
#ifdef DEBUG
, next((ListItem *)0), prev((ListItem *)0)
@@ -25,7 +25,7 @@
{ };
ListItem * get_next(void) const {
-@@ -59,6 +59,9 @@
+@@ -59,6 +59,9 @@ LAZYOPS(template <class T>,ListItem<T>)
template <class T>
@@ -35,7 +35,7 @@
class List {
protected:
-@@ -239,7 +242,7 @@
+@@ -239,7 +242,7 @@ public:
return last;
};
@@ -44,7 +44,16 @@
};
template <class T>
-@@ -306,4 +309,4 @@
+@@ -260,7 +263,7 @@ void List<T>::clear(void) {
+
+
+ template <class T>
+-ostream & operator<< (ostream & o, const List<T> & l) {
++std::ostream & operator<< (std::ostream & o, const List<T> & l) {
+ o << "List with " << l.length() << " elements:\n";
+ ListItem<T> * li = l.get_head();
+ int i = 1;
+@@ -306,4 +309,4 @@ BOstream & operator<< (BOstream & o, con
}
diff --git a/devel/hp48xgcc/files/patch-class+LKV+Str.h b/devel/hp48xgcc/files/patch-class+LKV+Str.h
index 7c69813055ae..df3e8c7a71c5 100644
--- a/devel/hp48xgcc/files/patch-class+LKV+Str.h
+++ b/devel/hp48xgcc/files/patch-class+LKV+Str.h
@@ -1,6 +1,6 @@
--- class/LKV/Str.h 3 Nov 2004 06:57:51 -0000 1.1
+++ class/LKV/Str.h 20 Feb 2006 11:18:51 -0000
-@@ -68,6 +68,15 @@
+@@ -68,6 +68,15 @@ public:
return !(operator>(rv));
};
@@ -16,7 +16,7 @@
// ====== casting ======
inline operator const char *() const {
-@@ -78,11 +87,11 @@
+@@ -78,11 +87,11 @@ public:
return (const unsigned char *) adr;
}
@@ -30,20 +30,23 @@
return (unsigned char *) adr;
}
-@@ -168,10 +177,10 @@
+@@ -168,11 +177,11 @@ Str NtoHex(unsigned long val, unsigned s
Str FtoStr(double val);
Str LtoStr(long);
-class ostream;
-+#include <iostream.h>
+-ostream & operator<< (ostream & o, const Str & s);
++#include <iostream>
+
- ostream & operator<< (ostream & o, const Str & s);
++std::ostream & operator<< (std::ostream & o, const Str & s);
-class istream;
- istream & operator>> (istream & i, Str & s);
+-istream & operator>> (istream & i, Str & s);
++std::istream & operator>> (std::istream & i, Str & s);
class BOstream;
-@@ -180,4 +189,4 @@
+ BOstream & operator<< (BOstream & o, const Str & s);
+@@ -180,4 +189,4 @@ BOstream & operator<< (BOstream & o, con
class BIstream;
BIstream & operator>> (BIstream & i, Str & s);
diff --git a/devel/hp48xgcc/files/patch-class+LKV+StrIO.cc b/devel/hp48xgcc/files/patch-class+LKV+StrIO.cc
new file mode 100644
index 000000000000..d5067ceb220b
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+LKV+StrIO.cc
@@ -0,0 +1,25 @@
+--- class/LKV/StrIO.cc.orig 1995-06-24 08:36:46.000000000 +0400
++++ class/LKV/StrIO.cc 2013-10-09 13:03:54.000000000 +0400
+@@ -3,11 +3,11 @@
+
+ #include "set_error.h"
+
+-#include <iostream.h>
++#include <iostream>
+
+ #pragma implementation
+
+-ostream & operator<< (ostream & o, const Str & s) {
++std::ostream & operator<< (std::ostream & o, const Str & s) {
+ o << ((const char *)s);
+ if (o.fail()) {
+ set_error("BOstream << Str ","stream output failed");
+@@ -15,7 +15,7 @@ ostream & operator<< (ostream & o, const
+ return o;
+ }
+
+-istream & operator>> (istream & i, Str & s) {
++std::istream & operator>> (std::istream & i, Str & s) {
+ static char linebuf[1024];
+
+ linebuf[1023] = (char)0;
diff --git a/devel/hp48xgcc/files/patch-class+class.cc b/devel/hp48xgcc/files/patch-class+class.cc
index e08e7b4a0c9e..a8cf08985bc8 100644
--- a/devel/hp48xgcc/files/patch-class+class.cc
+++ b/devel/hp48xgcc/files/patch-class+class.cc
@@ -1,11 +1,257 @@
--- class/class.cc 3 Nov 2004 06:57:51 -0000 1.1
+++ class/class.cc 4 Nov 2004 10:58:04 -0000 1.2
-@@ -3310,7 +3310,7 @@
+@@ -39,8 +39,8 @@
+ #include "fp_support.h"
+
+ // We do our I/O via streams
+-#include <iostream.h>
+-#include <fstream.h>
++#include <iostream>
++#include <fstream>
+
+ // Bstreams are the (re-)storable variant of streams
+ #include <Bstream.h>
+@@ -211,7 +211,7 @@ void norm_err(const Str & err) {
+
+ ++error_count;
+
+- cerr << "ERROR: " << err << '\n';
++ std::cerr << "ERROR: " << err << '\n';
+
+ if (!akt_line) return;
+
+@@ -227,7 +227,7 @@ void norm_err(const Str & err) {
+ f = npara(a);
+ i = o + npara(a).val();
+
+- cerr << "FILE: '" << f << "' LINE: " << i << '\n';
++ std::cerr << "FILE: '" << f << "' LINE: " << i << '\n';
+
+ akt_line->obc = "";
+ akt_line->para = "";
+@@ -740,9 +740,9 @@ void unused_labels(void) {
+ if (! p->accessed) {
+ if (f) {
+ f = false;
+- cerr << "following non-numerical labels were never used: \n";
++ std::cerr << "following non-numerical labels were never used: \n";
+ }
+- cerr << p->name << '\n';
++ std::cerr << p->name << '\n';
+ }
+ }
+ p = l_arr.get_next(p);
+@@ -2369,7 +2369,7 @@ NibStr & line_nibs(void) {
+ static bool relwarn = true;
+ if (relwarn) {
+ relwarn = false;
+- cerr << "WARNING: RELTAB pseudo-op used, relocation table\n"
++ std::cerr << "WARNING: RELTAB pseudo-op used, relocation table\n"
+ " is dumped & cleared.\n";
+ }
+ obj.relocs.clear();
+@@ -2846,17 +2846,17 @@ int read_file(Str f_name) {
+ bool macflag = false;
+
+ if (verbose) {
+- cerr << "reading '" << f_name << "' \n";
++ std::cerr << "reading '" << f_name << "' \n";
+ }
+ line = 1;
+ src.add_tail(SourceLine("", "AKTFILE", "", f_name+(char)1+"1"+(char)1 ));
+
+- ifstream * f;
+- f = new ifstream( (char *)f_name);
++ std::ifstream * f;
++ f = new std::ifstream( (char *)f_name);
+ if (f->fail()) {
+ delete f;
+ f_name = incdir_name + f_name;
+- f = new ifstream( (char *)f_name);
++ f = new std::ifstream( (char *)f_name);
+ if (f->fail()) {
+ delete f;
+ fatal_err("couldn't open source-file '"+f_name+"'");
+@@ -2995,7 +2995,7 @@ int read_file(Str f_name) {
+ if ( b == "") break;
+ mac_rpl[i] = b;
+ if ( b == mac_src[i] ) {
+- cerr << "ERROR: macro parameter replacement includes original\n";
++ std::cerr << "ERROR: macro parameter replacement includes original\n";
+ macflag = false;
+ }
+ }
+@@ -3029,20 +3029,20 @@ int read_file(Str f_name) {
+ a = npara(a);
+ lis->para = "";
+
+- streampos f_pos = f->tellg();
++ std::streampos f_pos = f->tellg();
+ delete f;
+ a = a.next_word();
+ if (verbose) {
+- cerr << " \r";
++ std::cerr << " \r";
+ }
+ if (read_file(a)) {
+ add_error("unable to read complete file '"+f_name+"'","");
+ return 20;
+ }
+ if (verbose) {
+- cerr << "reading '" << f_name << "' \r";
++ std::cerr << "reading '" << f_name << "' \r";
+ }
+- f = new ifstream ((char *)f_name);
++ f = new std::ifstream ((char *)f_name);
+ if (f == 0 || f->fail()) {
+ set_error("unable to reopen source file ",(char *)f_name);
+ return 20;
+@@ -3055,12 +3055,12 @@ int read_file(Str f_name) {
+
+ if ((line & 0xff) == 0) {
+ if (verbose) {
+- cerr << "reading '" << f_name << "' line " << line << '\r';
++ std::cerr << "reading '" << f_name << "' line " << line << '\r';
+ }
+ }
+ }
+ if (verbose) {
+- cerr << " \r";
++ std::cerr << " \r";
+ }
+
+ delete f;
+@@ -3112,7 +3112,7 @@ void pass1(void) {
+ adr += akt_line->binlen;
+
+ if ((line & 0xff) == 0 && verbose) {
+- cerr << "pass 1: " << line << " \r";
++ std::cerr << "pass 1: " << line << " \r";
+ }
+
+ line++;
+@@ -3121,7 +3121,7 @@ void pass1(void) {
+
+ nib_len = adr;
+ if (verbose) {
+- cerr << " \r";
++ std::cerr << " \r";
+ }
+ }
+
+@@ -3141,7 +3141,7 @@ void pass2(void) {
+ adr += akt_line->binlen;
+
+ if ((line & 0xff) == 0 && verbose) {
+- cerr << "pass 2: " << line << " \r";
++ std::cerr << "pass 2: " << line << " \r";
+ }
+
+ line++;
+@@ -3149,12 +3149,12 @@ void pass2(void) {
+ }
+
+ if (adr != nib_len) {
+- cerr << "ERROR: file length changed between passes (" << nib_len <<
++ std::cerr << "ERROR: file length changed between passes (" << nib_len <<
+ " / " << adr << ")\n";
+ }
+
+ if (verbose) {
+- cerr << " \r";
++ std::cerr << " \r";
+ }
+ }
+
+@@ -3201,19 +3201,19 @@ void passn(void) {
+ p = l_arr.get_next(p);
+ }
+ if (verbose) {
+- cerr << "pass n[" << sc << "]\r";
++ std::cerr << "pass n[" << sc << "]\r";
+ }
+ if (solv_rdy || sc>msc) break;
+ }
+ if (verbose) {
+- cerr << " \r";
++ std::cerr << " \r";
+ }
+ if (sc > msc) {
+- cerr << "unresolvable reference(s) between following labels:\n";
++ std::cerr << "unresolvable reference(s) between following labels:\n";
+ AVLItem<Symbol> * p = l_arr.get_head();
+ while (p) {
+ if (! p->resolved) {
+- cerr << p->name << '\n';
++ std::cerr << p->name << '\n';
+ }
+ p = l_arr.get_next(p);
+ }
+@@ -3264,7 +3264,7 @@ int get_cli_line(int argc, char ** argv)
+ } else if (a == "-v") {
+ verbose = true;
+ } else {
+- cerr << syntax;
++ std::cerr << syntax;
+ fatal_err("unknown command-line parameter '"+a+"'");
+ return 20;
+ }
+@@ -3273,7 +3273,7 @@ int get_cli_line(int argc, char ** argv)
+ }
+
+ if ( src_name == "" ) {
+- cerr << syntax;
++ std::cerr << syntax;
+ fatal_err("no source-file specified");
+ return 20;
+ }
+@@ -3292,7 +3292,7 @@ int main (int argc, char ** argv) {
+ }
+
+ if (verbose) {
+- cerr << "CLASS " << (version_tag+1) << "\nwritten by Lutz Vieweg 1991-1994\n";
++ std::cerr << "CLASS " << (version_tag+1) << "\nwritten by Lutz Vieweg 1991-1994\n";
+ }
+
+ def_macs();
+@@ -3310,10 +3310,10 @@ int main (int argc, char ** argv) {
BOstream of;
of.open(obj.name, ios::out | ios::binary);
#else
- ofstream of( obj.name, ios::out | ios::bin );
-+ ofstream of( obj.name, ios::out | ios::binary );
++ std::ofstream of( obj.name, std::ios::out | std::ios::binary );
#endif
if (of.fail()) {
- cerr << "FATAL ERROR: unable to open output file '" << obj.name << "'\n";
+- cerr << "FATAL ERROR: unable to open output file '" << obj.name << "'\n";
++ std::cerr << "FATAL ERROR: unable to open output file '" << obj.name << "'\n";
+ return 20;
+ }
+
+@@ -3322,7 +3322,7 @@ int main (int argc, char ** argv) {
+ of.write( (char *)obj.body , (obj.body.length()+1) >> 1 );
+ status = of.fail();
+ if (verbose) {
+- cerr << "assembled " << src_name << " to executable ";
++ std::cerr << "assembled " << src_name << " to executable ";
+ }
+ } else {
+ #ifndef OBSOLETE_LIBGXX
+@@ -3334,15 +3334,15 @@ int main (int argc, char ** argv) {
+ status = of.fail();
+ #endif
+ if (verbose) {
+- cerr << "assembled " << src_name << " to object-file ";
++ std::cerr << "assembled " << src_name << " to object-file ";
+ }
+ }
+
+ if (verbose) {
+- cerr << obj.name << " (" << nib_len << " nibbles)\n";
++ std::cerr << obj.name << " (" << nib_len << " nibbles)\n";
+ }
+ if (status) {
+- cerr << "FATAL ERROR: write operation on file '" << obj.name << "' failed\n";
++ std::cerr << "FATAL ERROR: write operation on file '" << obj.name << "' failed\n";
+ return 20;
+ }
+
diff --git a/devel/hp48xgcc/files/patch-class+clld.cc b/devel/hp48xgcc/files/patch-class+clld.cc
index fe400e0505b0..07df25b9e7b6 100644
--- a/devel/hp48xgcc/files/patch-class+clld.cc
+++ b/devel/hp48xgcc/files/patch-class+clld.cc
@@ -1,29 +1,156 @@
--- class/clld.cc 3 Nov 2004 06:57:51 -0000 1.1
+++ class/clld.cc 4 Nov 2004 10:58:04 -0000 1.2
-@@ -130,7 +130,7 @@
+@@ -5,7 +5,7 @@
+
+ #include <set_error.h>
+
+-#include <fstream.h>
++#include <fstream>
+
+ //extern "C" {
+ // #include <math.h>
+@@ -22,7 +22,7 @@ int link_obs ( List<InternalObjectFile>
+ // eventually warn about unused object-files
+ if (! aktob->used) {
+ if (verbose)
+- cerr << "WARNING: file '"+aktob->name+"' will not be linked\n"
++ std::cerr << "WARNING: file '"+aktob->name+"' will not be linked\n"
+ " because none of its exported symbols were used\n";
+ } else {
+
+@@ -130,7 +130,7 @@ int read_objfile( List<InternalObjectFil
BIstream f;
f.open(name, ios::in | ios::binary);
#else
- ifstream f(name, ios::in | ios::bin);
-+ ifstream f(name, ios::in | ios::binary);
++ std::ifstream f(name, std::ios::in | std::ios::binary);
#endif
if (f.fail()) {
if (!library)
-@@ -332,7 +332,7 @@
+@@ -175,7 +175,7 @@ int read_objfile( List<InternalObjectFil
+ obs.add_tail(ni);
+
+ if (verbose) {
+- cerr << "read '"+name+"', " << ni->relocs.length() << " relocs, "
++ std::cerr << "read '"+name+"', " << ni->relocs.length() << " relocs, "
+ << ni->imports.length() << " imports, "
+ << ni->exports.size() << " exports.\n";
+ }
+@@ -185,7 +185,7 @@ int read_objfile( List<InternalObjectFil
+
+ int next_arg(int & argc, const char ** & aktarg, Str & p) {
+ if (argc <= 1) {
+- cerr << "missing parameter for option '" << *aktarg << "'\n";
++ std::cerr << "missing parameter for option '" << *aktarg << "'\n";
+ return -1;
+ }
+ aktarg++;
+@@ -196,7 +196,7 @@ int next_arg(int & argc, const char ** &
+
+ void print_syntax(void) {
+
+- cerr << "clld [-v] [-o <target-filename>] [-static <*.slo-file>]\n"
++ std::cerr << "clld [-v] [-o <target-filename>] [-static <*.slo-file>]\n"
+ " [-shared] <object-file(s)>... \n";
+
+ }
+@@ -268,7 +268,7 @@ int main( int argc, const char ** argv )
+ return 20;
+ }
+ } else {
+- cerr << "unknown option '" << arg << "', type clld -h for help\n";
++ std::cerr << "unknown option '" << arg << "', type clld -h for help\n";
+ return 20;
+ }
+
+@@ -279,11 +279,11 @@ int main( int argc, const char ** argv )
+ }
+
+ if (verbose) {
+- cerr << "clld " << (version_tag+1) << "\nwritten by Lutz Vieweg 1994\n";
++ std::cerr << "clld " << (version_tag+1) << "\nwritten by Lutz Vieweg 1994\n";
+ }
+
+ if (obs.length() == 0) {
+- cerr << "you need to specify at least one object file to link\n";
++ std::cerr << "you need to specify at least one object file to link\n";
+ return 20;
+ }
+
+@@ -293,7 +293,7 @@ int main( int argc, const char ** argv )
+ p = p->get_next()
+ ) {
+ if (p->shared) {
+- cerr << "ERROR: shared libraries have to be built from static\n"
++ std::cerr << "ERROR: shared libraries have to be built from static\n"
+ " object-files only, cannot link '" << p->name << "'\n";
+ return 20;
+ }
+@@ -307,7 +307,7 @@ int main( int argc, const char ** argv )
+ List<InternalObjectFileP> shlibs;
+
+ if (resolve_references(obs, cimports, shlibs)) {
+- cerr << "linkage failed due to unresolved references\n";
++ std::cerr << "linkage failed due to unresolved references\n";
+ return 20;
+ }
+
+@@ -332,10 +332,10 @@ int main( int argc, const char ** argv )
BOstream shl_stream;
shl_stream.open ( shl_name, ios::out | ios::bin | ios::trunc );
#else
- ofstream shl_stream(shl_name, ios::out | ios::bin | ios::trunc );
-+ ofstream shl_stream(shl_name, ios::out | ios::binary | ios::trunc );
++ std::ofstream shl_stream(shl_name, std::ios::out | std::ios::binary | std::ios::trunc );
#endif
if (shl_stream.fail()) {
- cerr << "ERROR: unable to open file '"+shl_name+"' for writing\n";
-@@ -528,7 +528,7 @@
+- cerr << "ERROR: unable to open file '"+shl_name+"' for writing\n";
++ std::cerr << "ERROR: unable to open file '"+shl_name+"' for writing\n";
+ return 20;
+ }
+
+@@ -348,7 +348,7 @@ int main( int argc, const char ** argv )
+ #endif
+
+ if (verbose) {
+- cerr << "wrote '"+shl_name+"', " << resobj.relocs.length() << " relocs, "
++ std::cerr << "wrote '"+shl_name+"', " << resobj.relocs.length() << " relocs, "
+ << resobj.imports.length() << " imports, "
+ << resobj.exports.size() << " exports.\n";
+ }
+@@ -358,7 +358,7 @@ int main( int argc, const char ** argv )
+ #else
+ if (shl.fail()) {
+ #endif
+- cerr << "ERROR: write to file '"+shl_name+"' failed\n";
++ std::cerr << "ERROR: write to file '"+shl_name+"' failed\n";
+ return 20;
+ }
+ }
+@@ -528,10 +528,10 @@ int main( int argc, const char ** argv )
BOstream dst_stream;
dst_stream.open (bin_name, ios::out | ios::bin | ios::trunc );
#else
- ofstream dst_stream(bin_name, ios::out | ios::bin | ios::trunc );
-+ ofstream dst_stream(bin_name, ios::out | ios::binary | ios::trunc );
++ std::ofstream dst_stream(bin_name, std::ios::out | std::ios::binary | std::ios::trunc );
#endif
if (dst_stream.fail()) {
- cerr << "ERROR: unable to open file '"+bin_name+"' for writing\n";
+- cerr << "ERROR: unable to open file '"+bin_name+"' for writing\n";
++ std::cerr << "ERROR: unable to open file '"+bin_name+"' for writing\n";
+ return 20;
+ }
+
+@@ -544,12 +544,12 @@ int main( int argc, const char ** argv )
+ dst_stream.write( (char *)resobj.body, (resobj.body.length()+1)>>1 );
+ if (dst_stream.fail()) {
+ #endif
+- cerr << "ERROR: write to file '"+bin_name+"' failed\n";
++ std::cerr << "ERROR: write to file '"+bin_name+"' failed\n";
+ return 20;
+ }
+
+ if (verbose) {
+- cerr << "wrote '" << bin_name << "', " << resobj.body.length() << " nibbles, "
++ std::cerr << "wrote '" << bin_name << "', " << resobj.body.length() << " nibbles, "
+ << shlibs.length() << " shared libraries, " << resobj.relocs.length()
+ << " relocs.\n";
+ }
diff --git a/devel/hp48xgcc/files/patch-class+resolve.cc b/devel/hp48xgcc/files/patch-class+resolve.cc
new file mode 100644
index 000000000000..c6316e2fca7e
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+resolve.cc
@@ -0,0 +1,68 @@
+--- class/resolve.cc.orig 1995-06-24 08:36:34.000000000 +0400
++++ class/resolve.cc 2013-10-09 13:46:12.000000000 +0400
+@@ -1,7 +1,7 @@
+
+ #include "clld.h"
+
+-#include <iostream.h>
++#include <iostream>
+ #include <set_error.h>
+
+ int resolve_references (List<InternalObjectFile> & obs, List<CodeImport> & cimports,
+@@ -42,7 +42,7 @@ int resolve_references (List<InternalObj
+
+ if (foundexp) {
+ if (foundexp->isfloat) {
+- cerr << "sorry, external floating point symbols not supported, yet.\n";
++ std::cerr << "sorry, external floating point symbols not supported, yet.\n";
+ searchob = (ListItem<InternalObjectFile> *)0;
+ break;
+ }
+@@ -51,7 +51,7 @@ int resolve_references (List<InternalObj
+ if (searchob->shared) {
+ searchob->ShLibNumber = aktshlibnum++;
+ if (aktshlibnum >= 45) {
+- cerr << "ERROR: maximum number of shared libraries exceeded -\n"
++ std::cerr << "ERROR: maximum number of shared libraries exceeded -\n"
+ " use '-static' on one or more of your libraries\n";
+ searchob = (ListItem<InternalObjectFile> *)0;
+ break;
+@@ -64,7 +64,7 @@ int resolve_references (List<InternalObj
+
+ if (aktob->shared) {
+ if (foundexp->numerical) {
+- cerr << "ERROR: shared-library imports must be resolved by non-numerical\n"
++ std::cerr << "ERROR: shared-library imports must be resolved by non-numerical\n"
+ " symbols. Violated by symbol '" << aktimp->name << "',\n"
+ " imported by shared-library '" << aktob->name << "',\n"
+ " exported by object '" << searchob->name << "'.\n";
+@@ -118,7 +118,7 @@ int resolve_references (List<InternalObj
+ add_error("WARNING: symbol '"+aktimp->name+"', imported by\n"
+ " object-file '"+aktob->name+"', exported by\n"
+ " object-file '"+searchob->name+"' with invalid value","");
+- cerr << get_error();
++ std::cerr << get_error();
+ } else {
+ unsigned long long tmp = aktob->body.peek(aktimp->offset, aktimp->nibsize);
+ tmp += foundexp->ivalue;
+@@ -133,17 +133,17 @@ int resolve_references (List<InternalObj
+ if (! searchob) {
+ if (!shared) {
+ unrefs.insert(aktimp->name);
+- cerr << "ERROR: unable to resolve symbol '" << aktimp->name << "',\n"
++ std::cerr << "ERROR: unable to resolve symbol '" << aktimp->name << "',\n"
+ " referenced by object-file '" << aktob->name << "'\n";
+ if (unrefs.size() > 50) {
+- cerr << "ABORT, too many unresolved symbols\n";
++ std::cerr << "ABORT, too many unresolved symbols\n";
+ return -1;
+ }
+ result = -1;
+ } else {
+ // unreferenced symbol for shared library...
+ if (aktimp->nibsize < 5 || (! aktimp->reloc_demand) ) {
+- cerr << "ERROR: run-time imports for shared libraries must be\n"
++ std::cerr << "ERROR: run-time imports for shared libraries must be\n"
+ " non-numerical and >= 5 nibbles in size. This is\n"
+ " not the case with symbol '" << aktimp->name << "'\n"
+ " referenced by object-file '" << aktob->name << "'\n";
diff --git a/devel/hp48xgcc/files/patch-objdump+Makefile b/devel/hp48xgcc/files/patch-objdump+Makefile
new file mode 100644
index 000000000000..de227001d517
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-objdump+Makefile
@@ -0,0 +1,18 @@
+--- objdump/Makefile.orig 1996-11-08 16:26:58.000000000 +0300
++++ objdump/Makefile 2013-10-09 13:51:17.000000000 +0400
+@@ -1,12 +1,12 @@
+
+-CC = gcc
+-CFLAGS = -O2 -Wall -g
++CC ?= gcc
++CFLAGS ?= -O2 -Wall -g
+
+
+ all: objdump
+
+ objdump: objdump.o disasm.o
+- gcc -O2 -Wall objdump.o disasm.o -o objdump
++ $(CC) -O2 -Wall objdump.o disasm.o -o objdump
+
+ objdump.o: objdump.c disasm.h bool.h
+ $(CC) $(CFLAGS) -c $< -o $@
diff --git a/devel/hp48xgcc/files/patch-objdump+bool.cc b/devel/hp48xgcc/files/patch-objdump+bool.cc
new file mode 100644
index 000000000000..5804379b2ed3
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-objdump+bool.cc
@@ -0,0 +1,25 @@
+--- objdump/bool.cc.orig 1995-06-24 08:37:24.000000000 +0400
++++ objdump/bool.cc 2013-10-09 13:50:33.000000000 +0400
+@@ -1,17 +1,17 @@
+-#include <iostream.h>
++#include <iostream>
+
+-main ()
++int main (void)
+ {
+ switch (sizeof (bool))
+ {
+ case 1:
+- cout << "typedef unsigned char bool;\n";
++ std::cout << "typedef unsigned char bool;\n";
+ break;
+ case 2:
+- cout << "typedef unsigned short bool;\n";
++ std::cout << "typedef unsigned short bool;\n";
+ break;
+ case 4:
+- cout << "typedef unsigned long bool;\n";
++ std::cout << "typedef unsigned long bool;\n";
+ break;
+ }
+ }