ia64 eh, part 5
Alexandre Oliva
aoliva@redhat.com
Wed Mar 28 15:22:00 GMT 2001
On Mar 28, 2001, Richard Henderson <rth@redhat.com> wrote:
> ! cs-tconfig.h: Makefile $(GCONFIG_H) insn-flags.h except.h
> HEADERS="$(xm_file)" DEFINES="$(xm_defines)" \
> TARGET_CPU_DEFAULT="" \
> $(SHELL) $(srcdir)/mkconfig.sh tconfig.h
> + # ??? Need extra help to get this definition copied to where libgcc can
> + # see it. It shouldn't matter which compiler we use to get there.
> + echo '#include "config.h"' > conftest.c
> + echo '#include "except.h"' >> conftest.c
> + echo 'xyzzy USING_SJLJ_EXCEPTIONS' >> conftest.c
> + $(HOST_CC) -E conftest.c $(HOST_CFLAGS) $(INCLUDES) > conftest.out
> + sed -e 's/xyzzy/#define USING_SJLJ_EXCEPTIONS/' -e '/#define/p' \
> + -e d conftest.out >> tconfig.h
> + rm conftest.*
I'd rather see this test moved into mkconfig.sh. We might even use
autoconf (2.50)'s AC_PLAIN_SCRIPT to be able to use AC_TRY_CPP.
Probably not worth the effort, though.
In any case, it's generally preferred to grep the output of the
preprocessor than to sed its output. Probably just tradition, since
they're pretty much equivalent.
An autoconf test in mkconfig.sh would probably expand to something
like this:
cat > conftest.c << EOF
#include "config.h"
#include "except.h"
#if USING_SJLJ_EXCEPTIONS
use sjlj exceptions
#endif
if ${CC} $(CPPFLAGS) -E conftest.c | grep "use sjlj exceptions"; then
echo '#define USING_SJLJ_EXCEPTIONS 1' >> $output.T
fi
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
More information about the Gcc-patches
mailing list