This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fixincludes/VxWorks


On 06/06/12 09:33, rbmj wrote:
Hi everyone,

OK, I'm slow. I just woke up from a late night. "test -r vxWorks.h" is the mechanism to ensure that tests only fire on a vxworks platform. Seems a bit obscure, but if it is easier than other mechanisms, then fine. I do think a "mach" test would be much more straight forward:

    * mach   - Match the output of config.guess against a series of fnmatch
               patterns.  It must match at least one of the patterns, unless
               "not-machine" has also been specified.  In that case, the
               config.guess output must not match any of the patterns.

(from the README file)  It would remove any need for relying on side
effects in the "test-text":

    test_text   = "`touch vxWorks.h`"
        "extern int write ( int , char * , size_t ) ;";

There is no guarantee that that will work.  It only works because in the
construction of the test, the text gets passed through shell interpretation
at some point.  It is not required that that happen.  To do what you
want, you'd need to use this:

    test-text = `touch vxWorks.h
         echo "extern int write ( int , char * , size_t ) ;"`;

and even then, it should be researched as to whether or not you need
to prefix the touched file name with "${SRCDIR}/" because I don't remember.
I still think:

mach = "*-*-vxworks*";

is more straight forward, and you can then eliminate the touchy vxWorks.h
thingy.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]