[PATCH] Fix ld-cdtest if CFLAGS contains -fexceptions
Nick Clifton
nickc@redhat.com
Fri Jul 29 14:43:00 GMT 2005
Hi Jakub,
> We compile most of the packages with -fexceptions these days,
> but this breaks ld-cdtest. Although it adds -fno-exceptions to cc
> in ld_compile, ld_compile then appends $CFLAGS and therefore -fexceptions
> comes after -fno-exceptions and wins.
> The following patch fixes that by adding full path of libsupc++.a to the
> command line if it exists.
Surely this is the wrong solution. Surely ld_compile ought to prepend
$CFLAGS rather than append it, so that the individual linker tests can
override command line switches like -fexceptions.
ie if the cdtest.exp wants to use -fno-exceptions then it should be
allowed to and we should not be trying to work around this by restoring
the exception handling library to the linker command line.
Cheers
Nick
More information about the Binutils
mailing list