summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorgingold <gingold@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-02 15:33:29 +0000
committergingold <gingold@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-02 15:33:29 +0000
commit40e61a82d0fcb3dc5e145d7e559bd5c8d8ae3447 (patch)
tree76e6cf13e06bd314386238fdf27db76ff6b98e40 /libiberty
parentaab1c61e9c1baa47b6d51d3d133b29640210c97f (diff)
downloadgcc-40e61a82d0fcb3dc5e145d7e559bd5c8d8ae3447.tar.gz
(Reflect changes from binutils):
2009-09-02 Tristan Gingold <gingold@adacore.com> * vmsbuild.com: Removed as unused and superceeded by makefile.vms. * makefile.vms: Ported to Itanium VMS. Remove useless targets and dependencies. Remove unused FORMAT variable. * configure.com: New file to create build.com DCL script for Itanium VMS or Alpha VMS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151333 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog8
-rw-r--r--libiberty/configure.com38
-rw-r--r--libiberty/makefile.vms10
-rw-r--r--libiberty/vmsbuild.com165
4 files changed, 49 insertions, 172 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 8698a2d3acc..be981b8389a 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,11 @@
+2009-09-02 Tristan Gingold <gingold@adacore.com>
+
+ * vmsbuild.com: Removed as unused and superceeded by makefile.vms.
+ * makefile.vms: Ported to Itanium VMS. Remove useless targets and
+ dependencies. Remove unused FORMAT variable.
+ * configure.com: New file to create build.com DCL script for
+ Itanium VMS or Alpha VMS.
+
2009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac (AC_PREREQ): Bump to 2.64.
diff --git a/libiberty/configure.com b/libiberty/configure.com
new file mode 100644
index 00000000000..030182914f7
--- /dev/null
+++ b/libiberty/configure.com
@@ -0,0 +1,38 @@
+$!
+$! This file configures the libiberty library for use with openVMS.
+$!
+$! We do not use the configure script, since we do not have /bin/sh
+$! to execute it.
+$!
+$! Written by Tristan Gingold (gingold@adacore.com)
+$!
+$!
+$!
+$ copy config.h-vms config.h
+$!
+$ write sys$output "Generate libiberty build.com"
+$!
+$ create build.com
+$DECK
+$ FILES="getopt,obstack,xexit,xmalloc,hex,getopt1,cplus-dem,cp-demangle,"+-
+ "cp-demint,asprintf,vasprintf,mkstemps,concat,getruntime,getpagesize,"+-
+ "getpwd,xstrerror,xmemdup,xstrdup,xatexit,choose-temp,fnmatch,objalloc,"+-
+ "safe-ctype,hashtab,lbasename,argv,lrealpath,make-temp-file,"+-
+ "stpcpy,unlink-if-ordinary"
+$ OPT="/noopt/debug/warnings=disable=(missingreturn)"
+$ CFLAGS=OPT + "/include=([],[-.include])/name=(as_is,shortened)" +-
+ "/define=(HAVE_CONFIG_H=1)" +-
+ "/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
+$ write sys$output "CFLAGS=",CFLAGS
+$ NUM = 0
+$ LOOP:
+$ F = F$ELEMENT(NUM,",",FILES)
+$ IF F.EQS."," THEN GOTO END
+$ write sys$output "Compiling ", F, ".c"
+$ cc 'CFLAGS 'F.c
+$ NUM = NUM + 1
+$ GOTO LOOP
+$ END:
+$ purge
+$ lib/create libiberty 'FILES
+$EOD
diff --git a/libiberty/makefile.vms b/libiberty/makefile.vms
index 2f45f69a2ae..d69d7d9efa2 100644
--- a/libiberty/makefile.vms
+++ b/libiberty/makefile.vms
@@ -1,5 +1,5 @@
#
-# Makefile for libiberty under openVMS/Alpha
+# Makefile for libiberty under openVMS
#
# For use with gnu-make for vms
#
@@ -13,7 +13,7 @@ OBJS=getopt.obj,obstack.obj,xexit.obj,xmalloc.obj,hex.obj,\
concat.obj,getruntime.obj,getpagesize.obj,getpwd.obj,xstrerror.obj,\
xmemdup.obj,xstrdup.obj,xatexit.obj,choose-temp.obj,fnmatch.obj,\
objalloc.obj,safe-ctype.obj,hashtab.obj,lbasename.obj,argv.obj,\
- lrealpath.obj,make-temp-file.obj,unlink-if-ordinary.obj
+ lrealpath.obj,make-temp-file.obj,stpcpy.obj,unlink-if-ordinary.obj
ifeq ($(CC),gcc)
CFLAGS=/include=([],[-.include])
@@ -25,15 +25,11 @@ CFLAGS=$(OPT)/include=([],[-.include])/name=(as_is,shortened)\
/prefix=(all,except=("getopt","optarg","optopt","optind","opterr"))
endif
-libiberty.olb: config.h $(OBJS)
+libiberty.olb: $(OBJS)
purge
lib/create libiberty *.obj
-config.h: config.h-vms
- $(CP) $< $@
-
clean:
$$ purge
- $(RM) config.h;
$(RM) *.obj;
$(RM) libiberty.olb;
diff --git a/libiberty/vmsbuild.com b/libiberty/vmsbuild.com
deleted file mode 100644
index 497ea8974f2..00000000000
--- a/libiberty/vmsbuild.com
+++ /dev/null
@@ -1,165 +0,0 @@
-$! libiberty/vmsbuild.com -- build liberty.olb for VMS host, VMS target
-$!
-$ CC = "gcc /noVerbose/Debug/Incl=([],[-.include])"
-$ LIBR = "library /Obj"
-$ LINK = "link"
-$ DELETE= "delete /noConfirm"
-$ SEARCH= "search /Exact"
-$ ECHO = "write sys$output"
-$ ABORT = "exit %x002C"
-$!
-$ LIB_NAME = "liberty.olb" !this is what we're going to construct
-$ WORK_LIB = "new-lib.olb" !used to guard against an incomplete build
-$
-$! manually copied from Makefile.in
-$ REQUIRED_OFILES = "argv.o basename.o choose-temp.o concat.o cplus-dem.o "-
- + "fdmatch.o fnmatch.o getopt.o getopt1.o getruntime.o hex.o "-
- + "floatformat.o objalloc.o obstack.o spaces.o strerror.o strsignal.o "-
- + "xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o"
-$! anything not caught by link+search of dummy.* should be added here
-$ EXTRA_OFILES = ""
-$!
-$! move to the directory which contains this command procedure
-$ old_dir = f$environ("DEFAULT")
-$ new_dir = f$parse("_._;",f$environ("PROCEDURE")) - "_._;"
-$ set default 'new_dir'
-$
-$ ECHO "Starting libiberty build..."
-$ create config.h
-/* libiberty config.h for VMS */
-#define NEED_sys_siglist
-#define NEED_strsignal
-#define NEED_psignal
-#define NEED_basename
-$ LIBR 'WORK_LIB' /Create
-$
-$! first pass: compile "required" modules
-$ ofiles = REQUIRED_OFILES + " " + EXTRA_OFILES
-$ pass = 1
-$ gosub do_ofiles
-$
-$! second pass: process dummy.c, using the first pass' results
-$ ECHO " now checking run-time library for missing functionality"
-$ if f$search("dummy.obj").nes."" then DELETE dummy.obj;*
-$ define/noLog sys$error _NL: !can't use /User_Mode here due to gcc
-$ define/noLog sys$output _NL: ! driver's use of multiple image activation
-$ on error then continue
-$ 'CC' dummy.c
-$ deassign sys$error !restore, more or less
-$ deassign sys$output
-$ if f$search("dummy.obj").eqs."" then goto pass2_failure1
-$! link dummy.obj, capturing full linker feedback in dummy.map
-$ oldmsg = f$environ("MESSAGE")
-$ set message /Facility/Severity/Identification/Text
-$ define/User sys$output _NL:
-$ define/User sys$error _NL:
-$ LINK/Map=dummy.map/noExe dummy.obj,'WORK_LIB'/Libr,-
- gnu_cc:[000000]gcclib.olb/Libr,sys$library:vaxcrtl.olb/Libr
-$ set message 'oldmsg'
-$ if f$search("dummy.map").eqs."" then goto pass2_failure2
-$ DELETE dummy.obj;*
-$ SEARCH dummy.map "%LINK-I-UDFSYM" /Output=dummy.list
-$ DELETE dummy.map;*
-$ ECHO " check completed"
-$! we now have a file with one entry per line of unresolvable symbols
-$ ofiles = ""
-$ if f$trnlnm("IFILE$").nes."" then close/noLog ifile$
-$ open/Read ifile$ dummy.list
-$iloop: read/End=idone ifile$ iline
-$ iline = f$edit(iline,"COMPRESS,TRIM,LOWERCASE")
-$ ofiles = ofiles + " " + f$element(1," ",iline) + ".o"
-$ goto iloop
-$idone: close ifile$
-$ DELETE dummy.list;*
-$ on error then ABORT
-$
-$! third pass: compile "missing" modules collected in pass 2
-$ pass = 3
-$ gosub do_ofiles
-$
-$! finish up
-$ LIBR 'WORK_LIB' /Compress /Output='LIB_NAME' !new-lib.olb -> liberty.olb
-$ DELETE 'WORK_LIB';*
-$
-$! all done
-$ ECHO "Completed libiberty build."
-$ type sys$input:
-
- You many wish to do
- $ COPY LIBERTY.OLB GNU_CC:[000000]
- so that this run-time library resides in the same location as gcc's
- support library. When building gas, be sure to leave the original
- copy of liberty.olb here so that gas's build procedure can find it.
-
-$ set default 'old_dir'
-$ exit
-$
-$!
-$! compile each element of the space-delimited list 'ofiles'
-$!
-$do_ofiles:
-$ ofiles = f$edit(ofiles,"COMPRESS,TRIM")
-$ i = 0
-$oloop:
-$ f = f$element(i," ",ofiles)
-$ if f.eqs." " then goto odone
-$ f = f - ".o" !strip dummy suffix
-$ ECHO " ''f'"
-$ skip_f = 0
-$ if pass.eq.3 .and. f$search("''f'.c").eqs."" then gosub chk_deffunc
-$ if .not.skip_f
-$ then
-$ 'CC' 'f'.c
-$ LIBR 'WORK_LIB' 'f'.obj /Insert
-$ DELETE 'f'.obj;*
-$ endif
-$ i = i + 1
-$ goto oloop
-$odone:
-$ return
-$
-$!
-$! check functions.def for a DEFFUNC() entry corresponding to missing file 'f'.c
-$!
-$chk_deffunc:
-$ define/User sys$output _NL:
-$ define/User sys$error _NL:
-$ SEARCH functions.def "DEFFUNC","''f'" /Match=AND
-$ if (($status.and.%x7FFFFFFF) .eq. 1)
-$ then
-$ skip_f = 1
-$ open/Append config_h config.h
-$ write config_h "#define NEED_''f'"
-$ close config_h
-$ endif
-$ return
-$
-$!
-$pass2_failure1:
-$! if we reach here, dummy.c failed to compile and we're really stuck
-$ type sys$input:
-
- Cannot compile the library contents checker (dummy.c + functions.def),
- so cannot continue!
-
-$! attempt the compile again, without suppressing diagnostic messages this time
-$ on error then ABORT +0*f$verify(v)
-$ v = f$verify(1)
-$ 'CC' dummy.c
-$ ABORT +0*f$verify(v) !'f$verify(0)'
-$!
-$pass2_failure2:
-$! should never reach here..
-$ type sys$input:
-
- Cannot link the library contents checker (dummy.obj), so cannot continue!
-
-$! attempt the link again, without suppressing diagnostic messages this time
-$ on error then ABORT +0*f$verify(v)
-$ v = f$verify(1)
-$ LINK/Map=dummy.map/noExe dummy.obj,'WORK_LIB'/Libr,-
- gnu_cc:[000000]gcclib.olb/Libr,sys$library:vaxcrtl.olb/Libr
-$ ABORT +0*f$verify(v) !'f$verify(0)'
-$
-$! not reached
-$ exit