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.
There is a graphical user interface
for the GNU debugger called Cygnus Insight
(formerly known as GDBTk).
The malloc routines
in the embedded C library have been updated from earlier versions of the
GNU C compiler, gcc . The library includes a new header file,
<malloc.h> , and some useful new functions, including memalign
and mallinfo . The malloc routines now always call __malloc_lock
and __malloc_unlock to lock and unlock access to the memory pool.
The library provides default versions of these functions which do nothing;
if you invoke malloc from multiple threads, or reentrantly, you
should provide your own versions of these functions. See GNUPro
C Library in GNUPro Libraries for more details.
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++.
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 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 standard 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.
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 compiler
tools, gcc (C compiler) and g++ (C++ compiler).
GNUPro Toolkit includes the compiler,
egcs 1.0, which is similar to gcc 2.8.x.
There have been further enhancements
to the Global Common Sub-Elimination (gcse) routines in the libraries.
There have been improvements
to the general induction variable identification and elimination, along
with improvements to the loop invariant code motion.
There are now accurate warnings,
especially when using exception handling (such as when using uninitialized
variables, for example)
There is improved global constant
and copy propogation.
There are several new switches:
-Os (for optimizing space), -fmove-all-movables (for
forcing all invariant computations in loops to be moved outside the loop),
-freduce-all-givs (for forcing all general induction variables in
loops to be strength reduced), and -frerun-loop-opt (for rerunning
loop optimizations twice).
There is now partial redundancy
elimination with lazy code motion and critical edge splitting.
There is now global code hoisting
and unification.
For those users who've had to
use @file in their makefiles, the -@file is no longer
necessary. The @file option has the general standard usage whose
purpose is of replacing a string of text that represents a file's path
for a string of text of another file's path.
GNUPro Toolkit fully supports
the following functionality for the GNU C++ programming.
Thread-safe exception handling,
including nested exceptions and placement delete. operator new
now throws bad_alloc .
Member class templates.
Local classes in templates.
Template parameters.
Template friends.
Protected virtual inheritance.
Loop optimization improvements
(with the test at the end in more cases); for class D derived from B, which
has a member, int i , &D::i is now of type int
B::* instead of int D::* .
Compact name mangling with -fsquangle
. Future versions of the compiler may use the new mangling to indicate
a different, incompatible ABI. To use this, rebuild the libraries (including
libgcc ) with this option.
Member function and template
support.
Cygnus fully supports the m68k-elf
toolchain. An earlier version of m68k-elf that was previously
available is obsolete. Migrating to the new m68k-elf toolchain
will require rebuilding existing object files and modifying any existing
source code written in assembly language. Source code that was written
in C will not need to be changed.
Any
object files that were created with the old toolchain will not be link-compatible
with object files created with the new toolchain. Even if old object files
are successfully linked with new object files, they will not be compatible
at run-time, because the calling convention has changed. To circumvent
this problem, recompile all object files from their source code with the
new m68k-elf toolchain.
The
assembly language format expected by the new assembler has changed slightly
to make it more similar to the format of m68k-coff and m68k-aout
assembly language. Programs that are written in C do not need modification.
Programs written in assembly language will need to be modified in the following
ways:
The fp register must
be referred to instead as the a6 register. link %fp,&0
must be replaced with link %a6,#0 as a modification.
Incidences of the &
symbol must be replaced with # . link %fp,&0 must
be replaced with link %a6,#0 as a modification.
There
have been some ABI changes:
Pointers are now returned in
register d0 , not a0 .
Long doubles are now returned
in fp0 when an FPU is present, not d0 .
Two functions resembling __attribute__
functionality, -ffunction-sections and -fdata-sections
, move elements that don't have section attributes set. -ffunction-sections
moves function elements and -fdata-sections moves data
elements.
GCC
uses `.text.objectname' if transforming a function, and
uses `.data.objectname' or `.rodata.objectname'
if transforming constant data elements (which are read-only elements).
`.data.objectname' is the default.
Debugger
issues
The
following issues pertain to the GNU debugger,
gdb, and the GNUPro visual debugger, Cygnus
Insight (formerly known as GDBTk).
When using a non-ANSI compiler,
its code for --disable-gdbtk avoids building the GDB libraries
for the GUI, libgui, and automatically turns on --disable-gdbtk.
This allows use of such non-ANSI compliant compilers.
There is now support for DWARF2
object file format.
Some improvements were made for
Solaris thread debugging.
Users using Linux version 5.1
may experience the frustrating difficulty of launching the GNUPro visual
debugger. The difficulty may have to do with an earlier version having
been installed, and having had an incorrectly set environment variable.
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); 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.
Utilities
issues
The following
documentation concerns enhancement issues for GNUPro utilities for previous
releases.
There are two binary utilities
that are new to GNUPro Toolkit development tools.
addr2line
Converts addresses into file names and line numbers;
see addr2line
in Using binutils
in GNUPro Utilities.
Of the hosts we currently support,
we do not support the linker (ld) for the alpha-dec-osf,
hppa-hp-hpux or mips-sgi-irix configurations. These are
not normally configured, but the sources are included with every release.
DejaGnu is a framework for testing
other programs. Its purpose is to provide a single front end for all tests
and several of the following advantages for testing:
The flexibility and consistency
of writing tests for any program.
Providing a layer of abstraction
in order to write tests that port to any host or target where a program
must test. For instance, a test for gdb can run (from any Unix
based host) on any target that DejaGnu supports. DejaGnu runs tests on
several single board computers, whose operating software ranges from a
boot monitor to a full Unix-like realtime operating system.
All tests have the same output
format, making it easy to integrate testing into other development, to
parse by other filtering scripts, and to be readable.
DejaGnu
is written in expect, which in turn uses the Tcl command language.
Running
tests requires two things: the testing framework, and the testsuites themselves.
Tests are usually written in expect, using Tcl, but you can also
use a Tcl script to run a test suite not based on expect. expect
script filenames conventionally use .exp as a suffix; for example,
the main implementation of the DejaGnu test driver is in the file, runtest.exp
.
Assembler
issues
The following
issues pertain to the GNU assembler,
gas.
Of the hosts we currently support,
we do not support the assembler (gas ) for the alpha-dec-osf
or mips-sgi-irix6 configurations. These are not normally configured,
but the sources are included with every release.
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 linking with SunOS
and ELF systems.
The COFFlinker 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.
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 COFFlinker 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 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.
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 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.