The following documentation
discusses issues from previous releases. These issues can provide clues
that may help if you run into problems with the current release.
The following discussions address some
general issues that apply to the GNUPro tools for previous releases, affecting
many different environments and usage requirements.
No tapes
or floppy disks shipped by default. The
installation media is now CD format.
None of the libraries were
thread-safe.
Some tools were not available for the following
platform environments.
GNUPro Toolkit did not include a linker (ld)
for the DEC Alpha running Digital
Unix (formerlyOSF/1). The
native linker was the default.
GNUPro Toolkit required the SGI
Irix operating system's C library and include files in a native configuration.
TheSGI Irix operating system does not contain these files by default,
but they are included in a separate developer's package. You cannot use
the GNUPro Toolkit without this package.
GNUld was not included for
the HP 9000/700native
in the native configuration.
If you ran dejagnuin
an Emacs shell buffer, expectgenerated
incorrect results for pass-fail.
Finding a shared library at run-time was a
problem with the (default) C++ library, libstdc++,
as well as with libg++.
ffb
Fixes used the following attributes.
Added '/usr/progressive/lib' to LD_LIBRARY_PATH
environment variable.
Used the following appropriate option when
linking:
For Solaris:
...-R/usr/progressive/lib...
For DEC Unix/OSF1 and
Irix 5:
...-Wl,
-rpath,/usr/progressive/lib...
Removed or renamed completely the shared libraries
under the installation directory ('/usr/progressive/lib/libg++.s*
' and '/usr/progressive/lib/libstdc++.s* ').
Linked with -static to avoid using
any shared libraries.
The library directory, '/usr/progressive/lib
', was different if GNUPro Toolkit was installed in a non-standard location.
This directory was thought of as '$GCC_EXEC_PREFIX/../ ' if using
'GCC_EXEC_PREFIX '.
After rebuilding
from source, in order to report problems,
a user reran install-sidin
order to reset customer-id in send-pr.
Previously, the default value was the value in the send-pr program
in a path at the time of configuration.
The following issues were
pertinent to the PowerPC environment.
Added '/usr/progressive/lib' to LD_LIBRARY_PATH
environment variable.
-mno-fused-madd was a new option,
preventing the compiler from combining a floating point multiply with an
addition or subtraction. Generally, the compiler would do this optimization,
if it was important to get the exact rounding as specified by the IEEE
754 floating point standard (on the Power and PowerPC machines, the combined
multiply and add/subtract instruction does not do a round operation between
the multiply and the addition/subtraction).
The -mcpu=403 switch
did a -mstrict-align operation, since the 403 had no support for
unaligned memory operations.
With the previous release, better
code was generated when adding or doing logical operations with large constants.
Two new switches, -mads
and -myellowknife, were added to the powerpc-eabi toolchain.
The -mads switch links in the appropriate
libraries for the Motorola ADS target boards (860/821/823).
-myellowknife, theother
switch, links in the appropriate libraries for the Motorola Yellowknife
target boards (603e/604e).
Jump tables, for
switch statements, were in the .rodata section, and not the .text
ffb
section, so it wasn't necessary to include the text section in the data
address mapping.
wchar_t became 4 bytes instead of
2 (and "a"l -strings consisted of 4 byte characters instead
of 2).
The -mregnames switch was only passed
to the assembler for assembling .s and .S files (i.e.,
it was not passed to the assembler when assembling the output of the compiler).
This is so that global symbols like "r0" in C code wouldn't get
confused with register names.
PowerPC configuration
included a simulator contributed by Andrew Cagney.
The following support
enhancements were made to both the powerpc-aix and powerpc-eabi
configurations.
Support was added for -mcpu=505,
-mcpu=602, -mcpu=860, -mcpu=821, and -mcpu=power2.
The default PowerPC model is now 604,
not 601.
-mtune=xxx was added to select
scheduling parameters such as -mcpu=xxx, but not to select
use of cpu specific instructions.
If configuring and building the compiler, the
switch, --with-cpu=xxx, will allow for selecting the default
processor.
Instruction timings had been improved.
The compiler was set to generate correct code
for a nor instruction combined with a compare instruction.
__attribute__((longcall)) was added
to function attributes so that the function is now always called through
a pointer. This allows the function to be located anywhere in program memory.
The following enhancements
were made only to the powerpc-eabisupport.
The default PowerPC model is now 604,
not 601.
A new switch, -msdata was added to
put small static and global items in small data regions. This allows them
to be referenced with 1 instruction instead of 2.
longlong was set to pass
according to the System V/EABI specifications,
(in other words, they always pass in odd/even register pairs, never even/odd).
Code was changed for the functions prolog
and epilog so that references beyond the end of the current stack
pointer never generate.
The assembler added support for generating
negative address, GOT, PLT, and small data, relative to section
start relocations.
The linker added support for negative address,
GOT, and small data, relative to section start relocations. PLT
relocations were not handled.
An enhancement was made to the powerpc-aixsupport.
The default for AIX 4.1 was changed to -mcpu=common. This replaced
the default of the machine on which the compiler was configured (either
Power or PowerPC)
The PowerPC
simulator must be built with the gcc compiler. It uses several
gcc extensions, as well as requiring an ISO standa
ffb
rd compiler.
If you configure your powerpc-eabi build without using gcc,
it will not build the simulator.
The following issues are
pertinent to the m68kenvironments.
The m68k-aout and m68k-coff
toolchains now include support for converting executables files into IEEE-695
format. The IEEE-695 format is used by some emulators.
To convert a file,
first link your program into a fully linked executable. Then run the following
script.
m68k-coff-objcopy -O ieee --debugging file file.x
This converts a m68k-coff file
'file' into the IEEE-695 file, 'file.x'.
To
use the m68k-aout toolchain, m68k-aout-objcopy is the
corresponding tool.
The --debugging option directs objcopy
to translate debugging information into the IEEE-695 format. This option
only works if you use the stabs debugging format. The stabs
debugging format is the default for the m68k-aout toolchain.
For the m68k-coff toolchain, you must
compile your files using the option, -gstabs+ , rather than a
simple -g, in order to get stabs debugging information.
A conversion facility is available for other
toolchains, but the binaries built by Cygnus do not provide it. To use
it, you must rebuild the programs from
source, as described in Rebuilding
From Source in GNUPro Advanced Topics.
gcc has an option, '-m68332', to be used specifically
when compiling for the Motorola 68332 board. ( gcc also has an
updated option, -m68302. The 68302 technically isn't a cpu
32 chip.)
Running the configure script, add '--enable-targets=CPU-ieee',
where CPU is the processor type (such as i960). Cygnus had not
tested the convertor for processors other than the m68k .
The Motorola
cpu 32 and cpu 32+ targets are part of the family of 68000
chips, which Cygnus supports. There are a few options to help you compile
code for these targets.
It is also possible to configure gcc for a target of 'm68332-aout'
or 'm68332-coff' when rebuilding from source, in which case '-m68332'
is the default.
GNUas accepts the following board-specific
options: -mcpu32, -m68331, -m68332, -m68333,
-m68340, and -m68302.
Contact Cygnus for more
information on our support for cpu 32 and cpu 32+ targets.
C
and C++ compiler issues
There were several new warnings for the
GNU compil
ffb
er tools, gcc (C compiler)
and g++ (C++ compiler).
Member function templates have support.
This uses scripts, for instance, like
the following example.
struct S {
template <class T> operator T();
/* ... */
};
template <class T>
S::operator T()
{
/* ... */
}
main ()
{
S s;
int i = s;
void *p = s;
}
Explicit qualification of function
templates has support.
This uses statements, for instance, like the following example.
template <class T, class U> T implicit_cast (U u) { return u; }
int i = implicit_cast<int>(1.5);
As a result, guiding
declarations no longer have support. Function
declarations, including friend declarations, do not refer to template
instantiations. To restore the old behavior, use -fguiding-decls until
you fix your code. Broken code looks like the following example's script.
template <class T> struct A {
friend ostream& operator<< (ostream &, const A &);
/* ... */
};
template <class T> ostream&
operator<< (ostream &o, const A<T>& a)
{
/* ... */
}
main ()
{
A<int> a;
cout << a;
}
Two exception handling mechanisms are used.
One, which is supported
on all platforms, uses setjmp and longjmp to unwind stack
frames and slow down your code.
The second mechanism uses
DWARF2-format data to unwind stack
frames, and has no time impact on code that doesn't throw exceptions, but
does require that the unwind info be written out. The DWARF2-unwinder
is the default on systems where it is supported; setjmp/longjmp
is the default ev
ffb
erywhere else.
To select between the two,
use -fsjlj-exceptions , except, where the DWARF2 unwinder
is not supported, the old mechanism, EH , will be used. Turn EH
off with the flag, -fno-exceptions .
Standard usage syntax for the stdnamespace
is supported; std is treated as an alias for global scope. General
namespaces are still not supported.
The flag, -Wno-pmf-conversion, tells
the compiler not to warn about converting from a bound member
function pointer to function pointer.
A flag, -Weffc++,
is used for violations of some of the style guidelines in the "Effective
C++" books by Scott Meyers.
__FUNCTION__and
__PRETTY_FUNCTION__are treated
as variables by the parser; previously they were treated as string
constants.
Code like printf (__FUNCTION__ ": foo")
must be rewritten to be:
printf ("%s: foo", __FUNCTION__)
This is necessary for templates.
Local static variables in extern
inline functions will be shared between translation units.
-fvtable-thunks is supported for all targets, and is the default
for Linux with glibc 2.x (also
called libc 6.x).
A new flag, -Wold-style-cast, can
be used to warn if an old-style (C-style) cast is used within a C++ program.
hppa*-*-proelf(or a HP
PRO target) no longer includes floating point support by default. Therefore,
it is no longer necessary to include -msoft-float on either the
compilation or link line for these targets.
A public review copy of the December 1996 Draft
of the ANSI C++ Standardis available.
For PostScript and PDF (using Adobe Acrobat) versions, see the archives:
ftp://research.att.com/dist/c++std/WP. For HTML and ASCII versions,
use ftp://ftp.cygnus.com/pub/g++ or http://www.cygnus.com/misc//wp.
The overloadresolution
code was on by default. The old code could still be selected with -fno-ansi-overloading,
although this was not supported.
WARNING! By not invoking this option, installation
will fail.
The following issues may also be useful
to those users who are rebuilding from
previous releases of the GNU tools, mostly for the progressive-96q4
and the progressive-97r1 releases.
The overload
resolution code has been rewritten to
ffb
conform to the latest C++ Working
Paper.
Built-in operators are now considered as candidates
in operator overload resolution. Function template overloading chooses
the more specialized template, and properly handles base classes in type
deduction and guiding declarations. For those customers having the progressive-96q4
release, this code was not on by default and, so, they can use the -fansi-overloading
flag to turn on the overload resolution code. It is, starting with the
98r1 release, now on by default.
The GNU C++
driver ( g++ ) no longer links with libg++ by default;
it is now functionally identical to the C++ driver.
RTTI support has
been rewritten to work properly and is now on by default.
This means code that uses virtual functions
will have a modest space overhead, and will also depend on the RTTI support
library code in libstdc++ . This dependency is removed. Use the
-fno-rtti flag to disable RTTI support.
On ELF systems,
duplicate copies of symbols with initialized common linkage like template
instantiations, vtables, and extern inlines will now be discarded by the
GNU linker, so -frepo isn't necessary
Partial specialization of class
templates is now supported.
Synthesized destructors are no longer made
virtual just because the class already has virtual functions; it is only
if they override a virtual destructor in a base class. The compiler will
warn if this affects your code.
(void *)0 is no longer considered
a null pointer constant; NULL
in <stddef.h> is now defined as __null. This
is a magic constant of type,(void *) , normally, or (size_t)
with -ansi .
The new template <> specialization
syntax is now accepted and ignored.
The name of a class
is now implicitly declared in its own scope; for example, A::A
refers to A .
The STL code
is based on the free SGI version, which is more efficient and conformant
than the older HP distribution.
Default function arguments in templates will
not be evaluated (or checked for semantic validity) unless they are needed.
The -ftemplate-depth-NN flag can be
used to increase the maximum recursive template
instantiation depth, defaulting to 17. If you need to use this flag, the
compiler will tell you.
The internal interface between RTTI-using code
and the RTTI support library has changed,
so code that uses dynamic_cast should be recompiled. The RTTI
support library has moved from libstdc++ to libgcc, so you
no longer need to link against libstdc++ for a program that doesn't
use the "hosted" library.
bool is now always the same size as
another built-in type. Previously, a 64-bit RISC
target using a 32-bit ABI would have 32-bit pointers and a 64-bit bool
. This should not affect any supported platforms.
new (nothrow) is supported.
Some warnings were ad
ffb
ded for violation of style
guidelines.
g++ uses an implementation of templates
that are minimally parsed when seen and then later expanded. This allows
conformant early name binding and instantiation controls, since instantiations
no longer go through the parser.
What you get:
Instantiations of class templates and methods
defined in the class body are deferred until required (unless -fexternal-templates
is specified).
Nested types in class templates
work.
Static data member
templates work.
Possible problems:
Static data member
templates work.
Types and class templates used in templates
must be declared first, or the compiler will assume they are not types,
and fail.
Similarly, tag nested types of template type
parameters with typename .
Syntax errors in templates that are never instantiated
will now be diagnosed.
Synthesized methods are emitted in any translation
units that need an out-of-line copy. They are no longer affected by #pragma
interface or #pragma implementation .
Local classes
are supported.
The warning
flag, -Wsign-compare , included in -Wall , warns about
dangerous comparisons of signed and unsigned values; it was previously
part of -W .
The flag, -fno-weak , disables the
use of weak symbols.
The typedirective, __attribute__,
is supported.
-Woverloaded-virtual now warns if
a virtual function in a base class is hidden in a derived class, rather
than warning about virtual functions
being overloaded (even if all of the inherited signatures are overridden).
The compiler no longer emits a warning if an
ellipsis is used as a function's argument list.
Exception handling
support has been significantly improved, though optimization is still not
supported.
Definition of nested types outside of their
containing class is supported. Use the following source code, as an example.
struct A {
struct B;
B* bp;
};
struct A::B {
int member;
};
Definition of nested types outside of their
containing class is suppo
ffb
rted. Use the following source code, as an example.
Explicit instantiation of template
constructors and destructors is now supported. For example: template
A<int>::A(const A&);
All HPPA
targets support the -mspaceoption,
which is experimental code aimed at reducing the size of a program at the
expense of increasing execution time.
On the HPPA,
some classes that do not define a copy constructor will be passed and returned
in memory again so that functions returning those types can be inlined.
Debugger issues
The following issues pertain to the GNU
gdbdebugger.
The d10v-elf configuration
includes commands to collect and display trace data.
Use 'trace' to enable tracing, 'untrace' to disable,
'info trace' to describe the information collected in the trace
buffer, and 'tdisassemble' to display the list of instructions
that were executed.
gdb now supports the debugging of overlays.
Do 'help overlay' for more information. Example code may be found
in examples/overlay.
Embedded MIPS configurations
(such as mips-elf and mips-ecoff ) may use hardware breakpoints
and watchpoints when communicating with boards using PMON
(using the 'targetpmon' command).
You may now use gdb with the Macraigor
Systems "wiggler" and "OCD
serial box" devices. The target commands are 'target ocd wiggler lpt1'
(for PC hosts, for the wiggler device, only) and 'target ocd port'
(normal serial transport; /dev/ttya ... being the pathname for
addressing the variable argument for port ).
The powerpc-elf configuration
includes two new target protocols; 'target sds' is an SDS-compatible
protocol that is useful with Motorola's ADS821/860 boards, and 'target
dink32' works with Motorola systems running the DINK32 ROM monitor
(such as the embedded Yellowknife).
The 'set architecture'
command allows for an explicit choice of the processor
type being debugged, while 'info architecture' displays the current
target architecture. Most configurations presently support only a single
architecture.
The debugger was modified to properly debug
executables that were compiled with the Cfront
C++ version 2 compiler.
The debugger includes support for the Apple Macintosh,
as a host only. GDBcan be run as either an MPW tool or as a standalone
application, and it can debug through the serial port. All of the usual
debugger commands are available, but you must supply 'serial'
as the device type to the target command, instead of '/dev/ttyXX'.
Use target serial for input.
See 'mpw-README' in the main directory
for more information on how to build. The MPW
configuration scripts '*/mpw-config.in' support only a few targets,
and only the mips-idt-ecoff target has been completely tested.
Both m68k and PowerPC Macs are supported.
Use target ppcbug for support for
the PowerPC ppcbug monitor.
Use target sh3 for support for the Hitachi
SH3monitor ROM.
Use the auto-solib-add variable to
read in symbols from all shared libraries. If the value of auto-solib-add
is 1, then symbols from all shared libraries will be read in when
the program starts up. This is convenient if you want to reference a symbol
in a shared library without having to
stop in that library first, such as in setting a breakpoint. The default
value is 0 , which improves startup time.
NOTE:
The command shared library is always available
to load shared library symbols manually.
Use the command, dont-repeat, in user-defined
commands to defeat the auto-repeat of gdbwhen
an empty command is entered.
The symbol reader forAIX
gdb now uses partial symbol tables. This can greatly improve startup
time, especially for large executables.
When printing the type of a variable declared
with a typedef,gdb uses the typedef name if possible
instead of the typedef definition.
Performance is improved in MIPS
IDT debugging (MIPS targets),
both for stepping and for downloads.
The remotedelayoption
is set by default to 1. Loading executables can be considerably
slower with remotedelayset
to 1, but it gets around a loading bug on certain H8/300 boards.
To see a noticeable speed-up in loading when
you're not using an H8/300 board, set remotedelay to 0.
Use set remotedelay 0 as input.
A common hurdle in cross development is to
get the communications set up properly between the target board and the
development platform.
The debugger's 'set remotedebug'
command can help. It was designed to help develop new remote targets; it
displays the packets transmitted back and forth between the debuggerand the target environment. This command can be helpful in diagnosing
communications problems, for example, allowing you to observe packets not
getting through or picking up noise on the line.
The set remotedebugcommand
is now consistent among the MIPSremote target; remote targets using
thegdb-specific protocol;UDI(the AMDdebug protocol for
the 29k
ffb
); the 88k bug monitor; and Hitachi
ROM monitors. You can set it to an integer specifying a protocol-debug
level (normally 0 or 1 , but 2 means more protocol
information for theMIPStarget). See GDB
and remote MIPS boards in Debugging
with GDB in GNUPro Debugging Tools for details.
If you use the gcc option, '-gstabs+',
gcc embeds extended debugging information in coff object
files. The extended debug information is based on the stabsdebugging
format, which was originally used only with the a.out object file
format; see The stabs debug format,
in your sources as 'src/gdb/doc/stabs.texinfo', or contact Cygnus
for more information. With this additional debugging information, you can
debug C++ programs withgdb, even on systems that useCOFF. You can get better C++ debugging by compiling with '-gstabs+'
for the a29k-amd-udi, h8300-hms,
m68k-coff, m88k-coff,
sh-hms, and z8k-coff
targets.
Assembler issues
The following issues pertain to the GNU assembler,
gas.
The assembler now has an -alm option,
which can be used to list macro expansions.
The -alc option can be used to skip false
conditionals in listings.
The default objdumpdisassembly
format has changed. You can get the old format by using --prefix-addresses
.
The assembler
now supports macros without requiring the assembler's preprocessor, gasp.
gas now supports the -M or
--mrioption, permitting the assembly
of MRI-format assembler files.
The SunOS
assembler is now able to assemble PIC.
Linker
issues
The following issues pertain to the GNU linker,
ld.
The linker now accepts the --no-whole-archive
flag, to force it to not include the entire contents of an archive
file.
The -rpath-link option has been added
for SunOS and ELF
systems.
The COFFlin
ffb
ker now automatically combines struct,
union, and enumdebugging
information, so that the information only appears once in the output file.
This only applies when using COFFdebugging information, as opposed to stabs.
The SunOS linker is now able to create shared
libraries.
Rebuilding
issues
Details on issues with past releases about rebuilding
specific platforms and features are shown in the following discussions.
See Rebuilding
From Source in GNUPro Advanced Topics for more detailed
instructions.
When rebuilding
from source on an AIX platform, on some
versions, the tr utility in '/usr/ucb' has a bug. Make
sure the PATH for the build will make '/bin/tr' or '/usr/bin/tr'
available ahead of '/usr/ucb/tr'. This bug is fixed in AIX 4.1.4.
There is a reported problem in rebuilding GNUPro
Toolkit using AIX 3.2. x native tools. (This problem does not crop
up if you use gcc to rebuild the tools.) On the RS / 6000,
XLCversion 1.3.0.0 miscompiles 'jump.c'. XLCversion
1.3.0.1 or later fixes this problem. You can obtain xlc version
1.3.0.2 by requesting PTF 421749 from IBM. This is not relevant for AIX
4.1. 4.
Use --with-gnu-as when configuring
MIPS, if you rebuild the entire GNUPro
Toolkit from source.
Top-level configuration
files handle the configuration for you automatically. But if you rebuild
the compiler alone for a MIPStarget, we highly recommend
that you specify '--with-gnu-as' on the command line for configure.
This avoids an incompatibility between the assembler, as, and
theMIPSassembler. The MIPSassembler does not support
debugging directives, and gcc uses a special program, mips-tfile,
to generate them. as parses the debugging directives directly
without mips-tfile .
You should also specify '--with-stabs'
on the command line to configure. This provides better debugging
symbols, in particular for C++. If you
plan to use the linker, be sure to specify '--with-gnu-ld' when
you rebuild on any platform for which the linker is available.
WARNING!
There is a program called '/usr/ucb/cc'
that you should not use since it is incompatible with the real compiler
which is in '/opt/SUNWspro/bin/cc'.
As in previous releases, you can reconfigure
GNUPro Toolkit to support more than one object format. For detailed instructions,
see Rebuilding
From Source in GNUPro Advanced Topics.
To add support for more object file formats
(besides the format appropriate for the configured target), list the additional
targets as arguments to the configure option, --enable-targets
, separated by commas.
To find out what targets are available,
look in the file 'bfd/config.bfd'
in the source distribution. To configure the tools to support all available
object formats, use --enable-targets=all rather than listing
individual targets.
Starting with the 97r1 release, makehad
been altered to support the Win32 host
environment better. It now has two major modes of operation:
The default mode is to support native Win32
makefiles. In this mode, Makefile rules may use either backslashes or forward
slashes as filename directory separators. Makefile rules may invoke "del",
"copy", or other Win32 shell builtins
since makewill now invoke a
native Win32 subshell when necessary. Note that some programs like del
do not support filenames containing forward slash directory separators
so you probably want to use backslashes if you intend to use those types
of programs. make does not automatically convert forward slashes
to backslashes because doing so would break the use of the forward slash
as the option specifier for some Win32 programs.
For this mode to work correctly, the correct
Win32 subshell must be in your path (cmd.exe under Windows
NT or command.com under
Windows 95). When writing your makefiles, avoid the use of backslashes
as end of line continuation characters because Win32 shell commands like
"del" will interpret that backslash
as a reference to the root partition of the current drive! Finally, command
line lengths are limited to what's supported by the Win32 subshell: 255
characters under cmd.exe, 127 characters
under command.com.
An optional Unix compatibility mode to support
Unix-style Makefiles.
There are two ways to tell make to
operate in this mode: you can either set the environment variable,
MAKE_MODE, to "unix" before
running make or you can invoke make as "make--unix" (in this mode, backslashes
retain the usual Unix semantics and cannot be used in filenames
as directory separators; however, Win32 paths without backslashes are still
supported). Use of Bourne shell built-ins
is permitted but Win32 shell built-ins like del
and copy are unavailable. You must
provide a working
274
Bourne shell for this mode to work correctly. It should
be named "sh.exe"
and needs to be in your path so make can find it.
After rebuilding from source, it is now necessary
to rerun install-sidin order
to reset your customer-id in send-pr.
Previously, the default value was the value in the send-pr program
in your path at the time of configuration.