Re: for review: sys/dev/md/md.c patch



In message: <200601301212.k0UCCnu6054149@xxxxxxxxxxxxxxxxx>
Oliver Fromme <olli@xxxxxxxxxxxxxxxxx> writes:
: Luigi Rizzo <rizzo@xxxxxxxx> wrote:
: > just discovered, trying to resurrect picobsd on -current,
: > that the compiler in 6.x/7.x has become smart and, at least
: > with the default compilation flags, will optimize out
: > the "end_mfs_root" string from the object.
:
: Shouldn't it be sufficient to declare the string as volatile?
: That should prevent it from being optimized by the compiler.

I know that for the arm board I'm working on, MFS works great. The
proposed patch looks interesting, but I'm not sure why it is
necessary. I think removing the 'static' would be sufficient...

Warner
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: for review: sys/dev/md/md.c patch
    ... >> just discovered, trying to resurrect picobsd on -current, ... > That should prevent it from being optimized by the compiler. ... probably more appropriate (with compilers becoming smarter ... > if "volatile" would do the job. ...
    (freebsd-current)
  • Re: Why code completion and early error checking are needed
    ... > Removing the mechanism to include one sourcefile within another, ... Conditional compilation could be handled by the compiler by not producing ... run it through the preprocessor first. ... preprocessor directives in that confined part of the program, ...
    (comp.lang.cpp)
  • Re: insufficient virtual memory
    ... The brute force method on problems like this is to keep removing bits ... > Thanks, Chris. ... > just turned the macros into functions, ... Assuming the compiler in-lines your functions, or can be persuaded to, ...
    (comp.os.vms)
  • Re: Problem in using compiling C++ project
    ... A weak symbol will be linked in just once, ... > The proposed patch just changes ... > compiler since there isn't a good one. ... The MS, Solaris, and GNU g++ compilers work quite ...
    (comp.os.linux.development.system)
  • Re: code optimization- Removing if .. else conditions in for loops
    ... I need help in removing if ..else conditions inside for loops. ... before spending time on a question like this. ... specific version of the compiler, the settings of the compiler and the ...
    (comp.lang.c)