diff options
Diffstat (limited to 'libgloss/cris')
-rw-r--r-- | libgloss/cris/Makefile.in | 277 | ||||
-rwxr-xr-x | libgloss/cris/configure | 1203 | ||||
-rw-r--r-- | libgloss/cris/configure.in | 90 | ||||
-rw-r--r-- | libgloss/cris/crt0.S | 83 | ||||
-rw-r--r-- | libgloss/cris/crti.c | 77 | ||||
-rw-r--r-- | libgloss/cris/crtn.c | 51 | ||||
-rw-r--r-- | libgloss/cris/gensyscalls | 252 | ||||
-rw-r--r-- | libgloss/cris/lcrt0.c | 128 | ||||
-rw-r--r-- | libgloss/cris/linunistd.h | 421 | ||||
-rw-r--r-- | libgloss/cris/outbyte.c | 9 | ||||
-rw-r--r-- | libgloss/cris/setup.S | 44 |
11 files changed, 0 insertions, 2635 deletions
diff --git a/libgloss/cris/Makefile.in b/libgloss/cris/Makefile.in deleted file mode 100644 index ca3ec3804..000000000 --- a/libgloss/cris/Makefile.in +++ /dev/null @@ -1,277 +0,0 @@ -# -# libgloss Makefile.in for CRIS. Copied and modified from mcore long ago. -# - -DESTDIR = -VPATH = @srcdir@ -srcdir = @srcdir@ -objdir = . -srcroot = $(srcdir)/../.. -objroot = $(objdir)/../.. - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -host_alias = @host_alias@ -target_alias = @target_alias@ - -bindir = @bindir@ -libdir = @libdir@ -tooldir = $(exec_prefix)/$(target_alias) - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -# Multilib support variables. -# TOP is used instead of MULTI{BUILD,SRC}TOP. -MULTIDIRS = -MULTISUBDIR = - -SHELL = /bin/sh - -CC = @CC@ - -AS = @AS@ -AR = @AR@ -LD = @LD@ -RANLIB = @RANLIB@ - -OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \ - then echo ${objroot}/../binutils/objdump ; \ - else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi` -OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \ - then echo ${objroot}/../binutils/objcopy ; \ - else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi` - -CFLAGS = -g -SCRIPTS = - -OBJS = outbyte.o - -# Beware: GNU make construct used (shell call). Since GCC at the time -# of this writing requires GNU make >= 3.79.1, this should pose no -# problem. -SYSCALL_CFILES := $(shell sed -ne 's/^cat > \([^ ]*\).*/\1/p' < $(srcdir)/gensyscalls) - -# Here is all of the simulator stuff. -# Actually, now it's just the GNU/Linux stuff, as that's also the -# simulator ABI. The name of the library is different, though. -SIM_SCRIPTS = -SIM_LDFLAGS = -SIM_BSP = libsyssim.a -SIM_CRT0 = $(LIN_CRT0) -SIM_OBJS = $(LIN_OBJS) -SIM_TEST = sim-test -SIM_INSTALL = install-sim - -# Here is all of the GNU/Linux stuff. At present we don't build newlib -# and libgloss for cris*-linux-gnu*, but it's nice to keep that as an -# option. -LIN_PREFIX = -LIN_LDFLAGS = -LIN_BSP = libsyslinux.a -LIN_CRT0 = lcrt0.o -LIN_EXTRA = crti.o crtn.o crt1.o -LIN_OBJS = close.o execve.o exit.o fcntl.o fork.o fstat.o getpid.o \ - gettod.o isatty.o kill.o link.o lseek.o open.o read.o \ - rename.o sbrk.o stat.o times.o unlink.o wait.o write.o ${OBJS} -LIN_SCRIPTS = -LIN_TEST = -LIN_INSTALL = install-lin - -# In (over)due time, here will be all stuff necessary for a development -# board. -BSP_PREFIX = -BSP_LDFLAGS = -BSP_BSP = libbsp.a -BSP_CRT0 = crt0.o -BSP_OBJS = ${OBJS} setup.o -BSP_SCRIPTS = -BSP_TEST = -BSP_INSTALL = install-bsp - -ALL_INSTALL_FILES = \ - ${SIM_CRT0} ${SIM_EXTRA} ${SIM_BSP} \ - ${LIN_CRT0} ${LIN_EXTRA} ${LIN_BSP} \ - ${BSP_CRT0} ${BSP_EXTRA} ${BSP_BSP} - -ALL_INSTALL_FILES_NEWLIB_COPY = \ - $(sort ${ALL_INSTALL_FILES:%=$(objroot)/newlib/%}) $(objroot)/newlib/libnosys.a - -# Host specific makefile fragment comes in here. -@host_makefile_frag@ - -# Need to augment the definition from host_makefile_frag above. -INCLUDES += -I$(srcdir) - -all: ${ALL_INSTALL_FILES} ${ALL_INSTALL_FILES_NEWLIB_COPY} libnosys.a - -# -# Here's where we build the board support packages for each target. -# -${SIM_BSP}: ${SIM_OBJS} - ${AR} ${ARFLAGS} ${SIM_BSP} ${SIM_OBJS} - ${RANLIB} ${SIM_BSP} - -${BSP_BSP}: ${BSP_OBJS} - ${AR} ${ARFLAGS} ${BSP_BSP} ${BSP_OBJS} - ${RANLIB} ${BSP_BSP} - -${LIN_BSP}: ${LIN_OBJS} - ${AR} ${ARFLAGS} ${LIN_BSP} ${LIN_OBJS} - ${RANLIB} ${LIN_BSP} - -# We need a link to libnosys.a in this directory, since this is the -# directory used when test-compiling for configuration for other parts and -# when running the testsuite. By using a symbolic link, it does not -# matter whether libnosys.a is built yet when the rule is executed. -libnosys.a: - ln -s ../libnosys/libnosys.a - -# Toplevel build rules for various other libraries have gcc -B options -# applied so the newlib build directory is reached, but not the target -# libgloss directory (whose name is unknown to the toplevel configury -# anyway). Configury tests that check for a successful link therefore -# fail; they can't find crt0.o and non-libc.a+libm.a libraries. We copy -# over all files we would install to the neighboring newlib directory. -# Only the default crt0.o and libraries are needed, but we do them all for -# completeness. They're however installed from here, not from the newlib -# build directory. -$(objroot)/newlib/%: % - cp -p $^ $@ - -# This rule, being more specific, overrides the pattern rule above. -$(objroot)/newlib/libnosys.a: - ln -s ../libgloss/libnosys/libnosys.a $(objroot)/newlib - -# -# Build a test program for each target board. Just trying to get -# it to link is a good test, so we ignore all the errors for now. -# -# -# Here's where we build the test programs for each target. -# -.PHONY: test -test: ${SIM_TEST} ${BSP_TEST} - -sim-test: sim-test.x sim-test.dis - -sim-test.x: test.o ${SIM_CRT0} ${SIM_BSP} - ${CC} ${LDFLAGS_FOR_TARGET} -L${objdir} \ - ${SIM_CRT0} test.o \ - -o sim-test.x ${LIBS_FOR_TARGET} -lc ${SIM_BSP} - -sim-test.dis: sim-test.x - ${OBJDUMP} -d sim-test.x > sim-test.dis - - -test.o: ${srcdir}/m68k/test.c - -# Debug usage. -.c.S: - ${CC} ${CFLAGS_FOR_TARGET} $(INCLUDES) $(CFLAGS) -c $< - -# Caveat: for the -melinux multilib in cris-axis-aout, crt0.o is the -# same as lcrt0.o, while elsewhere (other cris-axis-aout multilib and -# cris-axis-elf) it's crt0.c compiled. -crt0.o: lcrt0.o crt0.S - case "${MULTISUBDIR}" in \ - */elinux) \ - cp -p $< $@; st=$$?;; \ - *) \ - case "$?" in \ - *crt0.S) \ - $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -xassembler-with-cpp -c $(srcdir)/crt0.S;; \ - *) touch $@;; \ - esac; \ - st=$$?;; \ - esac; exit $$st - -crt1.o: lcrt0.o - cp -p $< $@ - -clean mostlyclean: - rm -f a.out core *.i *.o *-test *.srec *.dis *.x $(SIM_BSP) $(BSP_BSP) $(LIN_BSP) libnosys.a - -distclean maintainer-clean realclean: clean - rm -f Makefile config.status *~ - -.PHONY: install info install-info clean-info -install: ${SIM_INSTALL} ${BSP_INSTALL} ${LIN_INSTALL} - -# Note that bsp and elinux objects are exclusive: do not overlap -# installed files. -install-bsp: - case "${MULTISUBDIR}" in \ - */elinux) ;; \ - *) set -e; \ - for x in ${BSP_CRT0} ${BSP_BSP} ${BSP_SCRIPTS}; do \ - ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \ - done;; \ - esac - -install-sim: - set -e; \ - for x in ${SIM_CRT0} ${SIM_BSP} ${SIM_SCRIPTS}; do \ - ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \ - done - -install-lin: - case "${MULTISUBDIR}" in \ - */elinux) \ - ${INSTALL_DATA} ${LIN_CRT0} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/crt0.o; \ - set -e; \ - for x in ${LIN_BSP} ${LIN_SCRIPTS}; do \ - ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \ - done;; \ - *) \ - set -e; \ - for x in ${LIN_BSP} ${LIN_SCRIPTS} ${LIN_EXTRA}; do \ - ${INSTALL_DATA} $$x ${tooldir}/lib${MULTISUBDIR}/$$x; \ - done;; \ - esac - -doc: -info: -install-info: -clean-info: - -Makefile: Makefile.in config.status @host_makefile_frag_path@ - $(SHELL) config.status - -config.status: configure - $(SHELL) config.status --recheck - -$(SYSCALL_CFILES): syscalls.stamp - -syscalls.stamp: gensyscalls - $(SHELL) $(srcdir)/gensyscalls - touch $@ - -# Dependencies that could and should be auto-generated. -close.o: close.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -execve.o: execve.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -exit.o: exit.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -fork.o: fork.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -fstat.o: fstat.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -fcntl.o: fcntl.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -getpid.o: getpid.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -gettod.o: gettod.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -isatty.o: isatty.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -kill.o: kill.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -link.o: link.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -lseek.o: lseek.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -open.o: open.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -read.o: read.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -rename.o: rename.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -sbrk.o: sbrk.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -stat.o: stat.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -times.o: times.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -unlink.o: unlink.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -wait.o: wait.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -write.o: write.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -lcrt0.o: lcrt0.c linunistd.h $(objdir)/../libnosys/config.h $(srcdir)/../libnosys/warning.h -setup.o: setup.S -crti.o: crti.c -crtn.o: crtn.c diff --git a/libgloss/cris/configure b/libgloss/cris/configure deleted file mode 100755 index edda80296..000000000 --- a/libgloss/cris/configure +++ /dev/null @@ -1,1203 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=Makefile.in - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - -if test "${enable_shared}" = "yes" ; then - echo "Shared libraries not supported for cross compiling, ignored" -fi - -if test "$srcdir" = "." ; then - if test "${with_target_subdir}" != "." ; then - libgloss_topdir="${srcdir}/${with_multisrctop}../../.." - else - libgloss_topdir="${srcdir}/${with_multisrctop}../.." - fi -else - libgloss_topdir="${srcdir}/../.." -fi -ac_aux_dir= -for ac_dir in $libgloss_topdir $srcdir/$libgloss_topdir; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $libgloss_topdir $srcdir/$libgloss_topdir" 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - - - -# Do some error checking and defaulting for the host and target type. -# The inputs are: -# configure --host=HOST --target=TARGET --build=BUILD NONOPT -# -# The rules are: -# 1. You are not allowed to specify --host, --target, and nonopt at the -# same time. -# 2. Host defaults to nonopt. -# 3. If nonopt is not specified, then host defaults to the current host, -# as determined by config.guess. -# 4. Target and build default to nonopt. -# 5. If nonopt is not specified, then target and build default to host. - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -case $host---$target---$nonopt in -NONE---*---* | *---NONE---* | *---*---NONE) ;; -*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; -esac - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:587: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:608: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:626: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - -test "$host_alias" != "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - -if test "$program_transform_name" = s,x,x,; then - program_transform_name= -else - # Double any \ or $. echo might interpret backslashes. - cat <<\EOF_SED > conftestsed -s,\\,\\\\,g; s,\$,$$,g -EOF_SED - program_transform_name="`echo $program_transform_name|sed -f conftestsed`" - rm -f conftestsed -fi -test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" - -# sed with no file args requires a program. -test "$program_transform_name" = "" && program_transform_name="s,x,x," - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:680: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -# FIXME: We temporarily define our own version of AC_PROG_CC. This is -# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We -# are probably using a cross compiler, which will not be able to fully -# link an executable. This should really be fixed in autoconf -# itself. - - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:744: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:774: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:823: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <<EOF -#ifdef __GNUC__ - yes; -#endif -EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:847: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi - -AS=${AS-as} - -AR=${AR-ar} - -LD=${LD-ld} - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:883: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -host_makefile_frag=${srcdir}/../config/default.mh - -host_makefile_frag_path=$host_makefile_frag - - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <<EOF -#! /bin/sh -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS <<EOF - -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@target@%$target%g -s%@target_alias@%$target_alias%g -s%@target_cpu@%$target_cpu%g -s%@target_vendor@%$target_vendor%g -s%@target_os@%$target_os%g -s%@build@%$build%g -s%@build_alias@%$build_alias%g -s%@build_cpu@%$build_cpu%g -s%@build_vendor@%$build_vendor%g -s%@build_os@%$build_os%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@CC@%$CC%g -s%@AS@%$AS%g -s%@AR@%$AR%g -s%@LD@%$LD%g -s%@RANLIB@%$RANLIB%g -s%@host_makefile_frag_path@%$host_makefile_frag_path%g -/@host_makefile_frag@/r $host_makefile_frag -s%@host_makefile_frag@%%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <<EOF - -CONFIG_FILES=\${CONFIG_FILES-"Makefile"} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <<EOF -srcdir=${srcdir} -target=${target} -ac_configure_args="${ac_configure_args} --enable-multilib" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -libgloss_topdir=${libgloss_topdir} - -EOF -cat >> $CONFIG_STATUS <<\EOF -. ${libgloss_topdir}/config-ml.in -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - diff --git a/libgloss/cris/configure.in b/libgloss/cris/configure.in deleted file mode 100644 index 9ac0d4589..000000000 --- a/libgloss/cris/configure.in +++ /dev/null @@ -1,90 +0,0 @@ -dnl This file is based on ../mcore/configure.in -dnl Process this file with autoconf to produce a configure script. -AC_PREREQ(2.5)dnl -AC_INIT(Makefile.in) - -if test "${enable_shared}" = "yes" ; then - echo "Shared libraries not supported for cross compiling, ignored" -fi - -if test "$srcdir" = "." ; then - if test "${with_target_subdir}" != "." ; then - libgloss_topdir="${srcdir}/${with_multisrctop}../../.." - else - libgloss_topdir="${srcdir}/${with_multisrctop}../.." - fi -else - libgloss_topdir="${srcdir}/../.." -fi -AC_CONFIG_AUX_DIR($libgloss_topdir) - -AC_CANONICAL_SYSTEM -AC_ARG_PROGRAM - -AC_PROG_INSTALL - -# FIXME: We temporarily define our own version of AC_PROG_CC. This is -# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We -# are probably using a cross compiler, which will not be able to fully -# link an executable. This should really be fixed in autoconf -# itself. - -AC_DEFUN(LIB_AC_PROG_CC, -[AC_BEFORE([$0], [AC_PROG_CPP])dnl -AC_CHECK_PROG(CC, gcc, gcc) -if test -z "$CC"; then - AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) - test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) -fi - -AC_PROG_CC_GNU - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -dnl Check whether -g works, even if CFLAGS is set, in case the package -dnl plays around with CFLAGS (such as to build both debugging and -dnl normal versions of a library), tasteless as that idea is. - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - AC_PROG_CC_G - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi -]) - -LIB_AC_PROG_CC -AS=${AS-as} -AC_SUBST(AS) -AR=${AR-ar} -AC_SUBST(AR) -LD=${LD-ld} -AC_SUBST(LD) -AC_PROG_RANLIB - -host_makefile_frag=${srcdir}/../config/default.mh - -dnl We have to assign the same value to other variables because autoconf -dnl doesn't provide a mechanism to substitute a replacement keyword with -dnl arbitrary data or pathnames. -dnl -host_makefile_frag_path=$host_makefile_frag -AC_SUBST(host_makefile_frag_path) -AC_SUBST_FILE(host_makefile_frag) - -AC_OUTPUT(Makefile, -. ${libgloss_topdir}/config-ml.in, -srcdir=${srcdir} -target=${target} -ac_configure_args="${ac_configure_args} --enable-multilib" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -libgloss_topdir=${libgloss_topdir} -) diff --git a/libgloss/cris/crt0.S b/libgloss/cris/crt0.S deleted file mode 100644 index a48efceb2..000000000 --- a/libgloss/cris/crt0.S +++ /dev/null @@ -1,83 +0,0 @@ -/* Generic simplistic start-up-stub for CRIS/CRISv32. - Copyright (C) 1993-2005 Axis Communications. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Neither the name of Axis Communications nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY AXIS COMMUNICATIONS AND ITS CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AXIS - COMMUNICATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. */ - -#undef cris -#undef L -#ifdef __NO_UNDERSCORES__ -#define L(x) x -#else -#define L(x) _ ## x -#endif - -; Rudimentary v0..v32-compatible startup stub. - -#ifdef __ELF__ - .section .startup,"ax" -#endif - .global __start - nop -__start: - ba 0f - nop - - .rept 256 - 2 - .dword _.int - .endr - -_.int: -#ifdef __arch_common_v10_v32 - ; This is just to allow the multilib to compile without - ; hackery: the "common" subset doesn't recognize - ; interrupt-return insns. -#elif __CRIS_arch_version >= 32 - rete - rfe -#else - reti - nop -#endif - -0: - move.d __setup,$r9 - jsr $r9 - nop -#ifdef __ELF__ - jsr L(_init) - nop - move.d L(_fini),$r10 - jsr L(atexit) - nop -#endif - jsr L(main) - nop - jsr L(exit) - nop -0: - nop - ba 0b - nop diff --git a/libgloss/cris/crti.c b/libgloss/cris/crti.c deleted file mode 100644 index ceb71e545..000000000 --- a/libgloss/cris/crti.c +++ /dev/null @@ -1,77 +0,0 @@ -/* Executable and DSO init/fini start for cris*-axis-linux-gnu and simulators - Copyright (C) 2000, 2001, 2004, 2005 Axis Communications. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Neither the name of Axis Communications nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY AXIS COMMUNICATIONS AND ITS CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AXIS - COMMUNICATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. */ - -#ifdef __ELF__ -__asm__ (".syntax no_register_prefix"); - -__asm__ (".section .init\n" -#ifdef __NO_UNDERSCORES__ - " .globl _init\n" - "_init:\n" -#else /* not __NO_UNDERSCORES__ */ - " .globl __init\n" - "__init:\n" -#endif /* not __NO_UNDERSCORES__ */ - "\tsubq 4,sp\n" - "\tmove srp,[sp]\n" -#ifdef __PIC__ - "\tsubq 4,sp\n" - "\tmove.d r0,[sp]\n" -#if __CRIS_arch_version >= 32 - "\tlapc _GLOBAL_OFFSET_TABLE_,$r0\n" -#else /* not __CRIS_arch_version >= 32 */ - "\tmove.d $pc,$r0\n" - "\tsub.d .:GOTOFF,$r0\n" -#endif /* not __CRIS_arch_version >= 32 */ -#endif /* __PIC__ */ - - "\t.section .fini\n" -#ifdef __NO_UNDERSCORES__ - " .globl _fini\n" - "_fini:\n" -#else /* not __NO_UNDERSCORES__ */ - " .globl __fini\n" - "__fini:\n" -#endif /* not __NO_UNDERSCORES__ */ - "\tsubq 4,sp\n" - "\tmove srp,[sp]\n" -#ifdef __PIC__ - "\tsubq 4,sp\n" - "\tmove.d r0,[sp]\n" -#if __CRIS_arch_version >= 32 - "\tlapc _GLOBAL_OFFSET_TABLE_,$r0\n" -#else /* not __CRIS_arch_version >= 32 */ - "\tmove.d $pc,$r0\n" - "\tsub.d .:GOTOFF,$r0\n" -#endif /* not __CRIS_arch_version >= 32 */ -#endif /* __PIC__ */ -); - -#else /* not __ELF__ */ -extern int Dummy; -#endif /* not __ELF__ */ diff --git a/libgloss/cris/crtn.c b/libgloss/cris/crtn.c deleted file mode 100644 index 012e5b1e4..000000000 --- a/libgloss/cris/crtn.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Executable and DSO init/fini end for cris*-axis-linux-gnu and simulators - Copyright (C) 2000, 2001, 2004, 2005 Axis Communications. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Neither the name of Axis Communications nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY AXIS COMMUNICATIONS AND ITS CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AXIS - COMMUNICATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. */ - -#ifdef __ELF__ - -__asm__ (".syntax no_register_prefix"); - -__asm__ (".section .init\n" -#ifdef __PIC__ - "\tmove.d [sp+],r0\n" -#endif - "\tmove.d [sp+],r9\n" - "\tjump r9\n" - "\tnop\n" - - "\t.section .fini\n" -#ifdef __PIC__ - "\tmove.d [sp+],r0\n" -#endif - "\tmove.d [sp+],r9\n" - "\tjump r9\n" - "\tnop\n"); - -#else -extern int Dummy; -#endif diff --git a/libgloss/cris/gensyscalls b/libgloss/cris/gensyscalls deleted file mode 100644 index 9df8b0376..000000000 --- a/libgloss/cris/gensyscalls +++ /dev/null @@ -1,252 +0,0 @@ -#! /bin/sh -# Copyright (C) 2005 Axis Communications. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Neither the name of Axis Communications nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY AXIS COMMUNICATIONS AND ITS CONTRIBUTORS -# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AXIS -# COMMUNICATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# To avoid an abundance of copyright/license messages for boilerplate -# code, we instead generate them from this file. Generating the -# function code could also be done automatically, but at the cost of -# slightly more intricate build machinery and/or scattered syscall -# information. Beware that the cat-lines must match the sed regexp -# "^cat > \([^ ]*\).*". - -lu='/* -*- buffer-read-only: t -*- - THIS FILE IS AUTOMATICALLY GENERATED - FROM "'$0'". */ -#include "linunistd.h" -#define R(x) return (x); } -' -lui="$lu int" -r=") { R (_Sys_" - -cat > close.c <<EOF -$lui _close (int fd${r}close (fd)) -EOF -cat > execve.c <<EOF -$lui _execve (char *path, char **argv, char **env${r}execve (path, argv, env)) -EOF -cat > exit.c <<EOF -$lu void _exit (int val) { _Sys_exit (val); /* Appease GCC: */ while (1) ; } -EOF -cat > fcntl.c <<EOF -$lui _fcntl (int fd, int cmd, long arg${r}fcntl (fd, cmd, arg)) -EOF -cat > fork.c <<EOF -$lui _fork (void${r}fork ()) -EOF -cat > fstat.c <<EOF -$lu#include <string.h> -#include <sys/stat.h> -int -_fstat (int fd, struct stat *buf) -{ - struct new_stat ks; - int retval = _Sys_fstat (fd, &ks); - - /* Blank before filling it in. */ - memset (buf, 0, sizeof (*buf)); - - /* We have to translate from the linux struct new_stat. - It seems we don't have to translate the contents, though. */ - buf->st_dev = ks.st_dev; - buf->st_ino = ks.st_ino; - buf->st_mode = ks.st_mode; - buf->st_nlink = ks.st_nlink; - buf->st_uid = ks.st_uid; - buf->st_gid = ks.st_gid; - buf->st_rdev = ks.st_rdev; - buf->st_size = ks.st_size; - buf->st_blksize = ks.st_blksize; - buf->st_blocks = ks.st_blocks; - buf->st_atime = ks.st_atime; - buf->st_mtime = ks.st_mtime; - buf->st_ctime = ks.st_ctime; - R (retval) -EOF -cat > getpid.c <<EOF -$lui _getpid (void${r}getpid ()) -EOF -cat > gettod.c <<EOF -$lu#include <sys/time.h> -#include <sys/times.h> -int -_gettimeofday (struct timeval *tp, struct timezone *tzp -${r}gettimeofday (tp, tzp)) -EOF -cat > isatty.c <<EOF -$lu -typedef unsigned int tcflag_t; -typedef unsigned char cc_t; -#define NCCS 19 - -struct termios { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ -}; - -/* From asm-etrax100/ioctls.h: beware of updates. */ -#define TCGETS 0x5401 - -/* Note that this name does not have a prepended underscore. */ -int -isatty (int fd) -{ - struct termios dummy; - int save_errno = errno; - int ret = _Sys_ioctl (fd, TCGETS, (unsigned long) &dummy); - errno = save_errno; - R (ret == 0) -EOF -cat > kill.c <<EOF -$lui _kill (int pid, int sig${r}kill (pid, sig)) -EOF -cat > link.c <<EOF -$lui _link (const char *old, const char *new${r}link (old, new)) -EOF -cat > lseek.c <<EOF -$lui _lseek (int fd, int offset, int whence${r}lseek (fd, offset, whence)) -EOF -cat > open.c <<EOF -$lui _open (const char *fnam, int flags, int mode${r}open (fnam, flags, mode)) -EOF -cat > read.c <<EOF -$lui _read (int fd, char *buf, int nbytes${r}read (fd, buf, nbytes)) -EOF -cat > rename.c <<EOF -$lui _rename (const char *old, const char *new${r}rename (old, new)) -EOF -cat > sbrk.c <<EOF -$lu -/* From asm-etrax100/mman.h: beware of updates. */ -#define PROT_READ 0x1 /* page can be read */ -#define PROT_WRITE 0x2 /* page can be written */ -#define MAP_ANONYMOUS 0x20 /* don't use a file */ -char * -_sbrk (int d) -{ - static long last_alloc = 0; - - /* FIXME: Things are a whole lot different than elinux. */ -#ifdef __elinux__ - - /* We can't promise linear memory from a predetermined location. - We're NO_MM. We're paria. We have to rely on tweaks and unclean - behavior. We abuse the fact that the malloc function in newlib - accepts nonlinear chunks in return to its sbrk calls (with a minor - patch). */ - - /* We use an "old" type mmap, which takes a pointer to a vector of 6 - longs where the parameters are stored. */ - long buffer[6]; - - /* We can't return memory. Well we could, but we would have to keep a - list of previous allocations. FIXME: Seems reasonable to do that - later. */ - if (d < 0) - return (char *) last_alloc; - - buffer[3] = MAP_ANONYMOUS; /* Not associated with a file. */ - buffer[4] = -1; /* No file. */ - buffer[0] = 0; /* Address 0: let mmap pick one. */ - buffer[1] = d; /* Length. */ - buffer[2] = (PROT_READ | PROT_WRITE); /* Protection flags. */ - buffer[5] = 0; /* Offset into file. */ - - last_alloc = _Sys_mmap (buffer); - - return (char *) last_alloc; - -#else /* not __elinux__ */ - - long prev_brk; - - if (last_alloc == 0) - { - last_alloc = _Sys_brk (0); - - if (last_alloc < 0) - return (char *) -1; - } - - prev_brk = last_alloc; - - if (_Sys_brk (last_alloc + d) < last_alloc + d) - return (char *) -1; - - last_alloc += d; - - return (char *) prev_brk; -#endif -} -EOF -cat > stat.c <<EOF -$lu#include <string.h> -#include <sys/stat.h> -int -_stat (const char *path, struct stat *buf) -{ - struct new_stat ks; - int retval = _Sys_stat (path, &ks); - - /* Blank before filling it in. */ - memset (buf, 0, sizeof (*buf)); - - /* We have to translate from the linux struct new_stat. - It seems we don't have to translate the contents, though. */ - buf->st_dev = ks.st_dev; - buf->st_ino = ks.st_ino; - buf->st_mode = ks.st_mode; - buf->st_nlink = ks.st_nlink; - buf->st_uid = ks.st_uid; - buf->st_gid = ks.st_gid; - buf->st_rdev = ks.st_rdev; - buf->st_size = ks.st_size; - buf->st_blksize = ks.st_blksize; - buf->st_blocks = ks.st_blocks; - buf->st_atime = ks.st_atime; - buf->st_mtime = ks.st_mtime; - buf->st_ctime = ks.st_ctime; - R (retval) -EOF -cat > times.c <<EOF -$lu#include <sys/times.h> -clock_t -_times (struct tms * tp${r}times (tp)) -EOF -cat > unlink.c <<EOF -$lui _unlink (const char *f${r}unlink (f)) -EOF -cat > wait.c <<EOF -$lui _wait (int *status${r}wait4 (_getpid(), status, 0, 0)) -EOF -cat > write.c <<EOF -$lui _write (int fd, char *buf, int nbytes${r}write (fd, buf, nbytes)) -EOF -exit 0 diff --git a/libgloss/cris/lcrt0.c b/libgloss/cris/lcrt0.c deleted file mode 100644 index ee5074634..000000000 --- a/libgloss/cris/lcrt0.c +++ /dev/null @@ -1,128 +0,0 @@ -/* Support for cris*-axis-linux-gnu and src/sim/cris simulator. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Axis Communications. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Neither the name of Axis Communications nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY AXIS COMMUNICATIONS AND ITS CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AXIS - COMMUNICATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. */ - -#include "linunistd.h" - -extern void exit (int) __attribute ((__noreturn__)); - -__asm__ (".syntax no_register_prefix"); - -#ifdef __ELF__ -/* This simulator magic for an earlier simulator was supposed to be - found two bytes before _start. Let's keep it for sake of - compatibility. Trying to emit them with an ordinary const char[] - and attribute section makes gcc barf; it doesn't like having the - same section attribute for both code and data. - The code is supposed to cause a crash if someone jumps to 0. */ -__asm__ - ( - " .section .startup,\"ax\",@progbits\n" - " .byte 55,55\n" - " move.d 0xbadacce5,r9\n" - " clear.d [r9]\n" - " setf\n" - " setf\n" - " .previous"); -#endif - -__asm__ - ( -#ifdef __AOUT__ - " .text\n\t" -#elif defined (__ELF__) - " .section .startup,\"ax\",@progbits\n" -#endif - " .global __start\n" - "__start:\n" - /* SP must be set up by the simulator or the system. */ - - /* Find ARGC, ARGV and ENV. */ - /* ARGC. */ - " move.d [sp],r10\n" - - /* ARGV. */ - " move.d sp,r11\n" - " addq 4,r11\n" - - /* ENVP. */ - " move.d sp,r12\n" - " addi r10.d,r12\n" - " addq 8,r12\n" - - /* Terminate R9 and R6; we don't have a "console_print_etrax" or system - call function. */ - " clear.d r9\n" - " clear.d r6\n" - " move.d __start1,r13\n" - " jump r13\n" - " setf\n" -#ifndef __AOUT__ - /* We rely on a.out not being in .data here. Quite fragile, but - covered by e.g. running the GCC test-suite for cris-unknown-aout. */ - " .previous" -#endif - ); - -extern void _Libctors (void); -extern void _Libdtors (void); - -extern void __init__start (void) __attribute ((weak)); -extern void __aout__ctors (void) __attribute ((weak)); - -static void start1 () __asm__ ("__start1") __attribute ((__used__)); -static void -start1 (int argc, char **argv, char **env) -{ -#ifdef __ELF__ - /* For ELF systems, we call _init and register _fini with atexit. */ - { - extern void _init (void); - extern void _fini (void); - _init (); - if (atexit (_fini) != 0) - exit (-1); - } -#else - /* Constructors which may get here through the ELF .init section, when - linking ELF and producing a.out. */ - if (__init__start) - __init__start (); - - if (__aout__ctors) - __aout__ctors (); - - /* Call constructors in shared libraries. */ - _Libctors (); - - if (atexit (_Libdtors) != 0) - exit (-1); -#endif - - /* Call the user program. */ - exit (main (argc, argv, env)); -} diff --git a/libgloss/cris/linunistd.h b/libgloss/cris/linunistd.h deleted file mode 100644 index 039679d4d..000000000 --- a/libgloss/cris/linunistd.h +++ /dev/null @@ -1,421 +0,0 @@ -/* Support for syscalls for cris*-axis-linux-gnu and simulators - Copyright (C) 1998-2005 Axis Communications. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Neither the name of Axis Communications nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY AXIS COMMUNICATIONS AND ITS CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AXIS - COMMUNICATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. */ - -/* Derived from asm-etrax100/unistd.h with minor modifications to fit as - LOSS for newlib. */ - -#ifndef _ASM_ELINUX_UNISTD_H_ -#define _ASM_ELINUX_UNISTD_H_ - -/* Our callers might want to use link_warning, so provide it from here. */ -#include "../libnosys/config.h" -#include "libnosys/warning.h" - -#include <errno.h> - -/* - * This file contains the system call numbers, and stub macros for libc. - */ - -#define __NR_setup 0 /* used only by init, to get system going */ -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_chown 16 -#define __NR_break 17 -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_stty 31 -#define __NR_gtty 32 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_ftime 35 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_prof 44 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_phys 52 -#define __NR_lock 53 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_mpx 56 -#define __NR_setpgid 57 -#define __NR_ulimit 58 -#define __NR_oldolduname 59 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_profil 98 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_ioperm 101 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_olduname 109 -#define __NR_iopl 110 -#define __NR_vhangup 111 -#define __NR_idle 112 -#define __NR_vm86 113 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_modify_ldt 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 /* Syscall for Andrew File System */ -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 - -#define __NR_mmap2 192 - -#define PASTE(x,y) x##y -#define XSTR(x) # x -#define STR(x) XSTR (x) - -#ifdef __elinux__ -# define CRIS_SYSCALL "jir .$System.call" -# define CALLNO_REG r1 -# define ARG5_REG r0 -# define MOVE_ARG5 "move.d" -# define COLON_ARG5_CLOBBER : "r0" -#else -# define CRIS_SYSCALL "break 13" -# define CALLNO_REG r9 -# define ARG5_REG srp -# define MOVE_ARG5 "move" -# define COLON_ARG5_CLOBBER -#endif - -/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */ -#define _syscall0(type,name) \ -type PASTE(_Sys_,name) (void) \ -{ \ - register long __a __asm__ ("r10"); \ - register long __n_ __asm__ (STR (CALLNO_REG)) = (__NR_##name); \ - __asm__ __volatile__ (CRIS_SYSCALL \ - : "=r" (__a) \ - : "r" (__n_)); \ - if (__a >= 0) \ - return (type) __a; \ - errno = -__a; \ - return -1; \ -} - -#define _syscall1(type,name,type1,arg1) \ -type PASTE(_Sys_,name) (type1 arg1) \ -{ \ - register long __a __asm__ ("r10") = (long) arg1; \ - register long __n_ __asm__ (STR (CALLNO_REG)) = (__NR_##name); \ - __asm__ __volatile__ (CRIS_SYSCALL \ - : "=r" (__a) \ - : "r" (__n_), "0" (__a)); \ - if (__a >= 0) \ - return (type) __a; \ - errno = -__a; \ - return -1; \ -} - -#define _syscall2(type,name,type1,arg1,type2,arg2) \ -type PASTE(_Sys_,name) (type1 arg1,type2 arg2) \ -{ \ - register long __a __asm__ ("r10") = (long) arg1; \ - register long __b __asm__ ("r11") = (long) arg2; \ - register long __n_ __asm__ (STR (CALLNO_REG)) = (__NR_##name); \ - __asm__ __volatile__ (CRIS_SYSCALL \ - : "=r" (__a) \ - : "r" (__n_), "0" (__a), "r" (__b)); \ - if (__a >= 0) \ - return (type) __a; \ - errno = -__a; \ - return -1; \ -} - -#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ -type PASTE(_Sys_,name) (type1 arg1,type2 arg2,type3 arg3) \ -{ \ - register long __a __asm__ ("r10") = (long) arg1; \ - register long __b __asm__ ("r11") = (long) arg2; \ - register long __c __asm__ ("r12") = (long) arg3; \ - register long __n_ __asm__ (STR (CALLNO_REG)) = (__NR_##name); \ - __asm__ __volatile__ (CRIS_SYSCALL \ - : "=r" (__a) \ - : "r" (__n_), "0" (__a), "r" (__b), "r" (__c)); \ - if (__a >= 0) \ - return (type) __a; \ - errno = -__a; \ - return -1; \ -} - -#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -type PASTE(_Sys_,name) (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -{ \ - register long __a __asm__ ("r10") = (long) arg1; \ - register long __b __asm__ ("r11") = (long) arg2; \ - register long __c __asm__ ("r12") = (long) arg3; \ - register long __d __asm__ ("r13") = (long) arg4; \ - register long __n_ __asm__ (STR (CALLNO_REG)) = (__NR_##name); \ - __asm__ __volatile__ (CRIS_SYSCALL \ - : "=r" (__a) \ - : "r" (__n_), "0" (__a), "r" (__b), \ - "r" (__c), "r" (__d)); \ - if (__a >= 0) \ - return (type) __a; \ - errno = -__a; \ - return -1; \ -} - -#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5) \ -type PASTE(_Sys_,name) (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ -{ \ - register long __a __asm__ ("r10") = (long) arg1; \ - register long __b __asm__ ("r11") = (long) arg2; \ - register long __c __asm__ ("r12") = (long) arg3; \ - register long __d __asm__ ("r13") = (long) arg4; \ - register long __n_ __asm__ (STR (CALLNO_REG)) = (__NR_##name); \ - __asm__ __volatile__ (MOVE_ARG5 " %6,$" STR (ARG5_REG) "\n\t" \ - CRIS_SYSCALL \ - : "=r" (__a) \ - : "r" (__n_), "0" (__a), "r" (__b), \ - "r" (__c), "r" (__d), "g" (arg5) \ - COLON_ARG5_CLOBBER); \ - if (__a >= 0) \ - return (type) __a; \ - errno = -__a; \ - return -1; \ -} - -#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5,type6,arg6) \ -type PASTE(_Sys_,name) (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, type6 arg6) \ -{ \ - register long __a __asm__ ("r10") = (long) arg1; \ - register long __b __asm__ ("r11") = (long) arg2; \ - register long __c __asm__ ("r12") = (long) arg3; \ - register long __d __asm__ ("r13") = (long) arg4; \ - register long __n_ __asm__ (STR (CALLNO_REG)) = (__NR_##name); \ - __asm__ __volatile__ (MOVE_ARG5 " %6,$" STR (ARG5_REG) "\n\t" \ - "move %7,$mof\n\t" \ - CRIS_SYSCALL \ - : "=r" (__a) \ - : "r" (__n_), "0" (__a), "r" (__b), \ - "r" (__c), "r" (__d), "g" (arg5), "g" (arg6) \ - COLON_ARG5_CLOBBER); \ - if (__a >= 0) \ - return (type) __a; \ - errno = -__a; \ - return -1; \ -} - -#define __NR__exit __NR_exit -static inline _syscall0(int,idle) -static inline _syscall0(int,fork) -static inline _syscall2(int,clone,unsigned long,flags,char *,esp) -static inline _syscall0(int,pause) -static inline _syscall0(int,setup) -static inline _syscall0(int,sync) -static inline _syscall3(int,write,int,fd,const char *,buf,unsigned,count) -static inline _syscall1(int,dup,int,fd) -static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) -static inline _syscall3(int,open,const char *,file,int,flag,int,mode) -static inline _syscall1(int,close,int,fd) -static inline _syscall1(int,_exit,int,exitcode) -static inline _syscall1(int,exit,int,exitcode) -static inline _syscall3(int,waitpid,int,pid,int *,wait_stat,int,options) -static inline _syscall3(int,read,int,fd,char *,buf,unsigned,count) -static inline _syscall2(int,socketcall,int,call,unsigned long *,args) -static inline _syscall3(int,ioctl,unsigned int,fd,unsigned int,cmd,unsigned long,arg) -static inline _syscall3(int,fcntl,unsigned int,fd,unsigned int,cmd,unsigned long,arg) -static inline _syscall5(int,mount,const char *,a,const char *,b,const char *,c,unsigned long,rwflag,const void *,data) -static inline _syscall2(int,rename,const char *,a,const char*,b) - -#ifndef __elinux__ -/* Make sure these are only used where they are supported. */ -static inline _syscall6(int,mmap2,unsigned long, addr, unsigned long, len, - unsigned long, prot, unsigned long, flags, - unsigned long, fd, unsigned long, pgoff) -static inline _syscall1(long,brk,long,addr) -#endif - -/* This structure is ripped from asm-etrax100/stat.h: beware of updates. */ -struct new_stat { - unsigned short st_dev; - unsigned short __pad1; - unsigned long st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned short st_rdev; - unsigned short __pad2; - unsigned long st_size; - unsigned long st_blksize; - unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; - unsigned long __unused4; - unsigned long __unused5; -}; - -static inline _syscall2(int,stat,const char *,path,struct new_stat *,statbuf) -static inline _syscall2(int,fstat,int,fd,struct new_stat *,statbuf) -static inline _syscall0(int,getpid) -static inline _syscall2(int,kill,int,pid,int,sig) -static inline _syscall3(int,lseek,int,fd,int,offset,int,whence) -struct tms; -static inline _syscall1(long,times,struct tms *,tbuf) -static inline _syscall1(long,mmap,long *, buf) -struct timeval; -struct timezone; -static inline _syscall2(int,gettimeofday,struct timeval *,tp, - struct timezone *, tzp) -static inline _syscall2(int,link,const char *,old,const char *,new) -static inline _syscall1(int,unlink,const char *, f) -struct rusage; -static inline _syscall4(int,wait4,int,pid,int *,sa,int,op,struct rusage *,ru) -#endif /* _ASM_ELINUX_UNISTD_H_ */ diff --git a/libgloss/cris/outbyte.c b/libgloss/cris/outbyte.c deleted file mode 100644 index 1cb686b96..000000000 --- a/libgloss/cris/outbyte.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Low-level kind-of-support for CRIS. Mostly used as a placeholder - function. Too small and obvious to warrant a copyright notice. */ - -#include <stdio.h> -void -outbyte (int ch) -{ - write (1, &ch, 1); -} diff --git a/libgloss/cris/setup.S b/libgloss/cris/setup.S deleted file mode 100644 index ef0be7109..000000000 --- a/libgloss/cris/setup.S +++ /dev/null @@ -1,44 +0,0 @@ -/* Support for standalone CRIS/CRISv32 code. - Copyright (C) 2005 Axis Communications. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Neither the name of Axis Communications nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY AXIS COMMUNICATIONS AND ITS CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AXIS - COMMUNICATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. */ - - .text - .global __setup -__setup: - /* Make sure to save SRP. */ -#ifdef __arch_common_v10_v32 - /* Can't do anything if we don't know for which arch. This file is - then only a placeholder. Oh, and we can't use the "ret" insn in - "common" code. */ -#else - /* Code missing: - - Initialize RAM circuits. - - Initialize serial output and input. - - Set stack-pointer. */ - ret - nop -#endif |