mirror of
https://github.com/encounter/newlib.git
synced 2026-03-30 11:31:09 -07:00
20000317 sourceware import
This commit is contained in:
+3007
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,185 @@
|
||||
# Top level makefile for libgloss
|
||||
#
|
||||
# Copyright (c) 1995, 1996 Cygnus Support
|
||||
#
|
||||
# The authors hereby grant permission to use, copy, modify, distribute,
|
||||
# and license this software and its documentation for any purpose, provided
|
||||
# that existing copyright notices are retained in all copies and that this
|
||||
# notice is included verbatim in any distributions. No written agreement,
|
||||
# license, or royalty fee is required for any of the authorized uses.
|
||||
# Modifications to this software may be copyrighted by their authors
|
||||
# and need not follow the licensing terms described here, provided that
|
||||
# the new terms are clearly indicated on the first page of each file where
|
||||
# they apply.
|
||||
#
|
||||
|
||||
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)
|
||||
|
||||
TOP = .
|
||||
SRCTOP = .
|
||||
|
||||
# Multilib support variables.
|
||||
# TOP is used instead of MULTI{BUILD,SRC}TOP.
|
||||
MULTISRCTOP =
|
||||
MULTIBUILDTOP =
|
||||
MULTIDIRS =
|
||||
MULTISUBDIR =
|
||||
MULTIDO = true
|
||||
MULTICLEAN = true
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
CC = @CC@
|
||||
|
||||
AS = @AS@
|
||||
AR = @AR@
|
||||
LD = @LD@
|
||||
RANLIB = @RANLIB@
|
||||
|
||||
AR_FLAGS = qv
|
||||
BISON = bison
|
||||
MAKEINFO = makeinfo
|
||||
|
||||
SUBDIRS = @subdirs@
|
||||
|
||||
.NOEXPORT:
|
||||
MAKEOVERRIDES=
|
||||
|
||||
# Host specific makefile fragment comes in here.
|
||||
@host_makefile_frag@
|
||||
|
||||
# These are roughly topologically sorted in order to make porting more
|
||||
# streamlined.
|
||||
FLAGS_TO_PASS = \
|
||||
"CC=$(CC)" \
|
||||
"CFLAGS=$(CFLAGS)" \
|
||||
"AR=$(AR)" \
|
||||
"RANLIB=$(RANLIB)" \
|
||||
"AR_FLAGS=$(AR_FLAGS)" \
|
||||
"MAKEINFO=$(MAKEINFO)" \
|
||||
"AS=$(AS)" \
|
||||
"LD=$(LD)" \
|
||||
"CROSS_CFLAGS=$(CROSS_CFLAGS)" \
|
||||
"TARGET_CFLAGS=$(TARGET_CFLAGS)" \
|
||||
"exec_prefix=$(exec_prefix)" \
|
||||
"prefix=$(prefix)" \
|
||||
"tooldir=$(tooldir)" \
|
||||
"INSTALL=$(INSTALL)" \
|
||||
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
|
||||
"INSTALL_DATA=$(INSTALL_DATA)"
|
||||
|
||||
all: stmp-bsp force
|
||||
@rootpre=`pwd`/; export rootpre; \
|
||||
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
|
||||
$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
|
||||
|
||||
stmp-bsp: force
|
||||
@rootpre=`pwd`/; export rootpre; \
|
||||
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
|
||||
for dir in .. ${SUBDIRS}; do \
|
||||
if [ x$$dir != x.. ]; then \
|
||||
if [ -d $$dir ]; then \
|
||||
(cd $$dir; $(MAKE) $(FLAGS_TO_PASS)); \
|
||||
else true; fi; \
|
||||
else true; fi; \
|
||||
done
|
||||
|
||||
install: force
|
||||
@rootpre=`pwd`/; export rootpre; \
|
||||
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
|
||||
for dir in .. ${SUBDIRS}; do \
|
||||
if [ x$$dir != x.. ]; then \
|
||||
if [ -d $$dir ]; then \
|
||||
(cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install); \
|
||||
else true; fi; \
|
||||
else true; fi; \
|
||||
done
|
||||
@rootpre=`pwd`/; export rootpre; \
|
||||
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
|
||||
$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
|
||||
|
||||
test: force
|
||||
@rootpre=`pwd`/; export rootpre; \
|
||||
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
|
||||
for dir in .. ${SUBDIRS}; do \
|
||||
if [ x$$dir != x.. ]; then \
|
||||
if [ -d $$dir ]; then \
|
||||
(cd $$dir; $(MAKE) $(FLAGS_TO_PASS) test); \
|
||||
else true; fi; \
|
||||
else true; fi; \
|
||||
done
|
||||
@rootpre=`pwd`/; export rootpre; \
|
||||
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
|
||||
$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=test
|
||||
|
||||
clean-here:
|
||||
-rm -f *~ core *.o a.out xgdb *.x
|
||||
|
||||
clean mostlyclean: clean-here
|
||||
rootpre=`pwd`/; export rootpre; \
|
||||
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
|
||||
$(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \
|
||||
$(MULTICLEAN) multi-clean DO=$@
|
||||
|
||||
distclean maintainer-clean realclean: clean-here
|
||||
-rm -f Makefile config.cache config.log config.status
|
||||
-rm -f *-init.exp site.*
|
||||
-rm -fr *.log summary detail *.sum
|
||||
rootpre=`pwd`/; export rootpre; \
|
||||
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
|
||||
$(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \
|
||||
$(MULTICLEAN) multi-clean DO=$@
|
||||
|
||||
.PHONY: info install-info clean-info
|
||||
subdir_do:
|
||||
@rootpre=`pwd`/; export rootpre; \
|
||||
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
|
||||
for i in .. $(DODIRS); do \
|
||||
if [ x$$i != x.. ]; then \
|
||||
if [ -f ./$$i/Makefile ]; then \
|
||||
if (cd ./$$i; $(MAKE) $(FLAGS_TO_PASS) $(DO)); then \
|
||||
true; \
|
||||
else \
|
||||
exit 1; \
|
||||
fi; \
|
||||
else true; fi; \
|
||||
else true; fi; \
|
||||
done
|
||||
|
||||
info dvi docs:
|
||||
rootpre=`pwd`/; export rootpre; \
|
||||
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
|
||||
$(MAKE) DO=$@ DODIRS=doc $(FLAGS_TO_PASS) subdir_do
|
||||
|
||||
install-info:
|
||||
rootpre=`pwd`/; export rootpre; \
|
||||
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
|
||||
$(MAKE) DO=$@ DODIRS=doc $(FLAGS_TO_PASS) subdir_do
|
||||
|
||||
clean-info:
|
||||
|
||||
force:
|
||||
|
||||
Makefile: Makefile.in config.status @host_makefile_frag_path@
|
||||
$(SHELL) config.status
|
||||
|
||||
config.status: configure
|
||||
$(SHELL) config.status --recheck
|
||||
@@ -0,0 +1,5 @@
|
||||
sparc - Fujitsu Sparclite board. Works on the ex930, ex931, ex933
|
||||
hp74x - Hewlett Packard HP742 board. Also some support for the hp743.
|
||||
m68k - Motorola MVME135 and IDP board. For CPU32 systems.
|
||||
pa - WinBond and Oki boards with a PA.
|
||||
mips - R3000 support. Array Tech LSI33k based RAID disk controller.
|
||||
@@ -0,0 +1,25 @@
|
||||
/* close.c -- close a file descriptor.
|
||||
*
|
||||
* Copyright (c) 1995 Cygnus Support
|
||||
*
|
||||
* The authors hereby grant permission to use, copy, modify, distribute,
|
||||
* and license this software and its documentation for any purpose, provided
|
||||
* that existing copyright notices are retained in all copies and that this
|
||||
* notice is included verbatim in any distributions. No written agreement,
|
||||
* license, or royalty fee is required for any of the authorized uses.
|
||||
* Modifications to this software may be copyrighted by their authors
|
||||
* and need not follow the licensing terms described here, provided that
|
||||
* the new terms are clearly indicated on the first page of each file where
|
||||
* they apply.
|
||||
*/
|
||||
#include "glue.h"
|
||||
|
||||
/*
|
||||
* close -- We don't need to do anything, but pretend we did.
|
||||
*/
|
||||
int
|
||||
_DEFUN (close ,(fd),
|
||||
int fd)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi`
|
||||
NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi`
|
||||
|
||||
INCLUDES = -I. -I$(srcdir)/..
|
||||
# Note that when building the library, ${MULTILIB} is not the way multilib
|
||||
# options are passed; they're passed in $(CFLAGS).
|
||||
CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
|
||||
LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS}
|
||||
AR_FLAGS = qc
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
|
||||
|
||||
.C.o:
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
|
||||
.s.o:
|
||||
$(AS) $(ASFLAGS_FOR_TARGET) $(INCLUDES) $(ASFLAGS) -o $*.o $<
|
||||
|
||||
#
|
||||
# GCC knows to run the preprocessor on .S files before it assembles them.
|
||||
#
|
||||
.S.o:
|
||||
$(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $<
|
||||
|
||||
#
|
||||
# this is a bogus target that'll produce an assembler from the
|
||||
# C source with the right compiler options. this is so we can
|
||||
# track down code generation or debug symbol bugs.
|
||||
#
|
||||
.c.s:
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -S $(INCLUDES) $(CFLAGS) $<
|
||||
@@ -0,0 +1,33 @@
|
||||
#
|
||||
# these are the minimum required stubs to support newlib
|
||||
#
|
||||
close.o: ${srcdir}/../close.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
fstat.o: ${srcdir}/../fstat.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
getpid.o: ${srcdir}/../getpid.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
isatty.o: ${srcdir}/../isatty.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
kill.o: ${srcdir}/../kill.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
lseek.o: ${srcdir}/../lseek.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
open.o: ${srcdir}/../open.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
print.o: ${srcdir}/../print.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
putnum.o: ${srcdir}/../putnum.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
read.o: ${srcdir}/../read.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
sbrk.o: ${srcdir}/../sbrk.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
stat.o: ${srcdir}/../stat.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
unlink.o: ${srcdir}/../unlink.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
write.o: ${srcdir}/../write.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
debug.o: ${srcdir}/../debug.c ${srcdir}/../debug.h
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) ${srcdir}/../debug.c
|
||||
@@ -0,0 +1,57 @@
|
||||
NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi`
|
||||
NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/; fi`
|
||||
|
||||
INCLUDES = -I.
|
||||
# Note that when building the library, ${MULTILIB} is not the way multilib
|
||||
# options are passed; they're passed in $(CFLAGS).
|
||||
CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
|
||||
LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS}
|
||||
ARFLAGS_FOR_TARGET = qc
|
||||
|
||||
# find the tools used to build libgloss. As this is a DOS build in a
|
||||
# 3way cross, we have to specify the name as it lives prebuilt in Unix
|
||||
# land. The freshly built tools are for the wrong architecture.
|
||||
CC_FOR_TARGET = `t='$(program_transform_name)'; echo gcc | sed -e $$t`
|
||||
|
||||
AS_FOR_TARGET = `t='$(program_transform_name)'; echo as | sed -e $$t`
|
||||
|
||||
AR_FOR_TARGET = `t='$(program_transform_name)'; echo ar | sed -e $$t`
|
||||
|
||||
LD_FOR_TARGET = `t='$(program_transform_name)'; echo ld | sed -e $$t`
|
||||
|
||||
RANLIB_FOR_TARGET = `t='$(program_transform_name)'; echo ranlib | sed -e $$t`
|
||||
|
||||
OBJDUMP_FOR_TARGET = `t='$(program_transform_name)'; echo objdump | sed -e $$t`
|
||||
|
||||
OBJCOPY_FOR_TARGET = `t='$(program_transform_name)'; echo objcopy | sed -e $$t`
|
||||
|
||||
|
||||
# Using CFLAGS here may be confusing if the user has given a special
|
||||
# CFLAGS intended for use on the host, since we are passing it to the
|
||||
# cross-compiler; I'm not sure what to do about this. INCLUDES is
|
||||
# from the top level Makefile.
|
||||
# FIXME: But isn't CFLAGS what is used to pass multilib options when
|
||||
# building the library?
|
||||
|
||||
.c.o:
|
||||
rootme=`pwd` ; \
|
||||
echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \
|
||||
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
|
||||
|
||||
.c.s:
|
||||
rootme=`pwd` ; \
|
||||
echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \
|
||||
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) -S $(INCLUDES) $<
|
||||
|
||||
.S.o:
|
||||
rootme=`pwd` ; \
|
||||
echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \
|
||||
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
|
||||
|
||||
.s.o:
|
||||
rootme=`pwd` ; \
|
||||
echo AS_FOR_TARGET is ${AS_FOR_TARGET} ; \
|
||||
$(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) $(INCLUDES) -o $*.o $<
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# These are the minimum required stubs to support newlib
|
||||
# for embedded MIPS targets. Note that although read.o and write.o
|
||||
# are mentioned here, they are not used for all targets.
|
||||
#
|
||||
close.o: ${srcdir}/../close.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
fstat.o: ${srcdir}/../fstat.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
getpid.o: ${srcdir}/../getpid.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
isatty.o: ${srcdir}/../isatty.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
kill.o: ${srcdir}/../kill.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
lseek.o: ${srcdir}/../lseek.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
open.o: ${srcdir}/../open.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
print.o: ${srcdir}/../print.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
putnum.o: ${srcdir}/../putnum.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
read.o: ${srcdir}/../read.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
stat.o: ${srcdir}/../stat.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
unlink.o: ${srcdir}/../unlink.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
write.o: ${srcdir}/../write.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $?
|
||||
@@ -0,0 +1,3 @@
|
||||
# Dummy target-specific Makefile fragment for MN10200. We can't
|
||||
# use default.mt because it refers to generic source files whose
|
||||
# names conflict with the MN10200-specific sources.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Dummy target-specific Makefile fragment for MN10300. We can't
|
||||
# use default.mt because it refers to generic source files whose
|
||||
# names conflict with the MN10300-specific sources.
|
||||
@@ -0,0 +1,35 @@
|
||||
NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi`
|
||||
NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi`
|
||||
|
||||
# For the PowerPC, always add -mrelocatable-lib -mno-eabi. These are set for the
|
||||
# multilibs, but are ignored when building the toplevel directory.
|
||||
CFLAGS_MRELOCATABLE = -mrelocatable-lib -mno-eabi
|
||||
|
||||
INCLUDES = -I. -I$(srcdir)/..
|
||||
# Note that when building the library, ${MULTILIB} is not the way multilib
|
||||
# options are passed; they're passed in $(CFLAGS).
|
||||
CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
|
||||
LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS}
|
||||
AR_FLAGS = qc
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) -O2 $(INCLUDES) -c $(CFLAGS) $<
|
||||
|
||||
.C.o:
|
||||
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) -O2 $(INCLUDES) -c $(CFLAGS) $<
|
||||
.s.o:
|
||||
$(AS) $(ASFLAGS_FOR_TARGET) $(INCLUDES) $(ASFLAGS) -o $*.o $<
|
||||
|
||||
#
|
||||
# GCC knows to run the preprocessor on .S files before it assembles them.
|
||||
#
|
||||
.S.o:
|
||||
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) $(INCLUDES) $(CFLAGS) -c $<
|
||||
|
||||
#
|
||||
# this is a bogus target that'll produce an assembler from the
|
||||
# C source with the right compiler options. this is so we can
|
||||
# track down code generation or debug symbol bugs.
|
||||
#
|
||||
.c.s:
|
||||
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) -S $(INCLUDES) $(CFLAGS) $<
|
||||
+1403
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,168 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.7)dnl
|
||||
AC_INIT(README)
|
||||
|
||||
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_PROG_INSTALL
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
if test -z "${with_multisubdir}" ; then
|
||||
configdirs="doc libnosys"
|
||||
else
|
||||
configdirs="libnosys"
|
||||
fi
|
||||
|
||||
case "${target}" in
|
||||
i386-*-elf*)
|
||||
configdirs="${configdirs} i386 testsuite";
|
||||
;;
|
||||
m32r-*-*)
|
||||
configdirs="${configdirs} m32r testsuite"
|
||||
;;
|
||||
m68*-*-*)
|
||||
configdirs="${configdirs} m68k testsuite"
|
||||
;;
|
||||
hppa*-*-pro*)
|
||||
configdirs="${configdirs} pa testsuite"
|
||||
;;
|
||||
i960-*-coff)
|
||||
configdirs="${configdirs} i960 testsuite"
|
||||
;;
|
||||
sparc-*-elf*)
|
||||
configdirs="${configdirs} sparc testsuite"
|
||||
;;
|
||||
sparc64-*-elf*)
|
||||
configdirs="${configdirs} sparc testsuite"
|
||||
;;
|
||||
sparc86x-*-*)
|
||||
configdirs="${configdirs} sparc testsuite"
|
||||
;;
|
||||
sparclite-*-*)
|
||||
configdirs="${configdirs} sparc testsuite"
|
||||
;;
|
||||
sparclet-*-aout*)
|
||||
configdirs="${configdirs} sparc sparc/libsys testsuite"
|
||||
;;
|
||||
*arm-wince-pe)
|
||||
configdirs="wince"
|
||||
;;
|
||||
sh*-*-pe)
|
||||
configdirs="wince"
|
||||
;;
|
||||
mips*-*-pe)
|
||||
configdirs="wince"
|
||||
;;
|
||||
mips*-*-*)
|
||||
configdirs="${configdirs} mips testsuite"
|
||||
;;
|
||||
powerpc-*-*|powerpcle-*-*)
|
||||
configdirs="${configdirs} rs6000 testsuite"
|
||||
;;
|
||||
mn10200-*-*)
|
||||
configdirs="${configdirs} mn10200 testsuite"
|
||||
;;
|
||||
mn10300-*-*)
|
||||
configdirs="${configdirs} mn10300 testsuite"
|
||||
;;
|
||||
d30v-*-*)
|
||||
configdirs="${configdirs} d30v testsuite"
|
||||
;;
|
||||
fr30-*-*)
|
||||
configdirs="${configdirs} fr30 testsuite"
|
||||
;;
|
||||
mcore-*-*)
|
||||
configdirs="${configdirs} mcore testsuite"
|
||||
;;
|
||||
esac
|
||||
|
||||
# temporarily strip out testsuite
|
||||
configdirs=`echo $configdirs | sed 's/testsuite//'`
|
||||
|
||||
AC_CONFIG_SUBDIRS($configdirs)
|
||||
|
||||
# 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)
|
||||
AC_CHECK_PROG(AR, ar, ar, :)
|
||||
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)
|
||||
|
||||
# for now, only add multilibs for specific targets
|
||||
AC_OUTPUT(Makefile,
|
||||
. ${libgloss_topdir}/config-ml.in,
|
||||
srcdir=${srcdir}
|
||||
target=${target}
|
||||
with_multisubdir=${with_multisubdir}
|
||||
ac_configure_args="--enable-multilib ${ac_configure_args}"
|
||||
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
libgloss_topdir=${libgloss_topdir}
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
# Copyright (c) 1997 Cygnus Support
|
||||
#
|
||||
# The authors hereby grant permission to use, copy, modify, distribute,
|
||||
# and license this software and its documentation for any purpose, provided
|
||||
# that existing copyright notices are retained in all copies and that this
|
||||
# notice is included verbatim in any distributions. No written agreement,
|
||||
# license, or royalty fee is required for any of the authorized uses.
|
||||
# Modifications to this software may be copyrighted by their authors
|
||||
# and need not follow the licensing terms described here, provided that
|
||||
# the new terms are clearly indicated on the first page of each file where
|
||||
# they apply.
|
||||
#
|
||||
|
||||
#
|
||||
# This currently works with the D30V simulator.
|
||||
#
|
||||
|
||||
VPATH = @srcdir@ @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)
|
||||
|
||||
# Multilib support variables.
|
||||
# TOP is used instead of MULTI{BUILD,SRC}TOP.
|
||||
MULTIDIRS =
|
||||
MULTISUBDIR =
|
||||
MULTIDO = true
|
||||
MULTICLEAN = true
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
|
||||
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`
|
||||
|
||||
OBJS = isatty.o print.o putnum.o sbrk.o
|
||||
CFLAGS = -g
|
||||
SCRIPTS = ${SIM_SCRIPTS}
|
||||
|
||||
# Here is all of the simulator stuff
|
||||
SIM_SCRIPTS =
|
||||
SIM_LDFLAGS =
|
||||
SIM_BSP = libsim.a
|
||||
SIM_CRT0 = crt0.o
|
||||
SIM_OBJS = syscalls.o outbyte.o inbyte.o
|
||||
SIM_TEST =
|
||||
SIM_INSTALL = install-sim
|
||||
|
||||
# Host specific makefile fragment comes in here.
|
||||
@host_makefile_frag@
|
||||
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
all: ${SIM_CRT0} ${SIM_BSP}
|
||||
|
||||
#
|
||||
# here's where we build the board support packages for each target
|
||||
#
|
||||
|
||||
${SIM_BSP}: ${OBJS} ${SIM_OBJS}
|
||||
${AR} ${ARFLAGS} $@ ${SIM_OBJS} ${OBJS}
|
||||
${RANLIB} $@
|
||||
|
||||
#
|
||||
# here's where we build the test programs for each target
|
||||
#
|
||||
.PHONY: test
|
||||
test: ${SIM_TEST}
|
||||
|
||||
crt0.o: crt0.S
|
||||
syscalls.o: syscalls.c $(srcdir)/../syscall.h
|
||||
outbyte.o: outbyte.c
|
||||
inbyte.o: inbyte.c
|
||||
|
||||
isatty.o: $(srcdir)/../isatty.c
|
||||
print.o: $(srcdir)/../print.c
|
||||
putnum.o: $(srcdir)/../putnum.c
|
||||
sbrk.o: $(srcdir)/../sbrk.c
|
||||
|
||||
clean mostlyclean:
|
||||
rm -f a.out core *.[oais] *-test *.srec *.dis *.x syscall.h
|
||||
|
||||
distclean maintainer-clean realclean: clean
|
||||
rm -f Makefile config.status *~
|
||||
|
||||
.PHONY: install info install-info clean-info
|
||||
install: ${SIM_INSTALL}
|
||||
|
||||
install-sim:
|
||||
set -e; for x in ${SIM_CRT0} ${SIM_BSP} ${SIM_SCRIPTS}; do ${INSTALL_DATA} $$x ${tooldir}/lib${MULTISUBDIR}/$$x; done
|
||||
|
||||
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
|
||||
+1191
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,90 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.5)dnl
|
||||
AC_INIT(crt0.S)
|
||||
|
||||
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}
|
||||
)
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* crt0.S -- startup file for D30V systems.
|
||||
*
|
||||
* Copyright (c) 1997 Cygnus Support
|
||||
*
|
||||
* The authors hereby grant permission to use, copy, modify, distribute,
|
||||
* and license this software and its documentation for any purpose, provided
|
||||
* that existing copyright notices are retained in all copies and that this
|
||||
* notice is included verbatim in any distributions. No written agreement,
|
||||
* license, or royalty fee is required for any of the authorized uses.
|
||||
* Modifications to this software may be copyrighted by their authors
|
||||
* and need not follow the licensing terms described here, provided that
|
||||
* the new terms are clearly indicated on the first page of each file where
|
||||
* they apply.
|
||||
*/
|
||||
|
||||
.file "crt0.S"
|
||||
.text
|
||||
.globl _start
|
||||
.extern main
|
||||
.extern exit
|
||||
.extern __stack
|
||||
.extern __sbss_start
|
||||
.extern __sbss_end
|
||||
.extern __ebss_start
|
||||
.extern __ebss_end
|
||||
.extern __bss_start
|
||||
.extern __bss_end
|
||||
.extern memset
|
||||
.type _start,@function
|
||||
|
||||
_start: or.l sp,r0,__stack
|
||||
|
||||
/* Zero the .sbss area */
|
||||
or.l r2,r0,__sbss_start
|
||||
or.l r4,r0,__sbss_end
|
||||
sub r4,r4,r2 || or.s r3,r0,0
|
||||
bsrtnz.l r4,(memset)
|
||||
|
||||
/* Zero the .ebss area */
|
||||
or.l r2,r0,__ebss_start
|
||||
or.l r4,r0,__ebss_end
|
||||
sub r4,r4,r2 || or.s r3,r0,0
|
||||
bsrtnz.l r4,(memset)
|
||||
|
||||
/* Zero the .bss area */
|
||||
or.l r2,r0,__bss_start
|
||||
or.l r4,r0,__bss_end
|
||||
sub r4,r4,r2 || or.s r3,r0,0
|
||||
bsrtnz.l r4,(memset)
|
||||
|
||||
or.s r2,r0,0 || or.s r3,r0,0
|
||||
or r4,r0,0 || nop
|
||||
jsr.l (main)
|
||||
jsr.l (exit)
|
||||
.size _start,.-_start
|
||||
@@ -0,0 +1,24 @@
|
||||
/* inbyte -- read a single byte.
|
||||
*
|
||||
* Copyright (c) 1997 Cygnus Support
|
||||
*
|
||||
* The authors hereby grant permission to use, copy, modify, distribute,
|
||||
* and license this software and its documentation for any purpose, provided
|
||||
* that existing copyright notices are retained in all copies and that this
|
||||
* notice is included verbatim in any distributions. No written agreement,
|
||||
* license, or royalty fee is required for any of the authorized uses.
|
||||
* Modifications to this software may be copyrighted by their authors
|
||||
* and need not follow the licensing terms described here, provided that
|
||||
* the new terms are clearly indicated on the first page of each file where
|
||||
* they apply.
|
||||
*/
|
||||
|
||||
int
|
||||
inbyte (void)
|
||||
{
|
||||
char ch;
|
||||
if (read (0, &ch, 1) == 1)
|
||||
return ch;
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/* outbyte -- write a single byte.
|
||||
*
|
||||
* Copyright (c) 1997 Cygnus Support
|
||||
*
|
||||
* The authors hereby grant permission to use, copy, modify, distribute,
|
||||
* and license this software and its documentation for any purpose, provided
|
||||
* that existing copyright notices are retained in all copies and that this
|
||||
* notice is included verbatim in any distributions. No written agreement,
|
||||
* license, or royalty fee is required for any of the authorized uses.
|
||||
* Modifications to this software may be copyrighted by their authors
|
||||
* and need not follow the licensing terms described here, provided that
|
||||
* the new terms are clearly indicated on the first page of each file where
|
||||
* they apply.
|
||||
*/
|
||||
|
||||
void
|
||||
outbyte (int byte)
|
||||
{
|
||||
char ch = byte;
|
||||
write (1, &ch, 1);
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
/*
|
||||
* syscalls.c -- provide system call support via trap 31
|
||||
*
|
||||
* Copyright (c) 1997 Cygnus Support
|
||||
*
|
||||
* The authors hereby grant permission to use, copy, modify, distribute,
|
||||
* and license this software and its documentation for any purpose, provided
|
||||
* that existing copyright notices are retained in all copies and that this
|
||||
* notice is included verbatim in any distributions. No written agreement,
|
||||
* license, or royalty fee is required for any of the authorized uses.
|
||||
* Modifications to this software may be copyrighted by their authors
|
||||
* and need not follow the licensing terms described here, provided that
|
||||
* the new terms are clearly indicated on the first page of each file where
|
||||
* they apply.
|
||||
*
|
||||
* Read bytes, using simulator trap 31.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "syscall.h"
|
||||
|
||||
extern int *__errno(), errno;
|
||||
|
||||
__asm__ (
|
||||
" .globl __syscall
|
||||
.type __syscall,@function
|
||||
__syscall:
|
||||
trap 31 || nop
|
||||
cmpge f0,r2,0 -> jmp/tx link
|
||||
bra __set_errno
|
||||
.size __syscall,.-__syscall
|
||||
");
|
||||
|
||||
int
|
||||
__set_errno (int new_errno)
|
||||
{
|
||||
errno = new_errno;
|
||||
*(__errno)() = errno;
|
||||
return -1;
|
||||
}
|
||||
|
||||
void
|
||||
_exit (int status)
|
||||
{
|
||||
__syscall (status, 0, 0, 0, SYS_exit);
|
||||
}
|
||||
|
||||
int
|
||||
open (const char *filename, int flags, int mode)
|
||||
{
|
||||
return __syscall (filename, flags, mode, 0, SYS_open);
|
||||
}
|
||||
|
||||
int
|
||||
close (int filedes)
|
||||
{
|
||||
return __syscall (filedes, 0, 0, 0, SYS_close);
|
||||
}
|
||||
|
||||
int
|
||||
read (int filedes, void *buffer, size_t length)
|
||||
{
|
||||
return __syscall (filedes, buffer, length, 0, SYS_read);
|
||||
}
|
||||
|
||||
int
|
||||
write (int filedes, void *buffer, size_t length)
|
||||
{
|
||||
return __syscall (filedes, buffer, length, 0, SYS_write);
|
||||
}
|
||||
|
||||
long
|
||||
lseek (int filedes, long offset, int whence)
|
||||
{
|
||||
return __syscall (filedes, offset, whence, 0, SYS_lseek);
|
||||
}
|
||||
|
||||
int
|
||||
unlink (const char *filename)
|
||||
{
|
||||
return __syscall (filename, 0, 0, 0, SYS_unlink);
|
||||
}
|
||||
|
||||
int
|
||||
getpid (void)
|
||||
{
|
||||
return __syscall (0, 0, 0, 0, SYS_getpid);
|
||||
}
|
||||
|
||||
int
|
||||
kill (int signal, int pid)
|
||||
{
|
||||
return __syscall (signal, pid, 0, 0, SYS_kill);
|
||||
}
|
||||
|
||||
int
|
||||
fstat (int filedes, void *info)
|
||||
{
|
||||
return __syscall (filedes, info, 0, 0, SYS_fstat);
|
||||
}
|
||||
|
||||
int
|
||||
__argvlen (void)
|
||||
{
|
||||
return __syscall (0, 0, 0, 0, SYS_argvlen);
|
||||
}
|
||||
|
||||
int
|
||||
__argv (void)
|
||||
{
|
||||
return __syscall (0, 0, 0, 0, SYS_argv);
|
||||
}
|
||||
|
||||
int
|
||||
chdir (char *dir)
|
||||
{
|
||||
return __syscall (dir, 0, 0, 0, SYS_chdir);
|
||||
}
|
||||
|
||||
int
|
||||
stat (const char *filename, void *info)
|
||||
{
|
||||
return __syscall (filename, info, 0, 0, SYS_stat);
|
||||
}
|
||||
|
||||
int
|
||||
chmod (const char *filename, int mode)
|
||||
{
|
||||
return __syscall (filename, mode, 0, 0, SYS_chmod);
|
||||
}
|
||||
|
||||
int
|
||||
utime (const char *filename, void *packet)
|
||||
{
|
||||
return __syscall (filename, packet, 0, 0, SYS_utime);
|
||||
}
|
||||
|
||||
time_t
|
||||
time (time_t *time_ptr)
|
||||
{
|
||||
time_t result;
|
||||
result = (time_t) __syscall (time_ptr, 0, 0, 0, SYS_time);
|
||||
if (time_ptr != NULL)
|
||||
*time_ptr = result;
|
||||
return result;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user