This is the mail archive of the 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: Evil code in config.gcc (vsta) (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

        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

/* 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.


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