This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Evil code in config.gcc (vsta)
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: neroden at twcny dot rr dot com (Nathanael Nerode)
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 29 Aug 2003 13:41:08 -0700
- Subject: Re: Evil code in config.gcc (vsta)
- References: <20030829201839.GA695@twcny.rr.com>
neroden@twcny.rr.com (Nathanael Nerode) writes:
> The following hunk of code in config.gcc is very evil, and is impeding
> my efforts to clean up that file:
>
>>i386-*-vsta) # Intel 80386's running VSTa kernel
>> xm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/xm-vsta.h"
> ^^^^^^^
> Is there a way to eliminate this? It looks like this means that on a vsta
> host, we include the target chip header in xm_file. ???? This looks
> seriously wrong.
That was introduced with revision 1.175, which was a giant conversion
of the entire config/i386 subdirectory to explicit tm.h lists. The
relevant chunk of the diff is
i386-*-vsta) # Intel 80386's running VSTa kernel
- xm_file=i386/xm-vsta.h
- tm_file=i386/vsta.h
+ xm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/xm-vsta.h"
+ tm_file="${tm_file} i386/vsta.h"
;;
I think this was a simple error on David O'Brien's part, and he meant
to make it read
xm_file=i386/xm-vsta.h
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/vsta.h"
Possibly overzealous use of search and replace? It doesn't matter
now. I would consider a patch that changed it to read as above to
be obviously correct.
Note that the content of i386/xm-vsta.h appears highly suspicious to
me:
/* Use semicolons to separate elements of a path. */
#define PATH_SEPARATOR ';'
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("unix"); \
} \
while (0)
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
The latter two #defines have no business in a host configuration
fragment. The first may or may not be correct; however, the limited
amount of documentation on VSTa that I have been able to find online
implies that it mimics Unix to a large extent, so the default ':'
should be the right choice. As such, it may be appropriate to remove
xm-vsta.h entirely.
zw