-----BEGIN PGP SIGNED MESSAGE-----
Hi again,
it turns out that the magic word is squangle:
<from the gcc-2.95.3 FAQ>
How to work around too long C++ symbol names? (-fsquangle)
If the standard assembler of your platform can't cope with the large
symbol names that the default g++ name mangling mechanism produces,
your best bet is to use GNU as, from the GNU binutils package.
Unfortunately, GNU as does not support all platforms supported by
egcs, so you may have to use an experimental work-around: the
-fsquangle option, that enables compression of symbol names.
Note that this option is still under development, and subject to
change. Since it modifies the name mangling mechanism, you'll need to
build libstdc++ and any other C++ libraries with this option enabled.
Furthermore, if this option changes its behavior in the future, you'll
have to rebuild them all again. :-(
This option can be enabled by default by initializing
`flag_do_squangling' with `1' in `gcc/cp/decl2.c' (it is not
initialized by default), then rebuilding egcs and any C++ libraries.
<>
Thanks to
Achim Bohnet <ach_at_mpe.mpg.de>
Dan Riley <dsr_at_mail.lns.cornell.edu>
|=>
|=>
|=> Hi folks,
|=>
|=> Two replies told me that I was using the debugger flag -g during
|=> compilation.
|=> I'm sorry for the confusion, but I simply included the wrong
|=> error message files, so I'll include the correct one now.
|=>
|=>
|=> - -------------------
|=> One hint from Achim Bohnet<ach_at_mpe.mpg.de> with simple code
|=> producing the same result:
|=>
|=>
|=> o06(0) ~/tmp > cat toobig.cc
|=>
|=>
|=> // toobig.cc
|=> #include <string>
|=> #include <map>
|=> int main(int argc, char** argv)
|=> {
|=> map<string, map<string, string > > foo;
|=> return 0;
|=> }
|=>
|=> o06(0) ~/tmp > gcc -c toobig.cc || echo okay
|=> o06(0) ~/tmp > gcc -g -c toobig.cc || echo okay
|=> mips-tfile, /tmp/cc0ngbLD.s:279 String too big (5542 bytes)
|=>
|=>
|=> - --------------
|=> Rob McCauley <robmccau_at_RadOnc.Duke.EDU> also noticed:
|=>
|=> - -g is the gcc/g++ option to generate debugging code. According to your
|=> command line, you *are* asking for it.
|=>
|=> I've had the same problem, usually when using hash_map<...>. I think it
|=> has since stopped, although much to my own disappointment, I didn't notice
|=> at the time what changed. Anyway, drop the "-g" option, and you'll be
|=> able to compile.
|=>
|=>
|=>
|=> - --------------
|=> Still my problem remains, and I don't see any workaround yet.
|=>
|=> - --original Question:
|=>
|=> I need one of the above compilers to create some foreign code,
|=> and I run into the following problem:
|=>
|=> the assembler tells me "line too long" and several oyther
|=> messages on one file, with assembler code generated for
|=> debugging.
|=> (see app. 1 for compiler flags and error message)
|=>
|=> I do not use any debug options on the program, so where is this
|=> code generated ?
|=>
|=> Does anyone know a workaround or a means to suppress the
|=> generation of debug code ?
|=> (see app.2,3 for program code, all other includes are either
|=> system or used in other, working programs as well)
|=>
|=> Tschüß,
|=> Dieter
|=>
|=> _____________________________*__________________________________
|=> / * dieter.meinert_at_aip.de \
|=> \ Dieter Meinert (- **
http://www.aip.de/~dieter/ \
|=> \__________________A______*__*___________________________________/
|=> (public pgp key from
http://www.aip.de/~dieter/)
|=>
|=> ===Excerpt from File build_log===
|=>
|=> ...
|=>
|=> g++ -c -Wall -W -Werror -DNAGf90Fortran -fPIC -DUSE_POPUP -imacros /vol/.src4/sas/xmmsas_20010624_1841/config.h -I/vol/.src4/sas/xmmsas_20010624_1841/include -I/vol/.src4/sas/xmmsas_20010624_1841/include/utils -I. SuppressHandler.cc
|=> as0: Warning: SuppressHandler.cc, line 6: Line too long
|=> .align 5Zt24__default_alloc_template2b0i0Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt10_Select1st1Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt4less1Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt9allocator1ZiRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0
|=> as0: Warning: SuppressHandler.cc, line 6: Line too long
|=> .ent __t4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiRCt4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_allo!
c_t!
|=> em!
|=> plate2b0i0ZiZRt4pair2ZCt12basic_
|=> strin
|=> as0: Error: SuppressHandler.cc, line 6: undefined assembler operation: __t4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiRCt4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt!
12b!
|=> as!
|=> ic_string3ZcZt18string_char_trai
|=> ts1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt
|=> as0: Warning: SuppressHandler.cc, line 6: Line too long
|=> ldgp $29,0($27)_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiRCt4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt
|=> as0: Error: SuppressHandler.cc, line 6: undefined assembler operation: $__t4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiRCt4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZC!
t12!
|=> ba!
|=> sic_string3ZcZt18string_char_tra
|=> its1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZ
|=> as0: Warning: SuppressHandler.cc, line 6: Line too long
|=> $LFE29:r_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiRCt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zi
|=> as0: Warning: SuppressHandler.cc, line 6: .ent/.end block never defined the procedure name
|=> make[6]: *** [SuppressHandler.o] Error 1
|=> make[6]: Leaving directory `/vol/.src4/sas/xmmsas_20010624_1841/packages/error/src'
|=> make[5]: *** [libs.here] Error 2
|=> make[5]: Leaving directory `/vol/.src4/sas/xmmsas_20010624_1841/packages/error/src'
|=> make[4]: *** [bin] Error 2
|=> make[4]: Leaving directory `/vol/.src4/sas/xmmsas_20010624_1841/packages/error'
|=>
|=>
|=> ===File SuppressHandler.cc===
|=> // -*-C++-*-
|=> //
|=> // File: SuppressHandler.cc
|=> // Author: Jorgo Bakker (jbakker_at_astro.estec.esa.nl)
|=> // Generated: Mon Nov 6 10:05:12 MET 2000
|=>
|=> #include "SuppressHandler.h"
|=> #include <freezestream.h>
|=> #include <cstdlib> // getenv
|=>
|=>
|=> SuppressHandler::SuppressHandler() :
|=> _all(false),_number(-1)
|=> {
|=> /* check the environment: if set, silence all warnings */
|=>
|=> if(getenv("SAS_SUPPRESS_WARNING") != 0) {
|=> string c;
|=> strstream ss;
|=> ss << getenv("SAS_SUPPRESS_WARNING");
|=> while (ss >> c) ignore(c);
|=> }
|=> }
|=>
|=> SuppressHandler::~SuppressHandler()
|=> {
|=> }
|=>
|=> void SuppressHandler::ignore(const Code& c)
|=> {
|=> int counter=-1;
|=> {
|=> strstream ss;
|=> ss << c;
|=> ss >> counter;
|=> }
|=>
|=> if (c.empty() || counter == 0) _all=true;
|=> else if (counter > 0) _number=counter;
|=> else _list[c]=1;
|=> }
|=>
|=> void SuppressHandler::allow (const Code& c)
|=> {
|=> int counter=-1;
|=> {
|=> strstream ss;
|=> ss << c;
|=> ss >> counter;
|=> }
|=>
|=> if (c.empty() || counter == 0) {
|=> _all=false;
|=> _list.clear();
|=> }
|=> else if (counter > 0) _number=counter;
|=> else _list.erase(c);
|=> }
|=>
|=> bool SuppressHandler::suppress(const Code& c)
|=> {
|=> int number= ++_map[c];
|=>
|=> // ignore all?
|=> if (_all) return true;
|=>
|=>
|=> // ignore registered code?
|=> if (_list[c]) return true;
|=>
|=>
|=> // ignore after n times?
|=> if (_number > -1) return ( (number > _number)?true:false );
|=>
|=> // default
|=> return false;
|=> }
|=>
|=> string SuppressHandler::statistics()
|=> {
|=> ostrstream ss;
|=> bool silenced=false;
|=> string s;
|=>
|=> for (map<Code,int>::iterator it=_map.begin();it != _map.end();it++) {
|=> int number=0;
|=>
|=> // count the number of times a warning is silenced
|=> if (_all) number=(*it).second;
|=> else if (_list[(*it).first]) number=(*it).second;
|=> else if (_number > 0) number=(*it).second - _number;
|=>
|=> if ( number > 0 ) {
|=> ss << "\n warning " << (*it).first
|=> << " silently occurred " << number << " times";
|=> silenced=true;
|=> }
|=> }
|=>
|=> if (silenced) {
|=> ss << ends;
|=> s=freezestream(ss);
|=> }
|=> return s;
|=> }
|=>
|=> void SuppressHandler::reset()
|=> {
|=> _map.clear();
|=> }
|=>
|=> string SuppressHandler::options()
|=> {
|=> ostrstream ss;
|=>
|=> if (_all) {
|=> ss << " -w";
|=> }
|=> else {
|=> // specify all codes that need to be silenced by default
|=> for (map<Code,int>::iterator it=_list.begin();it != _list.end();it++)
|=> if ((*it).second) ss << " -w " << (*it).first;
|=>
|=> // specify # warnings
|=> if (_number > -1) ss << " -w " << _number;
|=> }
|=> ss << ends;
|=>
|=> return freezestream(ss);
|=> }
|=> ============================================================
|=>
|=> ===File SuppressHandler.h===
|=> // -*-C++-*-
|=> //
|=> // File: SuppressHandler.h
|=> // Author: jbakker
|=> // Generated: Tue Feb 8 17:35:17 MET 2000
|=>
|=> #ifndef SuppressHandler_h
|=> #define SuppressHandler_h
|=>
|=> #include "Msg.h"
|=>
|=> #include <string>
|=> #include <map>
|=>
|=>
|=> class SuppressHandler
|=> {
|=> public:
|=> SuppressHandler();
|=> ~SuppressHandler();
|=>
|=> /* adds Code to the list of ignored Codes. Note:
|=> - Code can be a string "NoAttitudeData"
|=> - Code can be empty (""), meaning all Code must be ignored
|=> - Code can contain a number ("N"), meaning after N occurences, all Code
|=> must be ignored
|=> */
|=> void ignore(const Code& c);
|=>
|=> /* removes Code from the list of ignored Codes. Note:
|=> -if Code is empty (""), we go back to default state
|=> -if Code is a number ("N"), allow N Codes to appear
|=> */
|=> void allow(const Code& c);
|=>
|=> /* true if we want to show this message */
|=> bool suppress(const Code& c);
|=>
|=> /* create statistics skipped Codes */
|=> string statistics();
|=>
|=> /* reset the internals to its starting state (with possible Codes set) */
|=> void reset();
|=>
|=> /* create s string of command line switches */
|=> string options();
|=>
|=> protected:
|=> // only derived classes can use these
|=>
|=> private:
|=> // member functions
|=> SuppressHandler(const SuppressHandler&); // copy constructor (disabled)
|=> SuppressHandler& operator=(const SuppressHandler&); // assignment (disabled)
|=>
|=>
|=> // member data
|=> map<Code,int> _map; // statistics
|=> map<Code,int> _list; // all codes that need to be shut up
|=> bool _all; // is set when all warnings must be silenced
|=> int _number; // number of times any warning may occur before
|=> // it is silenced
|=> };
|=>
|=>
|=>
|=> #endif
|=> ============================================================
|=>
Tschüß,
Dieter
_____________________________*__________________________________
/ * dieter.meinert_at_aip.de \
\ Dieter Meinert (- **
http://www.aip.de/~dieter/ \
\__________________A______*__*___________________________________/
(public pgp key from
http://www.aip.de/~dieter/)
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1
iQCVAwUBO0QqgPYksnFoaQ6JAQG3JQP/bLQuiu8SKx2o91H8O08Qh77v0qzqJdKl
kxmndieh6mec6j9JVBPZFCEBzEeDySONjNOkrvUTGIPW95B0tz+5wqAL1IuS+ixn
ME08ElDMCCpgyxo7YK0oNRK5Ya8g3eyQ1v9OUAf6f9sc9VJtspkwzFjnBXZuZncu
6JcCHkLNr7k=
=9pQb
-----END PGP SIGNATURE-----
Received on Thu Jul 05 2001 - 08:52:28 NZST