This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fixincludes/VxWorks
- From: Bruce Korb <bkorb at gnu dot org>
- To: rbmj <rbmj at verizon dot net>
- Cc: gcc-patches at gcc dot gnu dot org, nathan at codesourcery dot com
- Date: Wed, 06 Jun 2012 10:11:41 -0700
- Subject: Re: [PATCH] Fixincludes/VxWorks
- References: <4FCF863E.6090400@verizon.net>
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.