This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Libmudflap for sh-elf toolchain cannot access environment variable MUDFLAP_OPTIONS
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: Deepen Mantri <Deepen dot Mantri at kpitcummins dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 15 Jun 2007 11:28:33 -0400
- Subject: Re: Libmudflap for sh-elf toolchain cannot access environment variable MUDFLAP_OPTIONS
- References: <892C324111C95549A2C214BACAEA30986B7569@drsohm.kpit.com>
Hi -
> >It's probably easier to place a putenv("MUDFLAP_OPTIONS=blah")
> >in your code, or inject it from the debugger.
>
> [...]
> We cannot place putenv("MUDFLAP_OPTIONS=<..>") in
> libmudflap's __mf_init() function existing in mf-runtime.c.
> Placing putenv(..) will limit the instrumented code's
> runtime behaviour only to option being set in the code by me.
What you are asking about is outside the scope of gcc. You need to
teach your simulator to pass environment variables on, or need to find
another way.
Since command line arguments are (sometimes) passed on, perhaps you
could write a short routine that parses MUDFLAP_OPTIONS from there and
calls __mf_set_options.
- FChE