Add some support for i960 MRI compatibility mode.
[deliverable/binutils-gdb.git] / gas / vmsconf.sh
index 1f732c3121518661ac807d866878a714c231db63..4ae20e05a457d0fc9b4194429b3aea22ddfda438 100644 (file)
@@ -4,6 +4,7 @@ cat << 'EOF'
 $! Set the def dir to proper place for use in batch. Works for interactive to.
 $flnm = f$enviroment("PROCEDURE")     ! get current procedure name
 $set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")'
+$v = 'f$verify(0)'
 $!
 $!     Command file to build a GNU assembler on VMS
 $!
@@ -21,19 +22,26 @@ $!
 $!     Note: The version of gas shipped on the GCC VMS tapes has been patched
 $!     to fix the above mentioned bug.
 $!
-$ write sys$output "If this assembler is going to be used with GCC 1.n, you"
-$ write sys$Output "need to modify the driver to supply the -1 switch to gas."
-$ write sys$output "This is required because of a small change in how global"
-$ write sys$Output "constant variables are handled.  Failure to include this"
-$ write sys$output "will result in linker warning messages about mismatched
-$ write sys$output "psect attributes."
+$      !The gcc-vms driver was modified to use `-1' quite some time ago,
+$      !so don't echo this text any more...
+$ !write sys$output "If this assembler is going to be used with GCC 1.n, you"
+$ !write sys$output "need to modify the driver to supply the -1 switch to gas."
+$ !write sys$output "This is required because of a small change in how global"
+$ !write sys$output "constant variables are handled.  Failure to include this"
+$ !write sys$output "will result in linker warning messages about mismatched
+$ !write sys$output "psect attributes."
 $!
 $ C_DEFS :="""VMS"""
 $! C_DEFS :="""VMS""","""const="""
-$ C_INCLUDES :=/include=([],[.config],[-.include],[-.include.aout])
-$ C_FLAGS := /debug 'c_includes'
+$ C_INCLUDES   = "/Include=([],[.config],[-.include],[-.include.aout])"
+$ C_FLAGS      = "/noVerbose/Debug" + c_includes
 $!
 $!
+$ on error then  goto bail
+$ if f$search("[-.libiberty]liberty.olb").eqs.""
+$ then @[-.libiberty]vmsbuild.com
+$      write sys$output "Now building gas."
+$ endif
 $ if "''p1'" .eqs. "LINK" then goto Link
 $!
 $!  This helps gcc 1.nn find the aout/* files.
@@ -48,34 +56,44 @@ $ opcode_dir = aout_dev+f$parse(flnm,,,"DIRECTORY")' -
        - "GAS]" + "INCLUDE.OPCODE.]" - "]["
 $assign 'opcode_dir' opcode/tran=conc
 $!
+$ set verify
+$!
 EOF
 
 cfiles="`echo $* | sed -e 's/\.o/.c/g' -e 's!../\([^ /]*\)/\([^ /]*\.c\)![-.\1]\2!g'`"
 
 for cfile in $cfiles ; do
-  echo "\$ gcc 'c_flags'/define=('C_DEFS') $cfile"
   case $cfile in
-    "[-."*)  copyfiles="$copyfiles $cfile" ;;
+    "[-."*)
+       base=`echo $cfile | sed -e 's/\[.*\]//' -e 's/\.c$//'`
+       echo "\$ gcc 'c_flags'/Define=('C_DEFS')/Object=[]$base.obj $cfile"
+       ;;
+    *)
+       echo "\$ gcc 'c_flags'/Define=('C_DEFS') $cfile"
+       ;;
   esac
 done
 
-for c in $copyfiles ; do
-  base=`echo $c | sed -e 's/\[.*\]//' -e 's/\.c$//'`
-  dir=`echo $c | sed 's/\].*$/]/'`
-  echo "\$if f\$search(\"$base.obj\").eqs.\"\" then copy $dir$base.obj *.*"
-done
-
 cat << 'EOF'
-$ link/nomap/exec=gcc-as version.opt/opt+sys$input:/opt
+$link:
+$!'f$verify(0)'
+$ set verify=(Proc,noImag)
+$ link/noMap/Exec=gcc-as version.opt/Opt+sys$input:/Opt
 !
 !      Linker options file for GNU assembler
 !
 EOF
 
 for obj in $* ; do
-  echo $obj,- | sed 's!.*/!!g'
+  # Change "foo.o" into "foo.obj".
+  echo ${obj}bj,- | sed 's!.*/!!g'
 done
 
 cat << 'EOF'
-gnu_cc:[000000]gcclib/lib,sys$share:vaxcrtl/lib
+[-.libiberty]liberty.olb/Lib
+gnu_cc:[000000]gcclib.olb/Lib,sys$library:vaxcrtl.olb/Lib
+! Tell linker exactly what psect attributes we want -- match VAXCRTL.
+psect_attr=ENVIRON,long,pic,ovr,rel,gbl,noshr,noexe,rd,wrt
+$!
+$bail: exit $status + 0*f$verify(v)    !'f$verify(0)'
 EOF
This page took 0.025213 seconds and 4 git commands to generate.