new script, for regenerating make-gas.com
[deliverable/binutils-gdb.git] / gas / vmsconf.sh
1 #!/bin/sh
2
3 cat << '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 $!
24 $ write sys$output "If this assembler is going to be used with GCC 1.n, you"
25 $ write sys$Output "need to modify the driver to supply the -1 switch to gas."
26 $ write sys$output "This is required because of a small change in how global"
27 $ write sys$Output "constant variables are handled. Failure to include this"
28 $ write sys$output "will result in linker warning messages about mismatched
29 $ write sys$output "psect attributes."
30 $!
31 $ C_DEFS :="""VMS"""
32 $! C_DEFS :="""VMS""","""const="""
33 $ C_INCLUDES :=/include=([],[.config],[-.include],[-.include.aout])
34 $ C_FLAGS := /debug 'c_includes'
35 $!
36 $!
37 $ if "''p1'" .eqs. "LINK" then goto Link
38 $!
39 $! This helps gcc 1.nn find the aout/* files.
40 $!
41 $ aout_dev = f$parse(flnm,,,"DEVICE")
42 $ tmp = aout_dev - ":"
43 $if f$trnlnm(tmp).nes."" then aout_dev = f$trnlnm(tmp)
44 $ aout_dir = aout_dev+f$parse(flnm,,,"DIRECTORY")' -
45 - "GAS]" + "INCLUDE.AOUT.]" - "]["
46 $assign 'aout_dir' aout/tran=conc
47 $ opcode_dir = aout_dev+f$parse(flnm,,,"DIRECTORY")' -
48 - "GAS]" + "INCLUDE.OPCODE.]" - "]["
49 $assign 'opcode_dir' opcode/tran=conc
50 $!
51 EOF
52
53 cfiles="`echo $* | sed -e 's/\.o/.c/g' -e 's!../\([^ /]*\)/\([^ /]*\.c\)![-.\1]\2!g'`"
54
55 for cfile in $cfiles ; do
56 echo "\$ gcc 'c_flags'/define=('C_DEFS') $cfile"
57 case $cfile in
58 "[-."*) copyfiles="$copyfiles $cfile" ;;
59 esac
60 done
61
62 for c in $copyfiles ; do
63 base=`echo $c | sed -e 's/\[.*\]//' -e 's/\.c$//'`
64 dir=`echo $c | sed 's/\].*$/]/'`
65 echo "\$if f\$search(\"$base.obj\").eqs.\"\" then copy $dir$base.obj *.*"
66 done
67
68 cat << 'EOF'
69 $ link/nomap/exec=gcc-as version.opt/opt+sys$input:/opt
70 !
71 ! Linker options file for GNU assembler
72 !
73 EOF
74
75 for obj in $* ; do
76 echo $obj,- | sed 's!.*/!!g'
77 done
78
79 cat << 'EOF'
80 gnu_cc:[000000]gcclib/lib,sys$share:vaxcrtl/lib
81 EOF
This page took 0.039792 seconds and 5 git commands to generate.