diff options
Diffstat (limited to 'c/src/lib/libbsp/unix/posix')
38 files changed, 0 insertions, 4202 deletions
diff --git a/c/src/lib/libbsp/unix/posix/Makefile.in b/c/src/lib/libbsp/unix/posix/Makefile.in deleted file mode 100644 index decc17df5b..0000000000 --- a/c/src/lib/libbsp/unix/posix/Makefile.in +++ /dev/null @@ -1,35 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../../../../.. -subdir = c/src/lib/libbsp/unix/posix - -INSTALL = @INSTALL@ - -RTEMS_ROOT = $(top_srcdir)/@RTEMS_TOPdir@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg -include $(RTEMS_ROOT)/make/directory.cfg - -SRCS=README - -# We only build the multiprocessing support if HAS_MP was defined -MP_SUPPORT_yes_V = shmsupp -MP_SUPPORT = $(MP_SUPPORT_$(HAS_MP)_V) - -all: $(SRCS) - -# wrapup is the one that actually builds and installs the library -# from the individual .rel files built in other directories -SUB_DIRS=include startup clock console timer $(MP_SUPPORT) wrapup tools - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/unix/posix/README b/c/src/lib/libbsp/unix/posix/README deleted file mode 100644 index 0bf0782737..0000000000 --- a/c/src/lib/libbsp/unix/posix/README +++ /dev/null @@ -1,18 +0,0 @@ -# -# $Id$ -# - - -This is a "generic" BSP for a modern UNIX system which is enough -System V and POSIX compliant to support at least the following: - - + semaphores - + itimers - + mmap - + shared memory - -At the moment, this BSP is known to work with the following UNIXes: - - + HP-UX 9.0.x - + Solaris 2.x - + Linux 1.1.x (single processor only -- mmap is broken) diff --git a/c/src/lib/libbsp/unix/posix/bsp_specs b/c/src/lib/libbsp/unix/posix/bsp_specs deleted file mode 100644 index a303e58bdb..0000000000 --- a/c/src/lib/libbsp/unix/posix/bsp_specs +++ /dev/null @@ -1,8 +0,0 @@ -%rename lib old_lib - -*lib: -%{!qrtems: %(old_lib)} \ -%{qrtems: %{!qrtems_debug: -lrtemsall } \ -%{qrtems_debug: -lrtemsall_g} \ -%(old_lib)} - diff --git a/c/src/lib/libbsp/unix/posix/clock/Makefile.in b/c/src/lib/libbsp/unix/posix/clock/Makefile.in deleted file mode 100644 index 5a17347932..0000000000 --- a/c/src/lib/libbsp/unix/posix/clock/Makefile.in +++ /dev/null @@ -1,66 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../../../../../.. -subdir = c/src/lib/libbsp/unix/posix/clock - -INSTALL = @INSTALL@ - -RTEMS_ROOT = $(top_srcdir)/@RTEMS_TOPdir@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -PGM=${ARCH}/clock.rel - -# C source names, if any, go here -- minus the .c -C_PIECES=clock -C_FILES=$(C_PIECES:%=%.c) -C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) - -H_FILES= - -SRCS=$(C_FILES) $(H_FILES) -OBJS=$(C_O_FILES) - -include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += $(CFLAGS_OS_V) - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -${PGM}: ${SRCS} ${OBJS} - $(make-rel) - -all: ${ARCH} $(SRCS) $(PGM) - -# the .rel file built here will be put into libbsp.a by -# ../wrapup/Makefile -install: all - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/unix/posix/clock/clock.c b/c/src/lib/libbsp/unix/posix/clock/clock.c deleted file mode 100644 index 1db7ea8a92..0000000000 --- a/c/src/lib/libbsp/unix/posix/clock/clock.c +++ /dev/null @@ -1,112 +0,0 @@ -/* Clock - * - * This routine generates clock ticks using standard POSIX services. - * The tick frequency is specified by the bsp. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <bsp.h> -#include <rtems/libio.h> -#include <stdlib.h> - -void Clock_exit(void); - -volatile rtems_unsigned32 Clock_driver_ticks; - -rtems_unsigned32 Clock_driver_vector; - -/* - * These are set by clock driver during its init - */ - -rtems_device_major_number rtems_clock_major = ~0; -rtems_device_minor_number rtems_clock_minor; - -void Install_clock(rtems_isr_entry clock_isr) -{ - Clock_driver_ticks = 0; - - (void) set_vector( clock_isr, Clock_driver_vector, 1 ); - - _CPU_Start_clock( BSP_Configuration.microseconds_per_tick ); - - atexit(Clock_exit); -} - -void Clock_isr(int vector) -{ - Clock_driver_ticks++; - rtems_clock_tick(); -} - -/* - * Called via atexit() - * Remove the clock signal - */ - -void Clock_exit(void) -{ - _CPU_Stop_clock(); - - (void) set_vector( 0, Clock_driver_vector, 1 ); -} - -rtems_device_driver Clock_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - Clock_driver_vector = _CPU_Get_clock_vector(); - - Install_clock((rtems_isr_entry) Clock_isr); - - /* - * make major/minor avail to others such as shared memory driver - */ - rtems_clock_major = major; - rtems_clock_minor = minor; - - return RTEMS_SUCCESSFUL; -} - -rtems_device_driver Clock_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - rtems_unsigned32 isrlevel; - rtems_libio_ioctl_args_t *args = pargp; - - if (args == 0) - goto done; - - /* - * This is hokey, but until we get a defined interface - * to do this, it will just be this simple... - */ - - if (args->command == rtems_build_name('I', 'S', 'R', ' ')) - { - Clock_isr(Clock_driver_vector); - } - else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) - { - rtems_interrupt_disable( isrlevel ); - (void) set_vector( args->buffer, Clock_driver_vector, 1 ); - rtems_interrupt_enable( isrlevel ); - } - -done: - return RTEMS_SUCCESSFUL; -} diff --git a/c/src/lib/libbsp/unix/posix/console/Makefile.in b/c/src/lib/libbsp/unix/posix/console/Makefile.in deleted file mode 100644 index 74583d0b6f..0000000000 --- a/c/src/lib/libbsp/unix/posix/console/Makefile.in +++ /dev/null @@ -1,65 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../../../../../.. -subdir = c/src/lib/libbsp/unix/posix/console - -INSTALL = @INSTALL@ - -RTEMS_ROOT = $(top_srcdir)/@RTEMS_TOPdir@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -PGM=${ARCH}/console.rel - -# C source names, if any, go here -- minus the .c -C_PIECES=console -C_FILES=$(C_PIECES:%=%.c) -C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) - -H_FILES= - -SRCS=$(C_FILES) $(H_FILES) -OBJS=$(C_O_FILES) - -include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -${PGM}: ${SRCS} ${OBJS} - $(make-rel) - -all: ${ARCH} $(SRCS) $(PGM) - -# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile -install: all - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/unix/posix/console/console.c b/c/src/lib/libbsp/unix/posix/console/console.c deleted file mode 100644 index e3075286b0..0000000000 --- a/c/src/lib/libbsp/unix/posix/console/console.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Console IO Support Routines - * - * These provide UNIX-like read and write calls for the C library. - * - * NOTE: For the most part, this is just a space holder. - * - * COPYRIGHT (c) 1994 by Division Incorporated - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <bsp.h> - -#include <unistd.h> -#include <errno.h> - -rtems_device_driver -console_initialize(rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return 0; -} - - -/* - * Open entry point - */ - -rtems_device_driver console_open( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return RTEMS_SUCCESSFUL; -} - -/* - * Close entry point - */ - -rtems_device_driver console_close( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return RTEMS_SUCCESSFUL; -} - -/* - * read bytes from the serial port. We only have stdin. - */ - -rtems_device_driver console_read( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return RTEMS_UNSATISFIED; -} - -/* - * write bytes to the serial port. Stdout and stderr are the same. - */ - -rtems_device_driver console_write( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return -1; -} - -/* - * IO Control entry point - */ - -rtems_device_driver console_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return RTEMS_SUCCESSFUL; -} diff --git a/c/src/lib/libbsp/unix/posix/include/Makefile.in b/c/src/lib/libbsp/unix/posix/include/Makefile.in deleted file mode 100644 index 4ff7cdbc54..0000000000 --- a/c/src/lib/libbsp/unix/posix/include/Makefile.in +++ /dev/null @@ -1,44 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../../../../../.. -subdir = c/src/lib/libbsp/unix/posix/include - -INSTALL = @INSTALL@ - -RTEMS_ROOT = $(top_srcdir)/@RTEMS_TOPdir@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -H_FILES = $(srcdir)/bsp.h $(srcdir)/coverhd.h - -# -# Equate files are for including from assembly preprocessed by -# gm4 or gasp. No examples are provided except for those for -# other CPUs. The best way to generate them would be to -# provide a program which generates the constants used based -# on the C equivalents. -# - -EQ_FILES = - -SRCS=$(H_FILES) $(EQ_FILES) - -include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -all: $(SRCS) - $(INSTALL_CHANGE) -m 444 $(H_FILES) $(PROJECT_INCLUDE) - $(INSTALL_CHANGE) -m 444 $(EQ_FILES) $(PROJECT_INCLUDE) - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/unix/posix/include/bsp.h b/c/src/lib/libbsp/unix/posix/include/bsp.h deleted file mode 100644 index 923a9abf17..0000000000 --- a/c/src/lib/libbsp/unix/posix/include/bsp.h +++ /dev/null @@ -1,100 +0,0 @@ -/* bsp.h - * - * This include file contains all POSIX BSP definitions. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __POSIX_BSP_h -#define __POSIX_BSP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include <rtems.h> -#include <clockdrv.h> -#include <console.h> -#include <iosupp.h> - -/* - * Define the time limits for RTEMS Test Suite test durations. - * Long test and short test duration limits are provided. These - * values are in seconds and need to be converted to ticks for the - * application. - * - */ - -#define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ -#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ - -/* - * Stuff for Time Test 27 - */ - -#define MUST_WAIT_FOR_INTERRUPT 1 - -#define Install_tm27_vector( handler ) \ - set_vector( (handler), 16, 1 ) - -#define Cause_tm27_intr() \ - raise( 16 ) - -#define Clear_tm27_intr() - -#define Lower_tm27_intr() \ - _ISR_Set_level( 0 ); - -#define RAM_START 0 -#define RAM_END 0x100000 - -/* miscellaneous stuff assumed to exist */ - -extern rtems_configuration_table BSP_Configuration; - -/* - * Device Driver Table Entries - */ - -/* - * NOTE: Use the standard Console driver entry - */ - -/* - * NOTE: Use the standard Clock driver entry - */ - -/* functions */ - -rtems_isr_entry set_vector(rtems_isr_entry, rtems_vector_number, int); -void bsp_start( void ); -void bsp_cleanup( void ); - -/* miscellaneous stuff assumed to exist */ - -extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ -extern rtems_cpu_table Cpu_table; /* owned by BSP */ - -extern int rtems_argc; -extern char **rtems_argv; - -extern rtems_unsigned32 bsp_isr_level; - -extern char *rtems_progname; /* UNIX executable name */ - -extern int cpu_number; - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/lib/libbsp/unix/posix/include/coverhd.h b/c/src/lib/libbsp/unix/posix/include/coverhd.h deleted file mode 100644 index 4e43bd186b..0000000000 --- a/c/src/lib/libbsp/unix/posix/include/coverhd.h +++ /dev/null @@ -1,111 +0,0 @@ -/* coverhd.h - * - * This include file has defines to represent the overhead associated - * with calling a particular directive from C. These are used in the - * Timing Test Suite to ignore the overhead required to pass arguments - * to directives. On some CPUs and/or target boards, this overhead - * is significant and makes it difficult to distinguish internal - * RTEMS execution time from that used to call the directive. - * - * NOTE: If these are all zero, then the times reported include - * all calling overhead including passing of arguments. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __COVERHD_h -#define __COVERHD_h - -#ifdef __cplusplus -extern "C" { -#endif - -#define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE 0 -#define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE 0 -#define CALLING_OVERHEAD_TASK_CREATE 0 -#define CALLING_OVERHEAD_TASK_IDENT 0 -#define CALLING_OVERHEAD_TASK_START 0 -#define CALLING_OVERHEAD_TASK_RESTART 0 -#define CALLING_OVERHEAD_TASK_DELETE 0 -#define CALLING_OVERHEAD_TASK_SUSPEND 0 -#define CALLING_OVERHEAD_TASK_RESUME 0 -#define CALLING_OVERHEAD_TASK_SET_PRIORITY 0 -#define CALLING_OVERHEAD_TASK_MODE 0 -#define CALLING_OVERHEAD_TASK_GET_NOTE 0 -#define CALLING_OVERHEAD_TASK_SET_NOTE 0 -#define CALLING_OVERHEAD_TASK_WAKE_WHEN 0 -#define CALLING_OVERHEAD_TASK_WAKE_AFTER 0 -#define CALLING_OVERHEAD_INTERRUPT_CATCH 0 -#define CALLING_OVERHEAD_CLOCK_GET 0 -#define CALLING_OVERHEAD_CLOCK_SET 0 -#define CALLING_OVERHEAD_CLOCK_TICK 0 - -#define CALLING_OVERHEAD_TIMER_CREATE 0 -#define CALLING_OVERHEAD_TIMER_IDENT 0 -#define CALLING_OVERHEAD_TIMER_DELETE 0 -#define CALLING_OVERHEAD_TIMER_FIRE_AFTER 0 -#define CALLING_OVERHEAD_TIMER_FIRE_WHEN 0 -#define CALLING_OVERHEAD_TIMER_RESET 0 -#define CALLING_OVERHEAD_TIMER_CANCEL 0 -#define CALLING_OVERHEAD_SEMAPHORE_CREATE 0 -#define CALLING_OVERHEAD_SEMAPHORE_IDENT 0 -#define CALLING_OVERHEAD_SEMAPHORE_DELETE 0 -#define CALLING_OVERHEAD_SEMAPHORE_OBTAIN 0 -#define CALLING_OVERHEAD_SEMAPHORE_RELEASE 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH 0 - -#define CALLING_OVERHEAD_EVENT_SEND 0 -#define CALLING_OVERHEAD_EVENT_RECEIVE 0 -#define CALLING_OVERHEAD_SIGNAL_CATCH 0 -#define CALLING_OVERHEAD_SIGNAL_SEND 0 -#define CALLING_OVERHEAD_PARTITION_CREATE 0 -#define CALLING_OVERHEAD_PARTITION_IDENT 0 -#define CALLING_OVERHEAD_PARTITION_DELETE 0 -#define CALLING_OVERHEAD_PARTITION_GET_BUFFER 0 -#define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER 0 -#define CALLING_OVERHEAD_REGION_CREATE 0 -#define CALLING_OVERHEAD_REGION_IDENT 0 -#define CALLING_OVERHEAD_REGION_DELETE 0 -#define CALLING_OVERHEAD_REGION_GET_SEGMENT 0 -#define CALLING_OVERHEAD_REGION_RETURN_SEGMENT 0 -#define CALLING_OVERHEAD_PORT_CREATE 0 -#define CALLING_OVERHEAD_PORT_IDENT 0 -#define CALLING_OVERHEAD_PORT_DELETE 0 -#define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 0 -#define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 0 - -#define CALLING_OVERHEAD_IO_INITIALIZE 0 -#define CALLING_OVERHEAD_IO_OPEN 0 -#define CALLING_OVERHEAD_IO_CLOSE 0 -#define CALLING_OVERHEAD_IO_READ 0 -#define CALLING_OVERHEAD_IO_WRITE 0 -#define CALLING_OVERHEAD_IO_CONTROL 0 -#define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD 0 -#define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE 0 - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/Makefile.in b/c/src/lib/libbsp/unix/posix/shmsupp/Makefile.in deleted file mode 100644 index 201e1e3fd6..0000000000 --- a/c/src/lib/libbsp/unix/posix/shmsupp/Makefile.in +++ /dev/null @@ -1,65 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../../../../../.. -subdir = c/src/lib/libbsp/unix/posix/shmsupp - -INSTALL = @INSTALL@ - -RTEMS_ROOT = $(top_srcdir)/@RTEMS_TOPdir@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -PGM=${ARCH}/shmsupp.rel - -# C source names, if any, go here -- minus the .c -C_PIECES=addrconv getcfg intr lock mpisr -C_FILES=$(C_PIECES:%=%.c) -C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) - -H_FILES= - -SRCS=$(C_FILES) $(H_FILES) -OBJS=$(C_O_FILES) - -include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -${PGM}: ${SRCS} ${OBJS} - $(make-rel) - -all: ${ARCH} $(SRCS) $(PGM) - -# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile -install: all - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/README b/c/src/lib/libbsp/unix/posix/shmsupp/README deleted file mode 100644 index 93d6fcbe8c..0000000000 --- a/c/src/lib/libbsp/unix/posix/shmsupp/README +++ /dev/null @@ -1,9 +0,0 @@ -# -# $Id$ -# - -This directory contains the SHM driver support files for -System V/POSIX derived UNIX flavors. - -WARNING: The interrupt support in this directory currently will - only work in a homogeneous system. diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/addrconv.c b/c/src/lib/libbsp/unix/posix/shmsupp/addrconv.c deleted file mode 100644 index f334654410..0000000000 --- a/c/src/lib/libbsp/unix/posix/shmsupp/addrconv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* addrconv.v - * - * No address range conversion is required. - * - * Input parameters: - * addr - address to convert - * - * Output parameters: - * returns - converted address - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <bsp.h> -#include <shm.h> - -void *Shm_Convert_address( - void *addr -) -{ - return ( addr ); -} diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c b/c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c deleted file mode 100644 index 8759a0ce27..0000000000 --- a/c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c +++ /dev/null @@ -1,75 +0,0 @@ -/* void Shm_get_config( localnode, &shmcfg ) - * - * This routine initializes, if necessary, and returns a pointer - * to the Shared Memory Configuration Table for the UNIX - * simulator. - * - * INPUT PARAMETERS: - * localnode - local node number - * shmcfg - address of pointer to SHM Config Table - * - * OUTPUT PARAMETERS: - * *shmcfg - pointer to SHM Config Table - * - * NOTES: This driver is capable of supporting a practically unlimited - * number of nodes. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <bsp.h> -#include <shm.h> -#include <sys/types.h> /* pid_t */ - -shm_config_table BSP_shm_cfgtbl; - -int semid; - -void Shm_Cause_interrupt_unix( - rtems_unsigned32 node -); - -void Shm_Get_configuration( - rtems_unsigned32 localnode, - shm_config_table **shmcfg -) -{ - _CPU_SHM_Init( - Shm_Maximum_nodes, - Shm_Is_master_node(), - (void **)&BSP_shm_cfgtbl.base, - (unsigned32 *)&BSP_shm_cfgtbl.length - ); - - BSP_shm_cfgtbl.format = SHM_BIG; - - BSP_shm_cfgtbl.cause_intr = Shm_Cause_interrupt_unix; - -#ifdef NEUTRAL_BIG - BSP_shm_cfgtbl.convert = NULL_CONVERT; -#else - BSP_shm_cfgtbl.convert = CPU_swap_u32; -#endif - - if ( _CPU_SHM_Get_vector() ) { - BSP_shm_cfgtbl.poll_intr = INTR_MODE; - BSP_shm_cfgtbl.Intr.address = (vol_u32 *) _CPU_Get_pid(); /* process id */ - BSP_shm_cfgtbl.Intr.value = _CPU_SHM_Get_vector(); /* signal to send */ - BSP_shm_cfgtbl.Intr.length = LONG; - } else { - BSP_shm_cfgtbl.poll_intr = POLLED_MODE; - BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT; - BSP_shm_cfgtbl.Intr.value = NO_INTERRUPT; - BSP_shm_cfgtbl.Intr.length = NO_INTERRUPT; - } - - *shmcfg = &BSP_shm_cfgtbl; -} diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/intr.c b/c/src/lib/libbsp/unix/posix/shmsupp/intr.c deleted file mode 100644 index 2e5f014bf6..0000000000 --- a/c/src/lib/libbsp/unix/posix/shmsupp/intr.c +++ /dev/null @@ -1,34 +0,0 @@ -/* void Shm_interrupt_unix( node ) - * - * This routine is the shared memory driver routine which - * generates interrupts to other CPUs. - * - * Input parameters: - * node - destination of this packet (0 = broadcast) - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <bsp.h> -#include <shm.h> -#include <sys/types.h> /* pid_t */ - -void Shm_Cause_interrupt_unix( - rtems_unsigned32 node -) -{ - Shm_Interrupt_information *intr; - intr = &Shm_Interrupt_table[node]; - - _CPU_SHM_Send_interrupt( (pid_t) intr->address, intr->value ); -} diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/lock.c b/c/src/lib/libbsp/unix/posix/shmsupp/lock.c deleted file mode 100644 index 5805a2d3c0..0000000000 --- a/c/src/lib/libbsp/unix/posix/shmsupp/lock.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Shared Memory Lock Routines - * - * This shared memory locked queue support routine need to be - * able to lock the specified locked queue. Interrupts are - * disabled while the queue is locked to prevent preemption - * and deadlock when two tasks poll for the same lock. - * previous level. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <bsp.h> -#include <shm.h> - -/* - * Shm_Initialize_lock - * - * Initialize the lock for the specified locked queue. - */ - -void Shm_Initialize_lock( - Shm_Locked_queue_Control *lq_cb -) -{ - lq_cb->lock = lq_cb - Shm_Locked_queues; -} - -/* Shm_Lock( &lq_cb ) - * - * This shared memory locked queue support routine locks the - * specified locked queue. It disables interrupts to prevent - * a deadlock condition. - */ - -void Shm_Lock( - Shm_Locked_queue_Control *lq_cb -) -{ - rtems_unsigned32 isr_level; - - rtems_interrupt_disable( isr_level ); - - Shm_isrstat = isr_level; - - _CPU_SHM_Lock( lq_cb->lock ); -} - -/* - * Shm_Unlock - * - * Unlock the lock for the specified locked queue. - */ - -void Shm_Unlock( - Shm_Locked_queue_Control *lq_cb -) -{ - rtems_unsigned32 isr_level; - - _CPU_SHM_Unlock( lq_cb->lock ); - - isr_level = Shm_isrstat; - rtems_interrupt_enable( isr_level ); -} diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/mpisr.c b/c/src/lib/libbsp/unix/posix/shmsupp/mpisr.c deleted file mode 100644 index 2cfcc4def9..0000000000 --- a/c/src/lib/libbsp/unix/posix/shmsupp/mpisr.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Shm_setvec - * - * This driver routine sets the SHM interrupt vector to point to the - * driver's SHM interrupt service routine. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <bsp.h> -#include <shm.h> - -void Shm_setvec( void ) -{ - int vector; - - vector = _CPU_SHM_Get_vector(); - - if ( vector ) - set_vector( Shm_isr, vector, 1 ); -} diff --git a/c/src/lib/libbsp/unix/posix/startup/Makefile.in b/c/src/lib/libbsp/unix/posix/startup/Makefile.in deleted file mode 100644 index 33fd367e9e..0000000000 --- a/c/src/lib/libbsp/unix/posix/startup/Makefile.in +++ /dev/null @@ -1,86 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../../../../../.. -subdir = c/src/lib/libbsp/unix/posix/startup - -INSTALL = @INSTALL@ - -RTEMS_ROOT = $(top_srcdir)/@RTEMS_TOPdir@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@:@srcdir@/../../../shared - -PGM=${ARCH}/startup.rel -NO_CTOR_LIB=${ARCH}/libno-ctor.a - -# C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bspstart setvec $(C_MAIN) -C_FILES=$(C_PIECES:%=%.c) -C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) - -CC_PIECES=$(CXX_MAIN) -CC_FILES=$(CC_PIECES:%=%.cc) -CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o) - -H_FILES= - -SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) no-ctor.c -OBJS=$(C_O_FILES) - -# We install the RTEMS constructor as a separate .o -# so it can be easily place correctly by the compiler config file. - -include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -ifeq ($(HAS_CPLUSPLUS),yes) -NO_CTOR_LIB=${ARCH}/libno-ctor.a -INSTALLED_O_FILES=$(ARCH)/rtems-ctor.o -CXX_MAIN=rtems-ctor -C_MAIN= -else -CXX_MAIN= -C_MAIN=main -endif - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += $(LIBC_DEFINES) - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -${PGM}: ${SRCS} ${OBJS} - $(make-rel) - -${NO_CTOR_LIB}: $(ARCH)/no-ctor.o - $(RM) $@ - $(AR) -cvr $@ $(ARCH)/no-ctor.o - -all: ${ARCH} $(SRCS) $(INSTALLED_O_FILES) $(PGM) ${NO_CTOR_LIB} - $(INSTALL_VARIANT) $(INSTALLED_O_FILES) ${PROJECT_RELEASE}/lib - $(INSTALL_VARIANT) $(NO_CTOR_LIB) ${PROJECT_RELEASE}/lib - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/unix/posix/startup/bspclean.c b/c/src/lib/libbsp/unix/posix/startup/bspclean.c deleted file mode 100644 index 7f2d556ae1..0000000000 --- a/c/src/lib/libbsp/unix/posix/startup/bspclean.c +++ /dev/null @@ -1,41 +0,0 @@ -/* bsp_cleanup() - * - * This routine normally is part of start.s and returns - * control to a monitor but on the UNIX simulator - * we do that directly from main.c. - * - * INPUT: NONE - * - * OUTPUT: NONE - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <bsp.h> - -#include <stdio.h> - -/* - * The app has "exited" (called rtems_shutdown_executive) - */ - -void bsp_cleanup( void ) -{ - /* - * Invoke any fatal error extension and "halt" - * By definition, rtems_fatal_error_occurred does not return. - */ - - fflush(stdout); - fflush(stderr); - - rtems_fatal_error_occurred(0); -} diff --git a/c/src/lib/libbsp/unix/posix/startup/bspstart.c b/c/src/lib/libbsp/unix/posix/startup/bspstart.c deleted file mode 100644 index 71d85409ca..0000000000 --- a/c/src/lib/libbsp/unix/posix/startup/bspstart.c +++ /dev/null @@ -1,235 +0,0 @@ -/* - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * - * Called by RTEMS::RTEMS constructor in startup-ctor.cc - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <stdio.h> -#include <stdlib.h> - -/* for sbrk prototype in linux */ -#if defined(__linux__) -#define __USE_MISC -#endif -#include <unistd.h> - -#include <bsp.h> -#include <libcsupport.h> - -#include <rtems/libio.h> - -extern rtems_configuration_table Configuration; - -/* - * A copy of the configuration table from the application - * with some changes applied to it. - */ - -rtems_configuration_table BSP_Configuration; -rtems_multiprocessing_table BSP_Multiprocessing; -rtems_cpu_table Cpu_table; -rtems_unsigned32 bsp_isr_level; -rtems_unsigned32 Heap_size; -int rtems_argc; -char **rtems_argv; - -/* - * May be overridden by RTEMS_WORKSPACE_SIZE and RTEMS_HEAPSPACE_SIZE - * environment variables; see below. - */ - -#define DEFAULT_WORKSPACE_SIZE (WORKSPACE_MB * (1024 * 1024)) -#define DEFAULT_HEAPSPACE_SIZE (HEAPSPACE_MB * (1024 * 1024)) - -/* - * Amount to increment itimer by each pass - * It is a variable instead of a #define to allow the 'looptest' - * script to bump it without recompiling rtems - */ - -rtems_unsigned32 CPU_CLICKS_PER_TICK; - -/* - * Use the shared implementations of the following routines - */ - -void bsp_postdriver_hook(void); -void bsp_libc_init( void *, unsigned32, int ); - -/* - * Function: bsp_pretasking_hook - * Created: 95/03/10 - * - * Description: - * BSP pretasking hook. Called just before drivers are initialized. - * Used to setup libc and install any BSP extensions. - * - * NOTES: - * Must not use libc (to do io) from here, since drivers are - * not yet initialized. - */ - -void bsp_pretasking_hook(void) -{ - void *heap_start; - - if (getenv("RTEMS_HEAPSPACE_SIZE")) - Heap_size = strtol(getenv("RTEMS_HEAPSPACE_SIZE"), 0, 0); - else - Heap_size = DEFAULT_HEAPSPACE_SIZE; - - heap_start = 0; - - bsp_libc_init((void *)heap_start, Heap_size, 1024 * 1024); - - -#ifdef RTEMS_DEBUG - rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); -#endif - - /* - * Dump malloc stats on exit... - */ -#if defined(RTEMS_DEBUG) - atexit(malloc_dump); -#endif -} - -/* - * DO NOT Use the shared bsp_postdriver_hook() implementation - */ - -void bsp_postdriver_hook(void) -{ - return; -} - -/* - * bsp_start - * - * This routine does the bulk of the system initialization. - */ - -void bsp_start(void) -{ - unsigned32 workspace_ptr; - - /* - * Copy the table (normally done in shared main). - */ - - BSP_Configuration = Configuration; - - /* - * If the node number is -1 then the application better provide - * it through environment variables RTEMS_NODE. - * Ditto for RTEMS_MAXIMUM_NODES - */ - - if (BSP_Configuration.User_multiprocessing_table) { - char *p; - - /* make a copy for possible editing */ - BSP_Multiprocessing = *BSP_Configuration.User_multiprocessing_table; - BSP_Configuration.User_multiprocessing_table = &BSP_Multiprocessing; - - if (BSP_Multiprocessing.node == -1) - { - p = getenv("RTEMS_NODE"); - BSP_Multiprocessing.node = p ? atoi(p) : 1; - } - - /* If needed provide maximum_nodes also */ - if (BSP_Multiprocessing.maximum_nodes == -1) - { - p = getenv("RTEMS_MAXIMUM_NODES"); - BSP_Multiprocessing.maximum_nodes = p ? atoi(p) : 1; - } - } - - /* - * Set cpu_number to accurately reflect our cpu number - */ - - if (BSP_Configuration.User_multiprocessing_table) - cpu_number = BSP_Configuration.User_multiprocessing_table->node - 1; - else - cpu_number = 0; - - if (getenv("RTEMS_WORKSPACE_SIZE")) - BSP_Configuration.work_space_size = - strtol(getenv("RTEMS_WORKSPACE_SIZE"), 0, 0); - else - BSP_Configuration.work_space_size = DEFAULT_WORKSPACE_SIZE; - - /* - * Allocate workspace memory, ensuring it is properly aligned - */ - - workspace_ptr = - (unsigned32) sbrk(BSP_Configuration.work_space_size + CPU_ALIGNMENT); - workspace_ptr += CPU_ALIGNMENT - 1; - workspace_ptr &= ~(CPU_ALIGNMENT - 1); - - BSP_Configuration.work_space_start = (void *) workspace_ptr; - - /* - * Set up our hooks - * Make sure libc_init is done before drivers init'd so that - * they can use atexit() - */ - - Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */ - - Cpu_table.predriver_hook = NULL; - - Cpu_table.postdriver_hook = bsp_postdriver_hook; - - Cpu_table.idle_task = NULL; /* do not override system IDLE task */ - - /* - * Don't zero out the workspace since it is in the BSS under UNIX. - */ - - Cpu_table.do_zero_of_workspace = FALSE; - - /* - * XXX; interrupt stack not currently used, so this doesn't matter - */ - - Cpu_table.interrupt_stack_size = (12 * 1024); - - Cpu_table.extra_mpci_receive_server_stack = 0; - - /* - * Add 1 extension for MPCI_fatal - */ - - if (BSP_Configuration.User_multiprocessing_table) - BSP_Configuration.maximum_extensions++; - - CPU_CLICKS_PER_TICK = 1; - - /* - * Start most of RTEMS - * main() will start the rest - */ - - bsp_isr_level = rtems_initialize_executive_early( - &BSP_Configuration, - &Cpu_table - ); -} diff --git a/c/src/lib/libbsp/unix/posix/startup/exit.c b/c/src/lib/libbsp/unix/posix/startup/exit.c deleted file mode 100644 index 520c3f1313..0000000000 --- a/c/src/lib/libbsp/unix/posix/startup/exit.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * exit - * - * This routine returns control to "the pre-RTEMS environment". - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <bsp.h> -#include <clockdrv.h> - -void _exit( void ) -{ - /* Clock or Timer cleanup is run by at_exit() */ - - Io_cleanup(); - - bsp_cleanup(); -} diff --git a/c/src/lib/libbsp/unix/posix/startup/main.c b/c/src/lib/libbsp/unix/posix/startup/main.c deleted file mode 100644 index 520cd36b04..0000000000 --- a/c/src/lib/libbsp/unix/posix/startup/main.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Description: - * This file exists solely to (try to) ensure RTEMS is initialized. - * It is not to be used in systems which want C++ support. - * - * $Id$ - */ - -#include <bsp.h> -#include <stdio.h> -#include <stdlib.h> - -/* - * RTEMS program name - * Probably not used by anyone, but it is nice to have it. - * Actually the UNIX version of CPU_INVOKE_DEBUGGER will probably - * need to use it - */ - -char *rtems_progname; - -int main( - int argc, - char **argv -) -{ - rtems_argc = argc; - rtems_argv = argv; - - bsp_start(); - - if ((argc > 0) && argv && argv[0]) - rtems_progname = argv[0]; - else - rtems_progname = "RTEMS"; - - /* - * Start multitasking - */ - - rtems_initialize_executive_late( bsp_isr_level ); - - /* - * Returns when multitasking is stopped - * This allows our destructors to get run normally - */ - - fflush( stdout ); - fflush( stderr ); - - bsp_cleanup(); - - return 0; -} diff --git a/c/src/lib/libbsp/unix/posix/startup/no-ctor.c b/c/src/lib/libbsp/unix/posix/startup/no-ctor.c deleted file mode 100644 index 349ad2b1dd..0000000000 --- a/c/src/lib/libbsp/unix/posix/startup/no-ctor.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - * rtems, floss, libc are always compiled with GNU compilers - * application code may be compiled with some other C++ compiler - * that has a different global constructor technique. - * - * For the simple case, where the app has no global constructors or - * is compiled by g++, we provide this empty routine - * In order to get both g++ constructors (RTEMS::RTEMS, for example) - * and application constructors run, we provide this routine. - * - * $Id$ - */ - -void invoke_non_gnu_constructors(void) -{ -} diff --git a/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc b/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc deleted file mode 100644 index 56f3a98580..0000000000 --- a/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc +++ /dev/null @@ -1,116 +0,0 @@ -/* - * rtems-ctor.cc - * - * Description: - * This file exists solely to (try to) ensure RTEMS is initialized - * before any global constructors are run. - * - * The problem: - * Global constructors might reasonably expect that new() will - * work, but since new() uses malloc() which uses RTEMS regions, - * it can not be called until after initialize_executive(). - * - * Global constructors are called in GNU systems one of 2 ways: - * - * an "invisible" call to __main() inserted by compiler - * This __main() calls __do_global_ctors() which - * walks thru the table and calls all global - * constructors. - * - * or - - * A special section is put into the linked binary. The - * system startup code knows to run the constructors in - * this special section before calling main(). - * - * By making RTEMS initialization a constructor, we avoid having - * too much about all this. All we have to guarantee is that - * this constructor is the first one run. - * - * - * So for the first case above, this is what happens - * - * host crt0 - * main() - * __main() - * __do_global_ctors() - * bsp_start() - * init_executive_early() - * <<any other constructors>> - * - * init_executive_late() - * bsp_cleanup() - * - * TODO: - * - * $Id$ - */ - -#include <bsp.h> -#include <stdio.h> -#include <stdlib.h> - -/* - * RTEMS program name - * Probably not used by anyone, but it is nice to have it. - * Actually the UNIX version of CPU_INVOKE_DEBUGGER will probably - * need to use it - */ - -char *rtems_progname; - -class RTEMS { - public: - RTEMS(); - ~RTEMS(); -}; - -RTEMS rtems_constructor; - -RTEMS::RTEMS() -{ - bsp_start(); -} - -RTEMS::~RTEMS() -{ - bsp_cleanup(); -} - -extern "C" { - extern void invoke_non_gnu_constructors(void); - - int - main(int argc, - char **argv, - char ** /* environp is unused */) - { - rtems_argc = argc; - rtems_argv = argv; - - if ((argc > 0) && argv && argv[0]) - rtems_progname = argv[0]; - else - rtems_progname = "RTEMS"; - - /* - * run any non-gnu constructors we may need - */ - - invoke_non_gnu_constructors(); - - /* - * Start multitasking - */ - - rtems_initialize_executive_late( bsp_isr_level ); - - /* - * Returns when multitasking is stopped - * This allows our destructors to get run normally - */ - - fflush( stdout ); - fflush( stderr ); - return 0; - } -} diff --git a/c/src/lib/libbsp/unix/posix/startup/setvec.c b/c/src/lib/libbsp/unix/posix/startup/setvec.c deleted file mode 100644 index 750fe7c574..0000000000 --- a/c/src/lib/libbsp/unix/posix/startup/setvec.c +++ /dev/null @@ -1,47 +0,0 @@ -/* set_vector - * - * This routine installs an interrupt vector on UNIX. - * - * INPUT: - * handler - interrupt handler entry point - * vector - vector number - * type - 0 indicates raw hardware connect - * 1 indicates RTEMS interrupt connect - * - * RETURNS: - * address of previous interrupt handler - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <bsp.h> - -rtems_isr_entry -set_vector( /* returns old vector */ - rtems_isr_entry handler, /* isr routine */ - rtems_vector_number vector, /* vector number */ - int type /* RTEMS or RAW intr */ -) -{ - rtems_isr_entry rtems_isr_ptr = 0; - proc_ptr raw_isr_ptr; - - if ( type ) { - rtems_interrupt_catch( handler, vector, &rtems_isr_ptr ); - return rtems_isr_ptr; - } else { - _CPU_ISR_install_vector( vector, (proc_ptr) handler, &raw_isr_ptr ); - return raw_isr_ptr; - } - -} - - diff --git a/c/src/lib/libbsp/unix/posix/timer/Makefile.in b/c/src/lib/libbsp/unix/posix/timer/Makefile.in deleted file mode 100644 index 5d53bef290..0000000000 --- a/c/src/lib/libbsp/unix/posix/timer/Makefile.in +++ /dev/null @@ -1,66 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../../../../../.. -subdir = c/src/lib/libbsp/unix/posix/timer - -INSTALL = @INSTALL@ - -RTEMS_ROOT = $(top_srcdir)/@RTEMS_TOPdir@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -PGM=${ARCH}/timer.rel - -# C source names, if any, go here -- minus the .c -C_PIECES=timer -C_FILES=$(C_PIECES:%=%.c) -C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) - -H_FILES= - -SRCS=$(C_FILES) $(H_FILES) -OBJS=$(C_O_FILES) - -include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += $(CFLAGS_OS_V) - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -${PGM}: ${SRCS} ${OBJS} - $(make-rel) - -all: ${ARCH} $(SRCS) $(PGM) - -# the .rel file built here will be put into libbsp.a by -# ../wrapup/Makefile -install: all - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/unix/posix/timer/timer.c b/c/src/lib/libbsp/unix/posix/timer/timer.c deleted file mode 100644 index 065989293d..0000000000 --- a/c/src/lib/libbsp/unix/posix/timer/timer.c +++ /dev/null @@ -1,71 +0,0 @@ -/* timer.c - * - * This file manages the interval timer on the PA-RISC. - * - * NOTE: It is important that the timer start/stop overhead be - * determined when porting or modifying this code. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <bsp.h> -#include <time.h> -#include <sys/time.h> - -struct timeval Timer_start; -struct timeval Timer_stop; -struct timezone Time_zone; - -rtems_boolean Timer_driver_Find_average_overhead; - -void Timer_initialize() -{ - gettimeofday( &Timer_start, &Time_zone ); -} - -#define AVG_OVERHEAD 0 /* It typically takes xxx microseconds */ - /* (XX countdowns) to start/stop the timer. */ -#define LEAST_VALID 10 /* Don't trust a value lower than this */ - -int Read_timer() -{ - int total; - - gettimeofday( &Timer_stop, &Time_zone ); - - if ( Timer_stop.tv_sec == Timer_start.tv_sec ) - total = Timer_stop.tv_usec - Timer_start.tv_usec; - else { - total = 1000000 - Timer_start.tv_usec; - total += (Timer_stop.tv_sec - Timer_start.tv_sec - 1) * 1000000; - total += Timer_stop.tv_usec; - } - - if ( Timer_driver_Find_average_overhead == 1 ) - return total; /* in countdown units */ - else { - if ( total < LEAST_VALID ) - return 0; /* below timer resolution */ - return total - AVG_OVERHEAD; - } -} - -rtems_status_code Empty_function( void ) -{ - return RTEMS_SUCCESSFUL; -} - -void Set_find_average_overhead( - rtems_boolean find_flag -) -{ - Timer_driver_Find_average_overhead = find_flag; -} diff --git a/c/src/lib/libbsp/unix/posix/times b/c/src/lib/libbsp/unix/posix/times deleted file mode 100644 index 28811e37ba..0000000000 --- a/c/src/lib/libbsp/unix/posix/times +++ /dev/null @@ -1,10 +0,0 @@ -# -# Timing Test Suite Results for the UNIX Simulator BSP -# -# $Id$ -# - -The times when running on the UNIX simulator are irrelevant. They vary based -on a variety of factors including host OS, host configuration, and system load. -The intent of the UNIX simulator is to provide a testing and prototyping -environment not to compete with the "normal" embedded role of RTEMS. diff --git a/c/src/lib/libbsp/unix/posix/tools/Makefile.am b/c/src/lib/libbsp/unix/posix/tools/Makefile.am deleted file mode 100644 index 15c549feb4..0000000000 --- a/c/src/lib/libbsp/unix/posix/tools/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# -# $Id$ -# - -AUTOMAKE_OPTIONS = foreign -ACLOCAL = @ACLOCAL@ -I $(RTEMS_TOPdir)/aclocal - -if HAVE_PERL -perl_scripts = shmdump semdump -endif - -noinst_SCRIPTS=runtest looptest $(perl_scripts) - -# HACK: install to build-tree -all-local: $(SCRIPTS) - $(mkinstalldirs) $(PROJECT_ROOT)/${RTEMS_BSP}/tests - for i in $(SCRIPTS); do \ - $(INSTALL_SCRIPT) $$i $(PROJECT_ROOT)/${RTEMS_BSP}/tests ; \ - done - -include $(top_srcdir)/../../../../../../../automake/local.am diff --git a/c/src/lib/libbsp/unix/posix/tools/Makefile.in b/c/src/lib/libbsp/unix/posix/tools/Makefile.in deleted file mode 100644 index d7a51b7272..0000000000 --- a/c/src/lib/libbsp/unix/posix/tools/Makefile.in +++ /dev/null @@ -1,274 +0,0 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am - -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -# -# $Id$ -# - - -# $Id$ - -# NOTE: This is a temporary work-around to keep -# "make debug" and "make debug_install" working. -# Once automake is fully integrated these make targets -# and this file will probably be removed - - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = . -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_alias = @build_alias@ -build_triplet = @build@ -host_alias = @host_alias@ -host_triplet = @host@ -target_alias = @target_alias@ -target_triplet = @target@ -KSH = @KSH@ -MAKEINFO = @MAKEINFO@ -PACKAGE = @PACKAGE@ -PERL = @PERL@ -PROJECT_ROOT = @PROJECT_ROOT@ -RTEMS_TOPdir = @RTEMS_TOPdir@ -VERSION = @VERSION@ - -AUTOMAKE_OPTIONS = foreign -ACLOCAL = @ACLOCAL@ -I $(RTEMS_TOPdir)/aclocal - -@HAVE_PERL_TRUE@perl_scripts = shmdump semdump - -noinst_SCRIPTS = runtest looptest $(perl_scripts) -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../../mkinstalldirs -CONFIG_CLEAN_FILES = runtest shmdump looptest semdump -SCRIPTS = $(noinst_SCRIPTS) - -DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in \ -looptest.in runtest.in semdump.in shmdump.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = tar -GZIP_ENV = --best -all: all-redirect -.SUFFIXES: -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/../../../../../../../automake/local.am - cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) - cd $(top_builddir) \ - && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - -$(ACLOCAL_M4): configure.in - cd $(srcdir) && $(ACLOCAL) - -config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck -$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) - cd $(srcdir) && $(AUTOCONF) -runtest: $(top_builddir)/config.status runtest.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status -shmdump: $(top_builddir)/config.status shmdump.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status -looptest: $(top_builddir)/config.status looptest.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status -semdump: $(top_builddir)/config.status semdump.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status -tags: TAGS -TAGS: - - -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - -rm -rf $(distdir) - GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz - mkdir $(distdir)/=build - mkdir $(distdir)/=inst - dc_install_base=`cd $(distdir)/=inst && pwd`; \ - cd $(distdir)/=build \ - && ../configure --srcdir=.. --prefix=$$dc_install_base \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) dist - -rm -rf $(distdir) - @banner="$(distdir).tar.gz is ready for distribution"; \ - dashes=`echo "$$banner" | sed s/./=/g`; \ - echo "$$dashes"; \ - echo "$$banner"; \ - echo "$$dashes" -dist: distdir - -chmod -R a+r $(distdir) - GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) - -rm -rf $(distdir) -dist-all: distdir - -chmod -R a+r $(distdir) - GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) - -rm -rf $(distdir) -distdir: $(DISTFILES) - -rm -rf $(distdir) - mkdir $(distdir) - -chmod 777 $(distdir) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ - else \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done -info-am: -info: info-am -dvi-am: -dvi: dvi-am -check-am: all-am -check: check-am -installcheck-am: -installcheck: installcheck-am -install-exec-am: install-exec-local -install-exec: install-exec-am - -install-data-am: -install-data: install-data-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am -uninstall-am: -uninstall: uninstall-am -all-am: Makefile $(SCRIPTS) -all-redirect: all-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: - - -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -maintainer-clean-generic: -mostlyclean-am: mostlyclean-generic - -mostlyclean: mostlyclean-am - -clean-am: clean-generic mostlyclean-am - -clean: clean-am - -distclean-am: distclean-generic clean-am - -distclean: distclean-am - -rm -f config.status - -maintainer-clean-am: maintainer-clean-generic distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -maintainer-clean: maintainer-clean-am - -rm -f config.status - -.PHONY: tags distdir info-am info dvi-am dvi check check-am \ -installcheck-am installcheck install-exec-local install-exec-am \ -install-exec install-data-am install-data install-am install \ -uninstall-am uninstall all-redirect all-am all installdirs \ -mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean - - -# HACK: install to build-tree -install-exec-local: $(SCRIPTS) - $(mkinstalldirs) $(PROJECT_ROOT)/${RTEMS_BSP}/tests - for i in $(SCRIPTS); do \ - $(INSTALL_SCRIPT) $$i $(PROJECT_ROOT)/${RTEMS_BSP}/tests ; \ - done - -debug-am: - -debug: debug-am - -debug_install-am: - -debug_install: debug_install-am - -profile-am: - -profile: profile-am - -profile_install-am: - -profile_install: profile_install-am - -.PHONY: debug debug_install profile profile_install - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/c/src/lib/libbsp/unix/posix/tools/aclocal.m4 b/c/src/lib/libbsp/unix/posix/tools/aclocal.m4 deleted file mode 100644 index 5d1a219079..0000000000 --- a/c/src/lib/libbsp/unix/posix/tools/aclocal.m4 +++ /dev/null @@ -1,224 +0,0 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4 - -dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without -dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A -dnl PARTICULAR PURPOSE. - -dnl $Id$ - -dnl -dnl RTEMS_TOP($1) -dnl -dnl $1 .. relative path from this configure.in to the toplevel configure.in -dnl -AC_DEFUN(RTEMS_TOP, -[dnl -RTEMS_TOPdir="$1"; -AC_SUBST(RTEMS_TOPdir) - -PROJECT_ROOT=`pwd`/$RTEMS_TOPdir; -AC_SUBST(PROJECT_ROOT) - -dnl Determine RTEMS Version string from the VERSION file -dnl Hopefully, Joel never changes its format ;- -AC_MSG_CHECKING([for RTEMS Version]) -if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then -changequote(,)dnl -RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \ -sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'` -changequote([,])dnl -else -AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION) -fi -if test -z "$RTEMS_VERSION"; then -AC_MSG_ERROR(Unable to determine version) -fi -AC_MSG_RESULT($RTEMS_VERSION) - -dnl FIXME: This once gets activated in future or will be removed -dnl RTEMS_ROOT='$(top_srcdir)'/$RTEMS_TOPdir; -dnl AC_SUBST(RTEMS_ROOT) -])dnl - -dnl -dnl $Id$ -dnl - -dnl canonicalize target cpu -dnl NOTE: Most rtems targets do not fullfil autoconf's -dnl target naming conventions "processor-vendor-os" -dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them -dnl and we have to fix it for rtems ourselves - -AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU, -[ -AC_REQUIRE([AC_CANONICAL_SYSTEM]) -AC_MSG_CHECKING(rtems target cpu) -changequote(,)dnl -case "${target}" in - # hpux unix port should go here - i[3456]86-go32-rtems*) - target_cpu=i386 - ;; - i[3456]86-pc-linux*) # unix "simulator" port - target_cpu=unix - ;; - i[3456]86-*freebsd2*) # unix "simulator" port - target_cpu=unix - ;; - no_cpu-*rtems*) - target_cpu=no_cpu - ;; - ppc*-*rtems*) - target_cpu=powerpc - ;; - sparc-sun-solaris*) # unix "simulator" port - target_cpu=unix - ;; - *) - target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'` - ;; -esac -changequote([,])dnl -AC_MSG_RESULT($target_cpu) -]) - -# Do all the work for Automake. This macro actually does too much -- -# some checks are only needed if your package does certain things. -# But this isn't really a big deal. - -# serial 1 - -dnl Usage: -dnl AM_INIT_AUTOMAKE(package,version, [no-define]) - -AC_DEFUN(AM_INIT_AUTOMAKE, -[AC_REQUIRE([AC_PROG_INSTALL]) -PACKAGE=[$1] -AC_SUBST(PACKAGE) -VERSION=[$2] -AC_SUBST(VERSION) -dnl test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) -fi -ifelse([$3],, -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) -AC_REQUIRE([AM_SANITY_CHECK]) -AC_REQUIRE([AC_ARG_PROGRAM]) -dnl FIXME This is truly gross. -missing_dir=`cd $ac_aux_dir && pwd` -AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) -AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) -AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) -AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) -AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) -AC_REQUIRE([AC_PROG_MAKE_SET])]) - -# -# Check to make sure that the build environment is sane. -# - -AC_DEFUN(AM_SANITY_CHECK, -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftestfile -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` - if test "[$]*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftestfile` - fi - if test "[$]*" != "X $srcdir/configure conftestfile" \ - && test "[$]*" != "X conftestfile $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "[$]2" = conftestfile - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -rm -f conftest* -AC_MSG_RESULT(yes)]) - -dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) -dnl The program must properly implement --version. -AC_DEFUN(AM_MISSING_PROG, -[AC_MSG_CHECKING(for working $2) -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if ($2 --version) < /dev/null > /dev/null 2>&1; then - $1=$2 - AC_MSG_RESULT(found) -else - $1="$3/missing $2" - AC_MSG_RESULT(missing) -fi -AC_SUBST($1)]) - -dnl $Id$ - -AC_DEFUN(RTEMS_PATH_KSH, -[ -dnl NOTE: prefer bash over ksh over sh -AC_PATH_PROGS(KSH,bash ksh sh) -if test -z "$KSH"; then -dnl NOTE: This cannot happen -- /bin/sh must always exist -AC_MSG_ERROR( -[***] -[ Cannot determine a usable shell bash/ksh/sh] -[ Please contact your system administrator] ); -fi -]) - -dnl $Id$ - -AC_DEFUN(RTEMS_PATH_PERL, -[ -AC_PATH_PROG(PERL,perl) -if test -z "$PERL" ; then -AC_MSG_WARN( -[***] -[ perl was not found] -[ Note: Some tools will not be built.]) -fi -]) - -# Define a conditional. - -AC_DEFUN(AM_CONDITIONAL, -[AC_SUBST($1_TRUE) -AC_SUBST($1_FALSE) -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi]) - diff --git a/c/src/lib/libbsp/unix/posix/tools/configure b/c/src/lib/libbsp/unix/posix/tools/configure deleted file mode 100644 index a395f740e2..0000000000 --- a/c/src/lib/libbsp/unix/posix/tools/configure +++ /dev/null @@ -1,1307 +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=runtest.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 - - -ac_aux_dir= -for ac_dir in ../../../../../../.. $srcdir/../../../../../../..; 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 ../../../../../../.. $srcdir/../../../../../../.." 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. - - -RTEMS_TOPdir="../../../../../../.."; - - -PROJECT_ROOT=`pwd`/$RTEMS_TOPdir; - - -echo $ac_n "checking for RTEMS Version""... $ac_c" 1>&6 -echo "configure:552: checking for RTEMS Version" >&5 -if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then -RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \ -sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'` -else -{ echo "configure: error: Unable to find ${RTEMS_TOPdir}/VERSION" 1>&2; exit 1; } -fi -if test -z "$RTEMS_VERSION"; then -{ echo "configure: error: Unable to determine version" 1>&2; exit 1; } -fi -echo "$ac_t""$RTEMS_VERSION" 1>&6 - - - -# 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:593: 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:614: 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:632: 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}- - - - -echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6 -echo "configure:657: checking rtems target cpu" >&5 -case "${target}" in - # hpux unix port should go here - i[3456]86-go32-rtems*) - target_cpu=i386 - ;; - i[3456]86-pc-linux*) # unix "simulator" port - target_cpu=unix - ;; - i[3456]86-*freebsd2*) # unix "simulator" port - target_cpu=unix - ;; - no_cpu-*rtems*) - target_cpu=no_cpu - ;; - ppc*-*rtems*) - target_cpu=powerpc - ;; - sparc-sun-solaris*) # unix "simulator" port - target_cpu=unix - ;; - *) - target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'` - ;; -esac -echo "$ac_t""$target_cpu" 1>&6 - - -# 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:697: 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' - -echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:750: checking whether build environment is sane" >&5 -# Just in case -sleep 1 -echo timestamp > conftestfile -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftestfile` - fi - if test "$*" != "X $srcdir/configure conftestfile" \ - && test "$*" != "X conftestfile $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - { echo "configure: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" 1>&2; exit 1; } - fi - - test "$2" = conftestfile - ) -then - # Ok. - : -else - { echo "configure: error: newly created file is older than distributed files! -Check your system clock" 1>&2; exit 1; } -fi -rm -f conftest* -echo "$ac_t""yes" 1>&6 -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," - -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:807: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= -else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - - -PACKAGE=rtems-lib-libbsp-unix-posix-tools - -VERSION=$RTEMS_VERSION - -if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then - { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } -fi - - - -missing_dir=`cd $ac_aux_dir && pwd` -echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:846: checking for working aclocal" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (aclocal --version) < /dev/null > /dev/null 2>&1; then - ACLOCAL=aclocal - echo "$ac_t""found" 1>&6 -else - ACLOCAL="$missing_dir/missing aclocal" - echo "$ac_t""missing" 1>&6 -fi - -echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:859: checking for working autoconf" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (autoconf --version) < /dev/null > /dev/null 2>&1; then - AUTOCONF=autoconf - echo "$ac_t""found" 1>&6 -else - AUTOCONF="$missing_dir/missing autoconf" - echo "$ac_t""missing" 1>&6 -fi - -echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:872: checking for working automake" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (automake --version) < /dev/null > /dev/null 2>&1; then - AUTOMAKE=automake - echo "$ac_t""found" 1>&6 -else - AUTOMAKE="$missing_dir/missing automake" - echo "$ac_t""missing" 1>&6 -fi - -echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:885: checking for working autoheader" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (autoheader --version) < /dev/null > /dev/null 2>&1; then - AUTOHEADER=autoheader - echo "$ac_t""found" 1>&6 -else - AUTOHEADER="$missing_dir/missing autoheader" - echo "$ac_t""missing" 1>&6 -fi - -echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:898: checking for working makeinfo" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (makeinfo --version) < /dev/null > /dev/null 2>&1; then - MAKEINFO=makeinfo - echo "$ac_t""found" 1>&6 -else - MAKEINFO="$missing_dir/missing makeinfo" - echo "$ac_t""missing" 1>&6 -fi - - - - -for ac_prog in bash ksh sh -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:918: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$KSH" in - /*) - ac_cv_path_KSH="$KSH" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_KSH="$KSH" # Let the user override the test with a dos path. - ;; - *) - 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_path_KSH="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -KSH="$ac_cv_path_KSH" -if test -n "$KSH"; then - echo "$ac_t""$KSH" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$KSH" && break -done - -if test -z "$KSH"; then -{ echo "configure: error: *** - Cannot determine a usable shell bash/ksh/sh - Please contact your system administrator " 1>&2; exit 1; }; -fi - - -# Extract the first word of "perl", so it can be a program name with args. -set dummy perl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:963: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$PERL" in - /*) - ac_cv_path_PERL="$PERL" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path. - ;; - *) - 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_path_PERL="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -PERL="$ac_cv_path_PERL" -if test -n "$PERL"; then - echo "$ac_t""$PERL" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$PERL" ; then -echo "configure: warning: *** - perl was not found - Note: Some tools will not be built." 1>&2 -fi - - - - -if test -n "$PERL"; then - HAVE_PERL_TRUE= - HAVE_PERL_FALSE='#' -else - HAVE_PERL_TRUE='#' - HAVE_PERL_FALSE= -fi - -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 -runtest -shmdump -looptest -semdump" | 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%@RTEMS_TOPdir@%$RTEMS_TOPdir%g -s%@PROJECT_ROOT@%$PROJECT_ROOT%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%@PACKAGE@%$PACKAGE%g -s%@VERSION@%$VERSION%g -s%@ACLOCAL@%$ACLOCAL%g -s%@AUTOCONF@%$AUTOCONF%g -s%@AUTOMAKE@%$AUTOMAKE%g -s%@AUTOHEADER@%$AUTOHEADER%g -s%@MAKEINFO@%$MAKEINFO%g -s%@SET_MAKE@%$SET_MAKE%g -s%@KSH@%$KSH%g -s%@PERL@%$PERL%g -s%@HAVE_PERL_TRUE@%$HAVE_PERL_TRUE%g -s%@HAVE_PERL_FALSE@%$HAVE_PERL_FALSE%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 -runtest -shmdump -looptest -semdump"} -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 - -EOF -cat >> $CONFIG_STATUS <<\EOF - -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/c/src/lib/libbsp/unix/posix/tools/configure.in b/c/src/lib/libbsp/unix/posix/tools/configure.in deleted file mode 100644 index 02ee4f9c48..0000000000 --- a/c/src/lib/libbsp/unix/posix/tools/configure.in +++ /dev/null @@ -1,23 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl -dnl $Id$ - -AC_INIT(runtest.in) -AC_CONFIG_AUX_DIR(../../../../../../..) - -RTEMS_TOP(../../../../../../..) -RTEMS_CANONICAL_TARGET_CPU - -AM_INIT_AUTOMAKE(rtems-lib-libbsp-unix-posix-tools,$RTEMS_VERSION,no) - -RTEMS_PATH_KSH -RTEMS_PATH_PERL - -AM_CONDITIONAL(HAVE_PERL,test -n "$PERL") - -AC_OUTPUT( -Makefile -runtest -shmdump -looptest -semdump) diff --git a/c/src/lib/libbsp/unix/posix/tools/looptest.in b/c/src/lib/libbsp/unix/posix/tools/looptest.in deleted file mode 100644 index 0f6965fe2b..0000000000 --- a/c/src/lib/libbsp/unix/posix/tools/looptest.in +++ /dev/null @@ -1,93 +0,0 @@ -#!@KSH@ -p -# -# $Id$ -# - -# progname=`basename $0` -progname=${0##*/} # fast basename hack for ksh, bash - -# must be uppercase hex; dc is feeble minded -clicks_per_tick="1" -# default is 0x3 -hexbump=1 -iterations=10 - -USAGE=\ -"usage: $progname [ -opts ] file [ file ... ] - -o options -- specify options to be passed to runtest - -c clicks -- specify (hex) value for clicks / tick (default $clicks_per_tick) - -n iterations -- num times to loop thru specified tests (default $iterations) - -b hexbump -- increment clicks-per-ticks this much each loop (default $hexbump) - -v -- verbose" - -# log an error to stderr -prerr() -{ - echo "$*" >&2 -} - -fatal() { - [ "$1" ] && prerr $* - prerr "$USAGE" - exit 1 -} - -warn() { - [ "$1" ] && prerr $* -} - -# -# process the options -# -# defaults for getopt vars -# - -verbose="" -extra_options="" - -while getopts vo:c:n:b: OPT -do - case "$OPT" in - v) - verbose="yes";; - o) - extra_options="$OPTARG";; - c) - clicks_per_ticks="$OPTARG";; - n) - iterations="$OPTARG";; - b) - hexbump="$OPTARG";; - *) - fatal;; - esac -done -((shiftcount = $OPTIND - 1)) -shift $shiftcount - -args=$* - -# -# Run the tests -# After each run, rename 'log' to log.$clicks_per_tick -# - -tests="$args" - -while [ $iterations -gt 0 ] -do - ./runtest $extra_options -c $clicks_per_tick $tests - rm -rf log.$clicks_per_tick.OLD - [ -d log.$clicks_per_tick ] && mv log.$clicks_per_tick log.$clicks_per_tick.OLD - mv log log.$clicks_per_tick - - ((iterations = $iterations - 1)) - clicks_per_tick=`echo 16 o 16 i $clicks_per_tick $hexbump + p q | dc` -done - -exit 0 - -# Local Variables: *** -# mode:ksh *** -# End: *** - diff --git a/c/src/lib/libbsp/unix/posix/tools/runtest.in b/c/src/lib/libbsp/unix/posix/tools/runtest.in deleted file mode 100644 index 2d08f2f033..0000000000 --- a/c/src/lib/libbsp/unix/posix/tools/runtest.in +++ /dev/null @@ -1,255 +0,0 @@ -#!@KSH@ -p -# -# Run rtems tests on a POSIX-ish UNIX -# -# $Id$ -# - -trap "test_exit 1" 1 2 3 13 14 15 - -trap "test_exit 1" 1 2 3 13 14 15 - -# progname=`basename $0` -progname=${0##*/} # fast basename hack for ksh, bash - -USAGE=\ -"usage: $progname [ -opts ] test [ test ... ] - -c clicks -- specify (hex) value for clicks / tick - -v -- verbose - -l logdir -- specify log directory (default is 'logdir') - - Specify test as 'test' or 'test.exe'. - All multiprocessing tests *must* be specified simply as 'mp01', etc. -" - -# export everything -set -a - -# log an error to stderr -prerr() -{ - echo "$*" >&2 -} - -fatal() { - [ "$1" ] && prerr $* - prerr "$USAGE" - exit 1 -} - -warn() { - [ "$1" ] && prerr $* -} - -# print args, 1 per line -ml_echo() -{ - for l - do - echo "$l" - done -} - -killem() -{ - kill -9 $pid $pid1 $pid2 2> /dev/null -} - - -killem() -{ - kill -9 $pid $pid1 $pid2 2> /dev/null -} - - -test_exit() -{ - exit_code=$1 - - killem - - killem - - rm -f ${logfile}.tmp* - - exit $exit_code -} - -# -# process the options -# -# defaults for getopt vars -# - -verbose="" -extra_options="" -clicks_per_tick="" -logdir=log -# how long can we run; rtems tests might run 300 seconds -max_run_time=400 -run_to_completion="yes" - -while getopts vo:c:l: OPT -do - case "$OPT" in - v) - verbose="yes";; - l) - logdir="$OPTARG";; - o) - extra_options="$OPTARG";; - c) - clicks_per_tick="$OPTARG";; - *) - fatal;; - esac -done - -let $((shiftcount = $OPTIND - 1)) -shift $shiftcount - -args=$* - -# -# Run the tests -# - -tests="$args" -if [ ! "$tests" ] -then - set -- `echo *.exe` - tests="$*" -fi - -[ -d $logdir ] || mkdir $logdir || fatal "could not create log directory ($logdir)" - -for tfile in $tests -do - - tname=`echo $tfile | sed -e 's/\.exe$//'` - tname=`basename $tname` - - TEST_TYPE="single" - - case $tname in - monitor) - if [ $run_to_completion = "yes" ] - then - warn "Skipping $tname; it is interactive" - continue - fi - ;; - *-node2*) - warn "Skipping $tname; 'runtest' runs both nodes when for *-node1" - continue;; - *-node1*) - tname=`echo $tname | sed 's/-node.*//'` - warn "Running both nodes associated with $tname" - TEST_TYPE="mp" - ;; - stackchk*|spfatal*|malloctest*|termio*) - warn "Skipping $tname; it locks up or takes a VERY long time to run" - continue - ;; - esac - - if [ $TEST_TYPE = "mp" ] - then - logfile1=$logdir/${tname}_1 - infofile1=$logfile1.info - logfile2=$logdir/${tname}_2 - infofile2=$logfile2.info - - rm -f ${logfile1} - rm -f ${logfile2} - - date=`date` - echo "Starting $tname at $date" - - ./${tname}-node1.exe > $logfile1 2>&1 & - pid1=$! - ./${tname}-node2.exe > $logfile2 2>&1 & - pid2=$! - - # Wait for both cpu's to complete, ensuring they don't run forever... - time_run=0 - while [ $time_run -lt $max_run_time ] - do - # sleep 5s at a time waiting for jobs to finish or timer to expire - # if job has exited, then we exit, too. - sleep 5 - kill -0 $pid1 2> /dev/null - running1=$? - kill -0 $pid2 2> /dev/null - running2=$? - if [ $running1 -eq 0 ] && [ $running2 -eq 0 ] # both still running - then - time_run=$((time_run + 5)) - if [ $time_run -ge $max_run_time ] - then - echo "$tname ran too long; killing it" - ran_too_long="yes" - fi - else - ran_too_long="no" - # if one is still running, have to kill them - if [ $running1 -ne $running2 ] - then - sleep 10 # give other node a chance to gracefully die - fi - break - fi - done - - # make sure they are gone - kill -9 $pid1 2> /dev/null - kill -9 $pid2 2> /dev/null - fi - - if [ $TEST_TYPE = "single" ] - then - logfile=$logdir/$tname - infofile=$logfile.info - - rm -f ${logfile} - - date=`date` - echo "Starting $tname.exe at $date" - - ./$tname.exe > $logfile 2>&1 & - pid=$! - - # Make sure it won't run forever... - time_run=0 - while [ $time_run -lt $max_run_time ] - do - # sleep 5s at a time waiting for job to finish or timer to expire - # if job has exited, then we exit, too. - sleep 5 - kill -0 $pid 2> /dev/null - running=$? - if [ $running -eq 0 ] - then - time_run=$((time_run + 5)) - if [ $time_run -ge $max_run_time ] - then - kill -9 $pid 2> /dev/null - ran_too_long="yes" - fi - else - ran_too_long="no" - break - fi - done - fi - - pid="" - -done - -test_exit 0 - -# Local Variables: *** -# mode:ksh *** -# End: *** - diff --git a/c/src/lib/libbsp/unix/posix/tools/semdump.in b/c/src/lib/libbsp/unix/posix/tools/semdump.in deleted file mode 100644 index 53710a629e..0000000000 --- a/c/src/lib/libbsp/unix/posix/tools/semdump.in +++ /dev/null @@ -1,59 +0,0 @@ -#!@PERL@ -# -# $Id$ -# -eval "exec @PERL@ -S $0 $*" - if $running_under_some_shell; - -# dump semaphore array values tony@divnc.com - -require 'sys/sem.ph'; -require 'getopts.pl'; -&Getopts("vhi:k:"); # verbose, help, id, key - -if ($opt_h || ($opt_i && $opt_k)) -{ - print STDERR <<NO_MORE_HELP; -semdump - - Dump info about specified semaphore. - -Usage: $0 [-v] { -i semid | -k semkey } - - -v -- possibly more verbose - -i semid -- semaphore id - -k semkey -- semaphore key - -h -- help - - anything else == this help message -NO_MORE_HELP - exit 1; -} - -$verbose = $opt_v; -$id = $opt_i; -$key = $opt_k; - -if ($key) -{ - $key = oct($key) if $key =~ /^0/; - die "Could not convert key to id; $!" unless $id = semget($key, 1, 0); -} - -# I don't know to find out how many sem's are attached to the id -# so just keep reading them until we get an error. - -printf("KEY: 0x%X (%d) ", $key, $key) if $key; -print "ID: $id\n"; - -semlist: -for ($semnum=0; $semnum < 10; $semnum++) -{ - $val = semctl($id, $semnum, &GETVAL, 0); - $val || ($val = -1); - - last semlist if ($val == -1); - - printf " %d: %d\n", $semnum, $val; -} - diff --git a/c/src/lib/libbsp/unix/posix/tools/shmdump.in b/c/src/lib/libbsp/unix/posix/tools/shmdump.in deleted file mode 100644 index fa965702ca..0000000000 --- a/c/src/lib/libbsp/unix/posix/tools/shmdump.in +++ /dev/null @@ -1,134 +0,0 @@ -#!@PERL@ -# -# $Id$ -# -eval "exec @PERL@ -S $0 $*" - if $running_under_some_shell; - -# dump shared memory segment tony@divnc.com - -require 'sys/shm.ph'; -require 'getopts.pl'; -&Getopts("vhi:k:f:l:b:w"); # verbose, help, id, key, first, length, word, base - -if ($opt_h || ($opt_i && $opt_k)) -{ - print STDERR <<NO_MORE_HELP; -shmdump - - Dump contents of specifed shared memory segment. - -Usage: $0 [options] - - -h -- help - -v -- possibly more verbose - -i shmid -- shm id - -k shmkey -- shm key - -f first -- start of partial dump - -l length -- length of partial dump - -w -- dump as 4byte words instead of bytes - -b base -- use 'base' as base address for output - - anything else == this help message -NO_MORE_HELP - exit 1; -} - -$verbose = $opt_v; -$id = $opt_i; -$key = $opt_k; -$offset = $opt_f; -$print_length = $opt_l; -$base = $opt_b; -$word_dump = $opt_w; - -if ($key) -{ - # ensure key is an integer - $key = oct($key) if $key =~ /^0/; - die "Could not convert key to id; $!" unless $id = shmget($key, 1, 0); -} - -# ensure integerhood in case of leading '0x' -$base = oct($base) if $base =~ /^0/; -$offset = oct($offset) if $offset =~ /^0/; -$print_length = oct($print_length) if $print_length =~ /^0/; - -if ( ! shmctl($id, &IPC_STAT, $shmid_ds)) -{ - die "shmctl(2) for id $id failed -- (I was trying to get size): $!"; -} - -# Pick the length out. -# It is at byte offset 0x30 on hpux9 and probably hpux10 -# Also get the key if we don't have it already. Don't need it tho... -$length = unpack("I", substr($shmid_ds, 0x30, 4)); -$key = unpack("I", substr($shmid_ds, 0x14, 4)) if ! $key; - -# poke around looking for length and key -# print "I guess: length: $length, key: $key\n"; -# print "****$shmid_ds****\n"; die ""; - -# make sure offset and print length make sense -$print_length = $length if ! $print_length; -if (($offset + $print_length) > $length) -{ - die "offset ($offset) and length ($print_length) go beyond end of segment ($length bytes)"; -} - -printf("KEY: 0x%X (%d) ", $key, $key) if ($key); -printf "ID: $id\n"; -printf " %d bytes (0x%X), %d words, logical base is 0x%X\n", - $length, $length, $length / 4, $base; -if ($offset || ($print_length != $length)) -{ - printf " printing %X (%d) bytes starting at offset 0x%X (%d)\n", - $print_length, $print_length, $offset, $offset; -} -printf "\n"; - -if ( ! shmread($id, $shm_data, $offset, $print_length)) -{ - die "could not attach and read from shmid $id: $!"; -} - -# the dump code below derived from "Real Perl Programs" example "xdump" -# from Camel book - -$base += $offset; -$offset = 0; -for ($len = $print_length; $len >= 16; ) -{ - $data = substr($shm_data, $offset, 16); - - @array = unpack('N4', $data); - $data =~ tr/\0-\37\177-\377/./; - printf "%8.8lX %8.8lX %8.8lX %8.8lX %8.8lX |%s|\n", - $base, @array, $data; - - $offset += 16; - $base += 16; - $len -= 16; -} - -# Now finish up the end a byte at a time - -if ($len) -{ - $data = substr($shm_data, $offset, $len); - @array = unpack('C*', $data); - for (@array) - { - $_ = sprintf('%2.2X', $_); - } - - push(@array, ' ') while $len++ < 16; - - $data =~ tr/\0-\37\177-\377/./; - $data =~ s/[^ -~]/./g; - - printf "%8.8lX ", $base; - printf "%s%s%s%s %s%s%s%s %s%s%s%s %s%s%s%s |%-16s|\n", - @array, $data; -} - diff --git a/c/src/lib/libbsp/unix/posix/wrapup/Makefile.in b/c/src/lib/libbsp/unix/posix/wrapup/Makefile.in deleted file mode 100644 index 9db78b4821..0000000000 --- a/c/src/lib/libbsp/unix/posix/wrapup/Makefile.in +++ /dev/null @@ -1,72 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../../../../../.. -subdir = c/src/lib/libbsp/unix/posix/wrapup - -INSTALL = @INSTALL@ - -RTEMS_ROOT = $(top_srcdir)/@RTEMS_TOPdir@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -BSP_PIECES=startup clock console timer -# pieces to pick up out of libcpu/unix -CPU_PIECES= -GENERIC_PIECES= - -include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg -include $(RTEMS_ROOT)/make/lib.cfg - -ifeq ($(HAS_MP),yes) -GENERIC_PIECES += shmdr -BSP_PIECES += shmsupp -endif - -# bummer; have to use $foreach since % pattern subst rules only replace 1x -OBJS=$(foreach piece, $(BSP_PIECES), ../$(piece)/$(ARCH)/$(piece).rel) \ - $(foreach piece, $(CPU_PIECES), \ - ../../../../libcpu/$(RTEMS_CPU)/$(piece)/$(ARCH)/$(piece).rel) \ - $(foreach piece, $(GENERIC_PIECES), \ - ../../../$(piece)/$(ARCH)/$(piece).rel) -LIB=$(ARCH)/libbsp.a - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -$(LIB): ${OBJS} - $(make-library) - -all: ${ARCH} $(SRCS) $(LIB) - $(INSTALL_VARIANT) -m 644 $(LIB) ${PROJECT_RELEASE}/lib - -$(PROJECT_ROOT)/${RTEMS_BSP}/lib/bsp_specs: ../bsp_specs - $(INSTALL_DATA) $< $@ - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status |