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]

[Ada] VMS clean ups


Manually tested on ia64-vms.
Tested on i686-linux. Committed on mainline.

VMS clean ups:
The HOST_EXECUTABLE_SUFFIX, HOST_OBJECT_SUFFIX macros are defined in the
host config files, but there are build issues that prevent them from being
included in adaint.c.  Until these issues are properly resolved, they must
be hardcoded for VMS.

VMS header files are contained in three directories:
/gnu/include/
/gnu/include/sys
/gnu/include/vms

The logical name GNU_CC_INCLUDE is defined (in a standard startup command file)
as a search path logical containing /gnu/include,/gnu/include/vms.

INCLUDE_DEFAULTS is defined in vms.h and contains a reference to
/gnu_cc_include (same thing as GNU_CC_INCLUDE but in "C" style).

This is how it works now:
A reference to "#include.<stdio.h>" in a GCC compiled program would be found
in "/gnu_cc_include/stdio.h" (normal Unix behavior).

A reference to VMS system header file "#include <rms.h>" would also be
found in "/gnu_cc_include/rms.h" even though rms.h is located in
/gnu/include/vms/rms.h (weird VMS behavior)

A reference to "#include <stat.h> would not be found, since its in sys, and
so needs to be written as "sys/stat.h" (normal Unix behavior).

The reasons for doing it this way seem to be historical, perhaps based on the
original VAX GCC port.

* The problem is that having a system specific INCLUDE_DEFAULTS really
compilicates any attempt to make a full cross compiler. *

You may ask:
Why  not simply #define STANDARD_INCLUDE_DIR "/gnu_cc_include"?  Because the
circuitry in cpp goes through and eliminates all directories which it thinks
are redundant. Since the config prefix is /gnu, the /gnu/include directory
is always considered separately (and first). /gnu/include matches the first
equivalence of /gnu_cc_include (via stat() there's no way to tell the two
apart) so /gnu_cc_include is eliminated as redundant and no vms specific
header files are ever found.  It might be possible to redefine /gnu_cc_include
with /gnu/include/vms as the first equivalence string but this seems rather
torturous.

In a another checkin I will redefine STANDARD_INCLUDE_DIR "/gnu/include",
which will require modifying ia few #include's of VMS system header files
from something like "#include <rms.h>" to "#include <vms/rms.h>".  In the
meantime this change is downwardly compatible.

The benefit is that it will fix a cross compilation problem and clear things
up a bit.

2005-03-08  Doug Rupp  <rupp@adacore.com>

	* adaint.c: Prefix #include of VMS system header files with vms/
	[VMS] (HOST_EXECUTABLE_SUFFIX, HOST_OBJECT_SUFFIX): Define for VMS.
	Do not define a dummy function "convert_addresses" under Darwin,
	not needed.

	* tb-alvms.c, expect.c: Prefix #include of VMS system header files
	with vms/

Attachment: difs.5
Description: Text document


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