mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-25 05:00:01 +00:00
Lots of changes from Eric Youngdale, mostly for VAX and VMS support.
Also, fix another goof in read.c, which caused ".data" not to work...
This commit is contained in:
parent
6218894f95
commit
4b0dd31c9f
@ -66,7 +66,7 @@ bignum_copy (in, in_length, out, out_length)
|
||||
|
||||
if (out_length > in_length)
|
||||
{
|
||||
memset ((char *) (out + out_length),
|
||||
memset ((char *) (out + in_length),
|
||||
'\0', (out_length - in_length) << LITTLENUM_SHIFT);
|
||||
}
|
||||
|
||||
|
76
gas/config-gas.com
Normal file
76
gas/config-gas.com
Normal file
@ -0,0 +1,76 @@
|
||||
$!
|
||||
$! This file sets things up to build gas on a VMS system to generate object
|
||||
$! files for a VMS system. We do not use the configure script, since we
|
||||
$! do not have /bin/sh to execute it.
|
||||
$!
|
||||
$! If you are running this file, then obviously the host is vax-dec-vms.
|
||||
$!
|
||||
$gas_host="vms"
|
||||
$!
|
||||
$cpu_type="vax"
|
||||
$emulation="generic"
|
||||
$obj_format="vms"
|
||||
$atof="vax"
|
||||
$!
|
||||
$! host specific information
|
||||
$call link host.h [.config]ho-'gas_host'.h
|
||||
$!
|
||||
$! Target specific information
|
||||
$call link targ-cpu.c [.config]tc-'cpu_type'.c
|
||||
$call link targ-cpu.h [.config]tc-'cpu_type'.h
|
||||
$call link targ-env.h [.config]te-'emulation'.h
|
||||
$!
|
||||
$! Code to handle the object file format.
|
||||
$call link obj-format.h [.config]obj-'obj_format'.h
|
||||
$call link obj-format.c [.config]obj-'obj_format'.c
|
||||
$!
|
||||
$! Code to handle floating point.
|
||||
$call link atof-targ.c [.config]atof-'atof'.c
|
||||
$!
|
||||
$!
|
||||
$! Create the file version.opt, which helps identify the executalbe.
|
||||
$!
|
||||
$search version.c version_string,"="/match=and/output=t.tmp
|
||||
$open ifile$ t.tmp
|
||||
$read ifile$ line
|
||||
$close ifile$
|
||||
$delete/nolog t.tmp;
|
||||
$ijk=f$locate("""",line)+1
|
||||
$line=f$extract(ijk,f$length(line)-ijk,line)
|
||||
$ijk=f$locate("""",line)
|
||||
$line=f$extract(0,ijk,line)
|
||||
$ijk=f$locate("\n",line)
|
||||
$line=f$extract(0,ijk,line)
|
||||
$!
|
||||
$i=0
|
||||
$loop:
|
||||
$elm=f$element(i," ",line)
|
||||
$if elm.eqs."" then goto no_ident
|
||||
$if (elm.les."9").and.(elm.ges."0") then goto write_ident
|
||||
$i=i+1
|
||||
$goto loop
|
||||
$!
|
||||
$no_ident:
|
||||
$elm="?.??"
|
||||
$!
|
||||
$!
|
||||
$write_ident:
|
||||
$open ifile$ version.opt/write
|
||||
$write ifile$ "ident="+""""+elm+""""
|
||||
$close ifile$
|
||||
$!
|
||||
$ !
|
||||
$ if f$search("config.status") .nes. "" then delete config.status.*
|
||||
$ open/write file config.status
|
||||
$ write file "Links are now set up for use with a vax running VMS."
|
||||
$ close file
|
||||
$ type config.status
|
||||
$exit
|
||||
$!
|
||||
$!
|
||||
$link:
|
||||
$subroutine
|
||||
$if f$search(p1).nes."" then delete/nolog 'p1';
|
||||
$copy 'p2' 'p1'
|
||||
$write sys$output "Linked ''p2' to ''p1'."
|
||||
$endsubroutine
|
@ -49,7 +49,7 @@ const char
|
||||
__, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __
|
||||
};
|
||||
|
||||
#ifdef VMS
|
||||
#ifdef HO_VMS
|
||||
dummy2 ()
|
||||
{
|
||||
}
|
||||
|
110
gas/make-gas.com
110
gas/make-gas.com
@ -6,51 +6,79 @@ $! Command file to build a GNU assembler on VMS
|
||||
$!
|
||||
$! If you are using a version of GCC that supports global constants
|
||||
$! you should remove the define="const=" from the gcc lines.
|
||||
$!
|
||||
$! Caution: Versions 1.38.1 and earlier had a bug in the handling of
|
||||
$! some static constants. If you are using such a version of the
|
||||
$! assembler, and you wish to compile without the "const=" hack,
|
||||
$! you should first build this version *with* the "const="
|
||||
$! definition, and then use that assembler to rebuild it without the
|
||||
$! "const=" definition. Failure to do this will result in an assembler
|
||||
$! that will mung floating point constants.
|
||||
$!
|
||||
$! 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."
|
||||
$!
|
||||
$ C_DEFS :="""VMS"""
|
||||
$! C_DEFS :="""VMS""","""const="""
|
||||
$ C_INCLUDES :=/include=([],[.config],[-.include])
|
||||
$ C_FLAGS := /debug 'c_includes'
|
||||
$!
|
||||
$!
|
||||
$ if "''p1'" .eqs. "LINK" then goto Link
|
||||
$ gcc/debug/define=("VMS","const=") as.c
|
||||
$ gcc/debug/define=("VMS", "error=as_fatal","const=") xrealloc.c
|
||||
$ gcc/debug/define=("VMS", "error=as_fatal","const=") xmalloc.c
|
||||
$ gcc/debug/define=("VMS", "error=as_fatal","const=") hash.c
|
||||
$ gcc/debug/define=("VMS","const=") obstack.c
|
||||
$ gcc/debug/define=("VMS","const=") hex-value.c
|
||||
$ gcc/debug/define=("VMS","const=") atof-generic.c
|
||||
$ gcc/debug/define=("VMS","const=") append.c
|
||||
$ gcc/debug/define=("VMS","const=") messages.c
|
||||
$ gcc/debug/define=("VMS","const=") expr.c
|
||||
$ gcc/debug/define=("VMS","const=") app.c
|
||||
$ gcc/debug/define=("VMS","const=") frags.c
|
||||
$ gcc/debug/define=("VMS","const=") input-file.c
|
||||
$ gcc/debug/define=("VMS","const=") input-scrub.c
|
||||
$ gcc/debug/define=("VMS","const=") output-file.c
|
||||
$ gcc/debug/define=("VMS","const=") read.c
|
||||
$ gcc/debug/define=("VMS","const=") subsegs.c
|
||||
$ gcc/debug/define=("VMS","const=") symbols.c
|
||||
$ gcc/debug/define=("VMS","const=") write.c
|
||||
$ gcc/debug/define=("VMS","const=") version.c
|
||||
$ gcc/debug/define=("VMS","const=") flonum-const.c
|
||||
$ gcc/debug/define=("VMS","const=") flonum-copy.c
|
||||
$ gcc/debug/define=("VMS","const=") flonum-mult.c
|
||||
$ gcc/debug/define=("VMS","const=") strstr.c
|
||||
$ gcc/debug/define=("VMS","const=") bignum-copy.c
|
||||
$ gcc/debug/define=("VMS", "error=as_fatal","const=") vax.c
|
||||
$ gcc/debug/define=("VMS","const=") atof-vax.c
|
||||
$ write sys$output " If you are building gas to work with the G++ compiler"
|
||||
$ write sys$output " based upon gcc version 1.37.n or earlier, you should"
|
||||
$ write sys$output " edit make-gas.com and make the changes indicated in the"
|
||||
$ write sys$output "comments."
|
||||
$! For older versions of G++, we need the jsb hack, the HACK_DEC_C_STARTUP
|
||||
$! enables this. Just use the compilation for vms.c that defines this instead
|
||||
$! of the other one.
|
||||
$ gcc/debug/define=("VMS", "error=as_fatal","const=") vms.c
|
||||
$! gcc/debug/define=("VMS", "error=as_fatal","HACK_DEC_C_STARTUP","const=") vms.c
|
||||
$ gcc/debug/define=("VMS","const=") vms-dbg.c
|
||||
$!
|
||||
$! This helps gcc 1.nn find the aout/* files.
|
||||
$!
|
||||
$ aout_dev = f$parse(flnm,,,"DEVICE")
|
||||
$ tmp = aout_dev - ":"
|
||||
$if f$trnlnm(tmp).nes."" then aout_dev = f$trnlnm(tmp)
|
||||
$ aout_dir = aout_dev+f$parse(flnm,,,"DIRECTORY")' -
|
||||
- "GAS]" + "INCLUDE.AOUT.]" - "]["
|
||||
$assign 'aout_dir' aout/tran=conc
|
||||
$ opcode_dir = aout_dev+f$parse(flnm,,,"DIRECTORY")' -
|
||||
- "GAS]" + "INCLUDE.OPCODE.]" - "]["
|
||||
$assign 'opcode_dir' opcode/tran=conc
|
||||
$!
|
||||
$ gcc 'c_flags'/define=('C_DEFS') as.c
|
||||
$ gcc 'c_flags'/define=("error=as_fatal",'C_DEFS') xmalloc.c
|
||||
$ gcc 'c_flags'/define=("error=as_fatal",'C_DEFS') hash.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') [-.libiberty]obstack.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') hex-value.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') messages.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') atof-generic.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') expr.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') cond.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') app.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') frags.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') input-file.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') input-scrub.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') output-file.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') read.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') subsegs.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') symbols.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') write.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') version.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') flonum-konst.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') flonum-copy.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') flonum-mult.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') bignum-copy.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') listing.c
|
||||
$ gcc 'c_flags'/define=('C_DEFS') atof-targ.c
|
||||
$ gcc 'c_flags'/define=("error=as_fatal",'C_DEFS') targ-cpu.c
|
||||
$ gcc 'c_flags'/define=("error=as_fatal",'C_DEFS') obj-format.c
|
||||
$ Link:
|
||||
$ link/exec=gcc-as sys$input:/opt
|
||||
$ link/nomap/exec=gcc-as version.opt/opt+sys$input:/opt
|
||||
!
|
||||
! Linker options file for GNU assembler
|
||||
!
|
||||
as,xrealloc,xmalloc,hash,hex-value,atof-generic,append,messages,expr,app,-
|
||||
as,xmalloc,hash,hex-value,atof-generic,messages,expr,app,cond,-
|
||||
frags,input-file,input-scrub,output-file,read,subsegs,symbols,write,-
|
||||
version,flonum-const,flonum-copy,flonum-mult,strstr,bignum-copy,-
|
||||
obstack,vax,atof-vax,vms,vms-dbg,-
|
||||
version,flonum-konst,flonum-copy,flonum-mult,bignum-copy,listing,-
|
||||
obstack,targ-cpu,atof-targ,obj-format,-
|
||||
gnu_cc:[000000]gcclib/lib,sys$share:vaxcrtl/lib
|
||||
|
@ -11,7 +11,7 @@
|
||||
universe.c (temporal_reality): Began Time.
|
||||
*/
|
||||
|
||||
#ifdef VMS
|
||||
#ifdef HO_VMS
|
||||
dummy3 ()
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user