Contents|Index|Previous|Next
Issues from Previous Releases
The following documentation discusses issues from previous releases. Though
they are not necessarily related to problems, the discussions may help provide
advice if you run into problems with the current release.
Libraries not thread-safe
Programs not available on some platforms
PowerPC support
tr utility
Linking with libg++
expect generates bad results in an Emacs buffer
m68k toolchains issues
VxWorks installation option, --fixincludesdir
gcc issues
g++ issues
gdb issues
gas issues
ld issues
-gstabs+ gives better C++ COFFdebugging
Options for CPU 32 and CPU 32+ targets
Debugging remote connections
Requirements for MS-DOS
DEL does not work in MS-DOS info
Notes on rebuilding from source
Libraries not thread-safe
Please note that none of the libraries in this or previous releases is
thread-safe.
Programs not available on some platforms
DEC Alpha running Digital Unix (formerly OSF/1)
GNUPro Toolkit does not include a linker (ld) for the Alpha. The native linker is used.
SGI
Irix
GNUPro Toolkit requires the operating system vendor’s C library and include
files in a native configuration. The SGI 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.
HP
9000/700 native
GNU ld is not included for the HP700 in the native configuration.
PowerPC support
The following support enhancements were made to both the powerpc-aix and powerpc-eabi.
Targets added
Support was added for -mcpu=505, -mcpu=602, -mcpu=860,
-mcpu=821, and -mcpu=power2.
New default
The default PowerPC model is now 604, not 601.
-mtune=xxx
-mtune=xxx was added to select scheduling parameters such as
-mcpu=xxx, but not to select use of cpu specific instructions.
--with-cpu=xxx
If you configure and build the compiler, the switch, --with-cpu=xxx, will allow you to select the default processor.
Instruction timings
Instruction timings have been improved.
__attribute__((longcall))
__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.
Combined nor and compare instructions
The compiler now generates correct code for a nor instruction combined with a compare instruction.
The following enhancements were made only to the powerpc-eabi support.
-msdata switch
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.
long long
long long now passes according to the System V/EABI specs, (in other words, they always
pass in odd/even register pairs, never even/odd).
prolog and epilog
Code was changed for the functions prolog and epilog so that references beyond the end of the current stack pointer never generate.
New assembler support
The assembler added support for generating negative address, GOT, PLT, and small data, relative to section start relocations.
New linker support
The linker added support for negative address, GOT, and small data, relative to section start relocations. Right now, PLT
relocations are not handled.
AIX 4.1 default
This enhancement was made only to the powerpc-aix support. The default for AIX 4.1 was changed to -mcpu=common. This replaces the default of the machine on which the compiler was
configured (either Power or PowerPC)
PowerPC simulator must be built with GCC
The PowerPC simulator must be built with gcc. It uses several gcc extensions, as well as requiring an ISO standard compiler. If you configure
your powerpc-eabi build without using gcc, it will not build the simulator.
tr utility
When rebuilding from source on an AIX platform, please note that on some
versions the tr utility in ‘/usr/ucb’ has a bug. You must ensure that the PATH you are using 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.
Linking with libg++
Keep in mind the following two issues when linking with libg++:
Symbols referenced by the shared library that wouldn’t be referenced linking
with the static library, specifically the curses functions.
Finding a shared library at run-time is a problem with the (default) C++
library
libstdc++ as well as with libg++.
The fixes for the first issue use one of the following attributes.
Don’t link with libg++ (if using g++, use c++ instead).
Link with
-lcurses (and possibly -ltermcap).
Remove or rename completely the shared libraries under the installation
directory (‘
/usr/progressive/lib/libg++.s*’ and ‘/usr/progressive/lib/libstdc++.s*’).
Link with
-static to avoid using any shared libraries.
The fixes for the second issue use the following attributes.
Add ‘/usr/progressive/lib’ to your LD_LIBRARY_PATH environment variable.
Use the appropriate option when linking:
For Solaris:
...-R/usr/progressive/lib...
For DEC Unix/OSF1 and Irix 5:
...-Wl, -rpath,/usr/progressive/lib...
Remove or rename completely the shared libraries under the installation
directory (‘/usr/progressive/lib/libg++.s*’ and ‘/usr/progressive/lib/libstdc++.s*’).
Link with
-static to avoid using any shared libraries.
Note:
The library directory, ‘
/usr/progressive/lib’, may be different if you have installed GNUPro Toolkit in a non-standard location. This directory can also be thought of as ‘$GCC_EXEC_PREFIX/../’ if you are using ‘GCC_EXEC_PREFIX’.
expect generates bad results in an Emacs buffer
If you run dejagnu in an Emacs shell buffer, expect will generate incorrect results for pass-fail.
m68k toolchains issues
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.
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.
Debugging
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.
Other toolchains
This conversion facility is available for other toolchains, but the binaries
built by Cygnus Solutions do not provide it. To use it, you must rebuild the
programs from source, as described in Rebuilding From Source in GNUPro Advanced Topics.
Running the configure script, add ‘
--enable-targets=CPU-ieee’, where CPU is the CPU type you are using (such as i960). Cygnus Solutions has not tested
the convertor for processors other than the m68k.
VxWorks installation option, --fixincludesdir
‘--fixincludesdir’ is used to specify the directory used for the ‘fixincludes’ portion of the installation.
If this option is not specified, a warning message is generated that tells the
user how to rerun the
Install script with this option. This option is only required for those customers
installing tools for a VxWorks target needing to run ‘fixincludes’ on include files.
gcc issues
Redirecting the output of
gcc
In order to redirect the output of gcc to a file, add the text, 2r1, to the GO32 environment variable. Use the following input, for example.
set go32=“2r1”
You can then redirect the output on the command line. Use the following input,
for example.
gcc -v hello.c >gcc.out
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.
g++ issues
g++ now uses a new implementation of templates. The basic idea is that now
templates are minimally parsed when seen and then expanded later. This allows
conformant early name binding and instantiation controls, since instantiations no
longer have to go through the parser.
What you get:
Inlining of template functions works without any extra effort or modifications.
Instantiations of class templates and methods defined in the class body are
deferred until they are actually needed (unless
-fexternal-templates is specified).
Nested types in class templates work.
Static data member templates work.
Possible problems:
Types and class templates used in templates must be declared first, or the
compiler will assume they are not types, and fail.
Similarly, nested types of template type parameters must be tagged with
typename.
Syntax errors in templates that are never instantiated will now be diagnosed.
Synthesized methods are now 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 now supported.
-Wall no longer implies -W.
The new warning flag,
-Wsign-compare, included in -Wall, warns about dangerous comparisons of signed and unsigned values. Only the
flag is new; it was previously part of -W.
The new flag,
-fno-weak, disables the use of weak symbols.
The type
_ _attribute_ _ directive is now 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) as it did before.
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 now supported.
Use the following source code, as an example.
struct A {
struct B;
B* bp;
};
struct A::B {
int member;
};
Explicit instantiation of template constructors and destructors is now
supported. For example:
template A<int>::A(const A&);
HPPA
-mspace
All HPPA targets now support the -mspace option, which is experimental code aimed at reducing the size of a program at
the expense of increasing execution time.
Classes that do not define a copy constructor
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.
gdb issues
The debugger, GDB, has had many bug fixes, particularly in the support of various remote targets.
For the complete matrix of supported hosts and targets, see Native Configurations Supported, Embedded Configurations Supported, and Specific Processor Support by Family. Also, for particular tools and their targets, see GNUPro Tools for Embedded Systems. Contact Cygnus Solutions if you have any questions.
WinGDB for the Hitachi SH and H8/300
WinGDB (in ‘bin/wingdb.exe’ on DOS-hosted installs) for the Hitachi SH and H8/300 targets now contain
support for the e7000 unit.
GDB has been modified to properly debug executables that were compiled with the
Cfront C++ version 2 compiler.
HPUX 10.01 is now supported.
GDB now includes support for the Apple Macintosh, as a host only.
GDB can be run as either an MPW tool or as a standalone application, and it can
debug through the serial port. All of the usual GDB commands are available, but you must supply ‘
serial’ as the device type to the target command, instead of ‘/dev/ttyXX’. Use the following example’s input.
target serial
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.
PowerPC configuration now includes a simulator contributed by Andrew Cagney.
Use
target sh3 for support for the Hitachi SH3 monitor 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 GDB when an empty command is entered.
The symbol reader for AIX 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
remotedelay option is set by default to 1. Loading executables can be considerably slower with remotedelay set 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 the following example’s input.
set remotedelay 0
gas issues
GAS now supports macros without requiring GASP.
GAS now supports the
-M or --mri option, permitting the assembly of MRI-format assembler files.
The SunOS assembler is now able to assemble PIC code.
ld issues
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 COFF linker now automatically combines
struct, union, and enum debugging information, so that the information only appears once in the
output file. This only applies when using COFF debugging information, as opposed to stabs.
The SunOS linker is now able to create shared libraries.
-gstabs+ gives better C++ COFF debugging
If you use the GCC option, ‘-gstabs+’, GCC embeds extended debugging information in COFF object files. (The extended debug information is based on the stabs debugging 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 Solutions for more information.) With this additional
debugging information, you can debug C++ programs with GDB, even on systems that use COFF.
You can get better C++ debugging by compiling with ‘
-gstabs+’ for the following targets: a29k-amd-udi, h8300-hms, m68k-coff, m88k-coff, sh-hms, and z8k-coff.
Options for CPU 32 and CPU 32+ targets
The Motorola CPU32 and CPU32+ targets are part of the family of 68000 chips which Cygnus Solutions.
There are a few options to help you compile code for these targets.
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 CPU32 chip.)
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.
GNU
as accepts the following board-specific options: -mcpu32, -m68331, -m68332, -m68333, -m68340, and -m68302.
Contact Cygnus Solutions for more information on our support for CPU32 and CPU32+ targets.
Debugging remote connections
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 debugger and 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 remotedebug command is now consistent among the MIPS remote target; remote targets using the gdb-specific protocol; UDI (the AMD debug protocol for the 29k); 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 the MIPS target). See “GDB and remote MIPS boards” in Debugging with GDB in GNUPro Debugging Tools for details.
Requirements for MS-DOS
The GNUPro Toolkit is only supported on MS-DOS 6.2 or higher. We do not recommend using the cross-development kit with less
than four (4) megabytes of RAM.
We provide a MS-DOS extender with the cross-development kit for MS-DOS which does swapping to disk when MS-DOS runs out of memory. To avoid excessive swapping you must have at least two (2)
megabytes of RAM to run
g++ on a PC with MS-DOS. If you’ve got more than two megabytes, the extra memory can be used as a disk
cache to significantly improve performance.
DEL does not work in MS-DOS info
GNU info, the online documentation browser, is available in our MS-DOS distribution. Unfortunately, the DOS version of info, INFO.EXE, does not recognize the DEL key. This key is normally used for paging backwards within a node in info. As a workaround, you can page backwards by using the keystroke sequence, ESC v .
Notes on rebuilding from source
Details on rebuilding specific platforms and features are shown in the
following discussions.
Need to upgrade XLC to rebuild on AIX 3.2.x
Use --with-gnu-as when configuring MIPS
Rebuilding the tools under Solaris 2
Multiple object code formats
See Rebuilding From Source in
GNUPro Advanced Topics for more detailed instructions.
Need to upgrade XLC to rebuild on AIX 3.2.x
There is a reported problem in rebuilding GNUPro Toolkit using IBM native tools. (This problem does not crop up if you use gcc to rebuild the tools.) On the RS/6000, XLC version 1.3.0.0 miscompiles ‘jump.c’. XLC version 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.X.
Use --with-gnu-as when configuring MIPS
If you rebuild the entire GNUPro Toolkit from source, top-level configuration
files handle the following configuration detail for you automatically. But if
you rebuild the compiler alone for a MIPS target, we highly recommend that you specify ‘--with-gnu-as’ on the command line for configure. This avoids an incompatibility between the GNU assembler, as, and the MIPS assembler. The MIPS assembler does not support debugging directives, and gcc uses a special program, mips-tfile, to generate them.
GNU
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 GNU ld, be sure to specify ‘--with-gnu-ld’ when you rebuild on any platform for which the linker is available.
Rebuilding the tools under Solaris 2
If you wish to rebuild the tools from source on your SPARC system running Solaris 2, you can use either the original Solaris 2
native-development binaries from the GNUPro Toolkit or the unbundled compiler sold
separately by Sun.
Warning:
You might notice that there is a program called ‘/usr/ucb/cc’ and be tempted to use it. Don’t. This program is incompatible with the real
compiler, which is in ‘/opt/SUNWspro/bin/cc’.
Multiple object code formats
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. Use the following example’s input, for instance.
./configure --enable-targets=m68k-coff,i386-elf,decstation
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.