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