From: Ken Raeburn Date: Thu, 14 Apr 1994 22:46:53 +0000 (+0000) Subject: * Makefile.in: Make $(OBJS) depend on $(ALL_OBJ_DEPS). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c92d9ee9006288589f4466496632ee20f431a985;p=binutils-gdb.git * Makefile.in: Make $(OBJS) depend on $(ALL_OBJ_DEPS). * configure.in: Set ALL_OBJ_DEPS in output Makefile. Based on suggestions from (Charles Bailey): * vmsconf.sh: In generated file, get ".obj" suffix right, build source files from other directories into objects in the current directory, and specify PSECT attributes explicitly to linker. Also added missing label. * Makefile.in (stamp-mk.com): Reference new variable VMS_OTHER_OBJS for list of non-local object files, instead of listing them here. (VMS_OTHER_OBJS): New variable, added more libiberty files. * make-gas.com: Regenerated. * config/ho-vms.h (unlink): Define as delete. * config-gas.com: Fix quoting on TARGET_CANONICAL definition. Delete files before creating them. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index efff1d7de28..5926ae4aa15 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -4,6 +4,26 @@ Thu Apr 14 15:12:36 1994 Ken Raeburn (raeburn@cujo.cygnus.com) floating point and binary numbers respectively; if it doesn't work, treat them as local labels. + * Makefile.in: Make $(OBJS) depend on $(ALL_OBJ_DEPS). + * configure.in: Set ALL_OBJ_DEPS in output Makefile. + + Based on suggestions from + (Charles Bailey): + * vmsconf.sh: In generated file, get ".obj" suffix right, build + source files from other directories into objects in the current + directory, and specify PSECT attributes explicitly to linker. + Also added missing label. + * Makefile.in (stamp-mk.com): Reference new variable + VMS_OTHER_OBJS for list of non-local object files, instead of + listing them here. + (VMS_OTHER_OBJS): New variable, added more libiberty files. + * make-gas.com: Regenerated. + + * config/ho-vms.h (unlink): Define as delete. + + * config-gas.com: Fix quoting on TARGET_CANONICAL definition. + Delete files before creating them. + Thu Apr 14 13:34:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * Makefile.in (de-stage1, de-stage2, de-stage3): Use rm -f. diff --git a/gas/Makefile.in b/gas/Makefile.in index 2c2089d2f2b..7473c7e038a 100644 --- a/gas/Makefile.in +++ b/gas/Makefile.in @@ -232,6 +232,14 @@ OBJS = \ xmalloc.o \ $(TE_OBJS) +# These are objects we know we'll be pulling in from other directories. +# For VMS, we have to build them explicitly. +VMS_OTHER_OBJS = \ + ../libiberty/obstack.o \ + ../libiberty/strdup.o \ + ../libiberty/strncasecmp.o \ + ../libiberty/getruntime.o + all: as.new gasp.new @srcroot=`cd $(srcroot); pwd`; export srcroot; \ (cd doc ; $(MAKE) $(FLAGS_TO_PASS) all) @@ -242,7 +250,7 @@ dvi info install-info clean-info: make-gas.com: stamp-mk.com stamp-mk.com: vmsconf.sh Makefile - sh $(srcdir)/vmsconf.sh $(OBJS) ../libiberty/obstack.o ../libiberty/strdup.o > new-make.com + sh $(srcdir)/vmsconf.sh $(OBJS) $(VMS_OTHER_OBJS) > new-make.com $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com touch stamp-mk.com @@ -275,6 +283,8 @@ SUBDIR_INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/config # Files to be copied away after each stage in building. STAGESTUFF = *.o as.new gasp.new +$(OBJS): $(ALL_OBJ_DEPS) + as.new: $(OBJS) $(LIBS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES) diff --git a/gas/config-gas.com b/gas/config-gas.com index 06bba35c1e6..7ad1a0a98fd 100644 --- a/gas/config-gas.com +++ b/gas/config-gas.com @@ -41,14 +41,16 @@ $line=f$extract(ijk,f$length(line)-ijk,line) $ijk=f$locate("\n",line) $line=f$extract(0,ijk,line) $! +$ if f$search("version.opt").nes."" then delete/noconfirm version.opt;* $open ifile$ version.opt/write $write ifile$ "ident="+""""+line+"""" $close ifile$ $! Now write config.h. +$ if f$search("config.h").nes."" then delete/noconfirm config.h;* $open ifile$ config.h/write $write ifile$ "#define TARGET_CPU """,cpu_type,""" $write ifile$ "#define TARGET_ALIAS ""vms""" -$write ifile$ "#define TARGET_CANONICAL ""vax-dec-vms"""" +$write ifile$ "#define TARGET_CANONICAL ""vax-dec-vms""" $write ifile$ "#define GAS_VERSION """,line,"""" $close ifile$ $! diff --git a/gas/config/ho-vms.h b/gas/config/ho-vms.h index c4e941c5137..a546019bd94 100644 --- a/gas/config/ho-vms.h +++ b/gas/config/ho-vms.h @@ -32,4 +32,6 @@ #define EXIT_FAILURE 0 #endif +#define unlink delete + /* end of ho-vms.h */ diff --git a/gas/configure.in b/gas/configure.in index d4413c9f442..48390641432 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -338,8 +338,11 @@ case ${bfd_gas} in esac case ${need_bfd} in - yes) bfdlib="BFDLIB=../bfd/libbfd.a" ;; - *) bfdlib="" ;; + yes) bfdlib="BFDLIB=../bfd/libbfd.a" + all_obj_deps="$all_obj_deps ../bfd/bfd.h" + ;; + *) bfdlib="" + ;; esac case "x${host}" in @@ -349,11 +352,8 @@ esac rm -f Makefile.tem echo $cross > Makefile.tem -case "$extra_def" in - "") ;; - *) echo defs=$extra_def >> Makefile.tem - ;; -esac +echo ALL_OBJ_DEPS=$all_obj_deps >> Makefile.tem +echo defs=$extra_def >> Makefile.tem echo $bfdlib >> Makefile.tem echo "OPCODES_LIB=$opcodes" >> Makefile.tem cat Makefile >> Makefile.tem diff --git a/gas/make-gas.com b/gas/make-gas.com index 6a04021887f..95b573eec71 100644 --- a/gas/make-gas.com +++ b/gas/make-gas.com @@ -73,42 +73,47 @@ $ gcc 'c_flags'/define=('C_DEFS') listing.c $ gcc 'c_flags'/define=('C_DEFS') ecoff.c $ gcc 'c_flags'/define=('C_DEFS') stabs.c $ gcc 'c_flags'/define=('C_DEFS') xmalloc.c -$ gcc 'c_flags'/define=('C_DEFS') [-.libiberty]obstack.c -$ gcc 'c_flags'/define=('C_DEFS') [-.libiberty]strdup.c -$if f$search("obstack.obj").eqs."" then copy [-.libiberty]obstack.obj *.* -$if f$search("strdup.obj").eqs."" then copy [-.libiberty]strdup.obj *.* +$ gcc 'c_flags'/define=('C_DEFS')/object=[]obstack.obj [-.libiberty]obstack.c +$ gcc 'c_flags'/define=('C_DEFS')/object=[]strdup.obj [-.libiberty]strdup.c +$ gcc 'c_flags'/define=('C_DEFS')/object=[]strncasecmp.obj [-.libiberty]strncasecmp.c +$ gcc 'c_flags'/define=('C_DEFS')/object=[]getruntime.obj [-.libiberty]getruntime.c +$link: $ link/nomap/exec=gcc-as version.opt/opt+sys$input:/opt ! ! Linker options file for GNU assembler ! -targ-cpu.o,- -obj-format.o,- -atof-targ.o,- -app.o,- -as.o,- -atof-generic.o,- -bignum-copy.o,- -cond.o,- -expr.o,- -flonum-konst.o,- -flonum-copy.o,- -flonum-mult.o,- -frags.o,- -hash.o,- -hex-value.o,- -input-file.o,- -input-scrub.o,- -literal.o,- -messages.o,- -output-file.o,- -read.o,- -subsegs.o,- -symbols.o,- -write.o,- -listing.o,- -ecoff.o,- -stabs.o,- -xmalloc.o,- -obstack.o,- -strdup.o,- +targ-cpu.obj,- +obj-format.obj,- +atof-targ.obj,- +app.obj,- +as.obj,- +atof-generic.obj,- +bignum-copy.obj,- +cond.obj,- +expr.obj,- +flonum-konst.obj,- +flonum-copy.obj,- +flonum-mult.obj,- +frags.obj,- +hash.obj,- +hex-value.obj,- +input-file.obj,- +input-scrub.obj,- +literal.obj,- +messages.obj,- +output-file.obj,- +read.obj,- +subsegs.obj,- +symbols.obj,- +write.obj,- +listing.obj,- +ecoff.obj,- +stabs.obj,- +xmalloc.obj,- +obstack.obj,- +strdup.obj,- +strncasecmp.obj,- +getruntime.obj,- gnu_cc:[000000]gcclib/lib,sys$share:vaxcrtl/lib +! Tell linker exactly what psect attributes we want -- match VAXCRTL. +psect_addr=ENVIRON,long,pic,ovr,rel,gbl,noshr,noexe,rd,wrt diff --git a/gas/vmsconf.sh b/gas/vmsconf.sh index 1f732c31215..e1111ebd5de 100644 --- a/gas/vmsconf.sh +++ b/gas/vmsconf.sh @@ -53,19 +53,19 @@ 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: $ link/nomap/exec=gcc-as version.opt/opt+sys$input:/opt ! ! Linker options file for GNU assembler @@ -73,9 +73,12 @@ $ link/nomap/exec=gcc-as version.opt/opt+sys$input:/opt 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 +! Tell linker exactly what psect attributes we want -- match VAXCRTL. +psect_addr=ENVIRON,long,pic,ovr,rel,gbl,noshr,noexe,rd,wrt EOF