From: Maynard J. <may...@us...> - 2007-05-10 23:33:08
|
Update of /cvsroot/oprofile/oprofile/m4 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19306/m4 Added Files: cellspubfdsupport.m4 Log Message: Patch 1 of 3: Add support for Cell BE SPU profiling --- NEW FILE: cellspubfdsupport.m4 --- dnl AX_CELL_SPU - check for needed binutils stuff for Cell BE SPU AC_DEFUN([AX_CELL_SPU], [ # On Cell BE architecture, OProfile uses bfd_openr_iovec when processing some # SPU profiles. To parse embedded SPU ELF on Cell BE, OProfile requires a # version of bfd_openr_iovec that supports the elf32-spu target. # This version of the function also has a 7th parameter that's been added. # We use a temporary test program below that passes 7 arguments to # bfd_openr_iovec; if it compiles OK, we assume we have the right BFD # library to support Cell BE SPU profiling. AC_MSG_CHECKING([whether bfd_openr_iovec has seven parameters]) SAVE_LIBS=$LIBS LIBS=" -lbfd -liberty " AC_LANG_PUSH(C) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <bfd.h> #include <stdlib.h> ], [[struct bfd *nbfd = bfd_openr_iovec("some-file", "elf32-spu", NULL, NULL, NULL, NULL, NULL); return 0; ]])], [AC_DEFINE([HAVE_BFD_OPENR_IOVEC_WITH_7PARMS], [], [Defined if you have the version of bfd_openr_iovec with 7 parameters]) bfd_open_iovec_7="yes" AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])] ) AC_LANG_POP(C) LIBS=$SAVE_LIBS arch="unknown" AC_ARG_WITH(target, [ --with-target=cell-be Check BFD support for Cell Broadband Engine SPU profiling], arch=$withval) if test "$arch" = "cell-be"; then if test "$bfd_open_iovec_7" = "yes"; then AC_MSG_NOTICE([BFD library has support for Cell Broadband Engine SPU profiling]) else AC_ERROR([BFD library does not support elf32-spu target; SPU profiling is unsupported]) fi fi ] ) |