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.
The line in the patch: DECC_(environ, decc$ga_environ) \ should be: DECC_(environ, ga_environ) \ obviously.
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.
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
No custom list yet, but the list is now in one text file.