This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: How to enable Mudflap in gcc 4.x?
- From: "Deepen Mantri" <Deepen dot Mantri at kpitcummins dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Tue, 5 Jun 2007 20:57:41 +0530
- Subject: RE: How to enable Mudflap in gcc 4.x?
On 4th June 2007 at 07:24:37 Frank Eigler wrote:
>First thing is to get past that autoconf error. Check your linker
>script for the default entry point symbol's name, and give it to
>libmudflap/configure.ac (then regenerate configure).
>Next, overcome build problems (if any) to the extent that a
>libmudflap.a gets compiled.
I was successful in generating libmudflap.a for sh-elf target by
adding "_start" as entry point symbol's name in configure.ac.
>Then, start running the test suite.
Running "make check" in /gcc/sh-elf/libmudflap/ directory present
in the build folder results in:
/////////////////////////////////////////////////////////////////
.
.
/home/naveenh/build/gcc/sh-elf/./libmudflap/.libs/libmudflap.a(mf-heuris
tics.o):
In function `__mf_heuristic_check':^M
/home/naveenh/src/gcc-4.3-20070302/libmudflap/mf-heuristics.c:161:
Undefined reference to `__start'^M
/home/naveenh/src/gcc-4.3-20070302/libmudflap/mf-heuristics.c:161:
Undefined reference to `__end'^M
collect2: ld returned 1 exit status^M
compiler exited with status 1
output is:
/home/naveenh/build/gcc/sh-elf/./libmudflap/.libs/libmudflap.a(mf-heuris
tics.o): In function `__mf_heuristic_check':^M
/home/naveenh/src/gcc-4.3-20070302/libmudflap/mf-heuristics.c:161:
Undefined reference to `__start'^M
/home/naveenh/src/gcc-4.3-20070302/libmudflap/mf-heuristics.c:161:
Undefined reference to `__end'^M
collect2: ld returned 1 exit status^M
Executing on host: /home/naveenh/build/gcc/gcc/xgcc
-B/home/naveenh/build/gcc/gcc/ -ggdb3 -DDEBUG_ASSERT
-I/home/naveenh/src/gcc-4.3-20070302/libmudflap/testsuite
-I/home/naveenh/src/gcc-4.3-20070302/libmudflap/testsuite/.. -I..
-L/home/naveenh/build/gcc/sh-elf/./libmudflap/.libs
/home/naveenh/src/gcc-4.3-20070302/libmudflap/testsuite/libmudflap.c/
fail1-frag.c
-fmudflap -lmudflap
-L/home/naveenh/build/gcc/sh-elf/./libmudflap/testsuite -lm -m1 -o
./fail1-frag.exe (timeout = 300)
/home/naveenh/src/gcc-4.3-20070302/libmudflap/testsuite/libmudflap.c/
fail1-frag.c:1:19:
error: stdio.h: No such file or directory^M
/home/naveenh/src/gcc-4.3-20070302/libmudflap/testsuite/libmudflap.c/
fail1-frag.c:2:20:
error: stdlib.h: No such file or directory^M
/home/naveenh/src/gcc-4.3-20070302/libmudflap/testsuite/libmudflap.c/
fail1-frag.c:3:20:
error: string.h: No such file or directory^M
compiler exited with status 1
output is:
/home/naveenh/src/gcc-4.3-20070302/libmudflap/testsuite/libmudflap.c/
fail1-frag.c:1:19:
error: stdio.h: No such file or directory^M
/home/naveenh/src/gcc-4.3-20070302/libmudflap/testsuite/libmudflap.c/
fail1-frag.c:2:20:
error: stdlib.h: No such file or directory^M
/home/naveenh/src/gcc-4.3-20070302/libmudflap/testsuite/libmudflap.c/
fail1-frag.c:3:20:
error: string.h: No such file or directory^M
.
.
.
////////////////////////////////////////////////////////////////////////
//
>[..]so at this point you might as well start compiling
>your own smaller code with -fmudflap and see what happens.
Compiling a simple C code with -fmudflap and -lmudflap options gives
following errors:
///////////////////////////////////////////////////////////
/home/naveenh/prefix/lib/gcc/sh-elf/4.3.0/../../../../sh-elf/lib/libc.a(
lib_a-syscalls.o): In function `__setup_argv_for_main':
/home/naveenh/src/newlib-1.15.0/newlib/libc/sys/sh/syscalls.c:210:
undefined reference to `___wrap_main'
/home/naveenh/prefix/lib/gcc/sh-elf/4.3.0/../../../../sh-elf/lib/libc.a(
lib_a-syscalls.o): In function `__setup_argv_and_call_main':
/home/naveenh/src/newlib-1.15.0/newlib/libc/sys/sh/syscalls.c:218:
undefined reference to `___wrap_main'
collect2: ld returned 1 exit status
////////////////////////////////////////////////////////////
How to remove these errors?
Regards,
Deepen Mantri
KPIT Cummins InfoSystems Ltd.
Pune, India
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free download of GNU based tool-chains for Renesas' SH, H8, R8C, M16C
and M32C Series. The following site also offers free technical support
to its users. Visit http://www.kpitgnutools.com for details.
Latest versions of KPIT GNU tools were released on February 6, 07
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~