]> Git Repo - binutils.git/blame - gas/vmsconf.sh
i386 pic changes
[binutils.git] / gas / vmsconf.sh
CommitLineData
eee7810f
KR
1#!/bin/sh
2
3cat << 'EOF'
4$! Set the def dir to proper place for use in batch. Works for interactive to.
5$flnm = f$enviroment("PROCEDURE") ! get current procedure name
6$set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")'
7$!
8$! Command file to build a GNU assembler on VMS
9$!
10$! If you are using a version of GCC that supports global constants
11$! you should remove the define="const=" from the gcc lines.
12$!
13$! Caution: Versions 1.38.1 and earlier had a bug in the handling of
14$! some static constants. If you are using such a version of the
15$! assembler, and you wish to compile without the "const=" hack,
16$! you should first build this version *with* the "const="
17$! definition, and then use that assembler to rebuild it without the
18$! "const=" definition. Failure to do this will result in an assembler
19$! that will mung floating point constants.
20$!
21$! Note: The version of gas shipped on the GCC VMS tapes has been patched
22$! to fix the above mentioned bug.
23$!
26f4447a
KR
24$ !The gcc-vms driver was modified to use `-1' quite some time ago,
25$ !so don't echo this text any more...
26$ !write sys$output "If this assembler is going to be used with GCC 1.n, you"
27$ !write sys$output "need to modify the driver to supply the -1 switch to gas."
28$ !write sys$output "This is required because of a small change in how global"
29$ !write sys$output "constant variables are handled. Failure to include this"
30$ !write sys$output "will result in linker warning messages about mismatched
31$ !write sys$output "psect attributes."
eee7810f
KR
32$!
33$ C_DEFS :="""VMS"""
34$! C_DEFS :="""VMS""","""const="""
35$ C_INCLUDES :=/include=([],[.config],[-.include],[-.include.aout])
36$ C_FLAGS := /debug 'c_includes'
37$!
38$!
39$ if "''p1'" .eqs. "LINK" then goto Link
40$!
41$! This helps gcc 1.nn find the aout/* files.
42$!
43$ aout_dev = f$parse(flnm,,,"DEVICE")
44$ tmp = aout_dev - ":"
45$if f$trnlnm(tmp).nes."" then aout_dev = f$trnlnm(tmp)
46$ aout_dir = aout_dev+f$parse(flnm,,,"DIRECTORY")' -
47 - "GAS]" + "INCLUDE.AOUT.]" - "]["
48$assign 'aout_dir' aout/tran=conc
49$ opcode_dir = aout_dev+f$parse(flnm,,,"DIRECTORY")' -
50 - "GAS]" + "INCLUDE.OPCODE.]" - "]["
51$assign 'opcode_dir' opcode/tran=conc
52$!
53EOF
54
55cfiles="`echo $* | sed -e 's/\.o/.c/g' -e 's!../\([^ /]*\)/\([^ /]*\.c\)![-.\1]\2!g'`"
56
57for cfile in $cfiles ; do
eee7810f 58 case $cfile in
c92d9ee9
KR
59 "[-."*)
60 base=`echo $cfile | sed -e 's/\[.*\]//' -e 's/\.c$//'`
61 echo "\$ gcc 'c_flags'/define=('C_DEFS')/object=[]$base.obj $cfile"
62 ;;
63 *)
64 echo "\$ gcc 'c_flags'/define=('C_DEFS') $cfile"
65 ;;
eee7810f
KR
66 esac
67done
68
eee7810f 69cat << 'EOF'
c92d9ee9 70$link:
eee7810f
KR
71$ link/nomap/exec=gcc-as version.opt/opt+sys$input:/opt
72!
73! Linker options file for GNU assembler
74!
75EOF
76
77for obj in $* ; do
c92d9ee9
KR
78 # Change "foo.o" into "foo.obj".
79 echo ${obj}bj,- | sed 's!.*/!!g'
eee7810f
KR
80done
81
82cat << 'EOF'
83gnu_cc:[000000]gcclib/lib,sys$share:vaxcrtl/lib
c92d9ee9 84! Tell linker exactly what psect attributes we want -- match VAXCRTL.
c06e55d9 85psect_attr=ENVIRON,long,pic,ovr,rel,gbl,noshr,noexe,rd,wrt
eee7810f 86EOF
This page took 0.065698 seconds and 4 git commands to generate.