Bug 44241 - vms-crtl.h, vms-crtl-64.h need many more symbols
Summary: vms-crtl.h, vms-crtl-64.h need many more symbols
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Tristan Gingold
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-22 14:22 UTC by Jay
Modified: 2011-06-27 12:57 UTC (History)
2 users (show)

See Also:
Host:
Target: alpha-dec-vms
Build: i686-apple-darwin9
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jay 2010-05-22 14:22:54 UTC
There is a list of symbols in gcc to rename for VMS.
In the files vms-crtl.h and vms-crtl-64.h.

Maybe there is a better solution?

Until it is found and implemented, these lists need a lot more entries.
I have enough to build gcc and binutils.
I had built cvs, but I lost that list.
Comment 1 Jay 2010-05-23 05:30:06 UTC
The line in the patch:
DECC_(environ, decc$ga_environ) \
should be:
DECC_(environ, ga_environ) \

obviously.
Comment 2 Jay 2010-05-23 06:06:50 UTC
It also goes without saying that the factoring here stinks.

At the very least, split the lists up into three:
  common
  32
  64

and then compose the result out of two of them.

The prefixes can also probably be computed.
 If the name contains "printf" or "scanf", prefix decc$tx.
 else if the function takes any floating point parameters, prefix decc$t.
 else prefix just decc$.

I think I'll write this up..

You also easily enough have a list per prefix.
And a custom list, like for environ.
Comment 3 gingold@gcc.gnu.org 2011-06-27 12:51:14 UTC
Author: gingold
Date: Mon Jun 27 12:51:09 2011
New Revision: 175523

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175523
Log:
2011-06-27  Tristan Gingold  <gingold@adacore.com>

	PR target/44241
	* config/vms/vms-protos.h: New file.
	* config/vms/vms-crtlmap.map: New file.
	* config/vms/vms.c: New file.
	* config/vms/make-crtlmap.awk: New file.
	* config/vms/vms-crtl.h: File removed.
	* config/vms/vms-crtl-64.h: File removed.
	* config/vms/t-vms (vms-crtlmap.h, vms.o): New targets.
	* config/alpha/vms64.h: Do not include vms-crtl-64.h
	* config/alpha/alpha.c (alpha_init_builtins): Remove code to
	clear some builtins on VMS.  Calls vms_patch_builtins.
	(avms_asm_output_external): Remove.
	* config/alpha/vms.h (ASM_OUTPUT_EXTERNAL): Remove.
	(struct crtl_name_spec): Remove
	(DO_CTRL_NAMES): Remove.
	* config/ia64/vms.h (struct crtl_name_spec): Remove
	(DO_CTRL_NAMES): Remove.
	* config/ia64/ia64.c (alpha_init_builtins): Remove code to
	clear some builtins on VMS.  Calls vms_patch_builtins.
	(ia64_asm_output_external): Remove DO_CRTL_NAME.
	* config/ia64/vms64.h: Do not include vms-crtl-64.h
	* config.gcc (*-*-*vms*): Define extra_objs, target_gtfiles,
	tm_p_file.


Added:
    trunk/gcc/config/vms/make-crtlmap.awk
    trunk/gcc/config/vms/vms-crtlmap.map
    trunk/gcc/config/vms/vms-protos.h
    trunk/gcc/config/vms/vms.c
Removed:
    trunk/gcc/config/vms/vms-crtl-64.h
    trunk/gcc/config/vms/vms-crtl.h
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config.gcc
    trunk/gcc/config/alpha/alpha.c
    trunk/gcc/config/alpha/vms.h
    trunk/gcc/config/alpha/vms64.h
    trunk/gcc/config/ia64/ia64.c
    trunk/gcc/config/ia64/vms.h
    trunk/gcc/config/ia64/vms64.h
    trunk/gcc/config/vms/t-vms
Comment 4 gingold@gcc.gnu.org 2011-06-27 12:57:55 UTC
No custom list yet, but the list is now in one text file.