Added freebsd support from Dario Alcocer <alcocer@connectnet.com>.

This commit is contained in:
Joel Sherrill
1998-06-18 15:22:35 +00:00
parent ce691c51fd
commit 9a6994b490
12 changed files with 164 additions and 70 deletions

View File

@@ -120,6 +120,9 @@ The following persons/organizations have made contributions:
for numerous enhancements to the RTEMS autoconf support as well as
for the Hitachi SH port.
+ Dario Alcocer <alcocer@connectnet.com> submitted a port of the
RTEMS port to FreeBSD.
Finally, the RTEMS project would like to thank those who have contributed
to the other free software efforts which RTEMS utilizes. The primary RTEMS
development environment is from the Free Software Foundation (the GNU

View File

@@ -24,6 +24,20 @@
#include <termios.h>
#include <unistd.h>
/*
* FreeBSD does not support a full POSIX termios so we have to help it out
*/
#if defined(__FreeBSD__)
#define XTABS 0
#define ONLRET 0
#define ONOCR 0
#define TABDLY 0
#define OLCUC 0
#define ILCUC 0
#endif
/*
* The size of the cooked buffer
*/

View File

@@ -152,8 +152,12 @@ void _CPU_Signal_initialize( void )
sigaction(SIGUSR1, &act, 0);
sigaction(SIGUSR2, &act, 0);
sigaction(SIGCHLD, &act, 0);
#ifdef SIGCLD
sigaction(SIGCLD, &act, 0);
#endif
#ifdef SIGPWR
sigaction(SIGPWR, &act, 0);
#endif
sigaction(SIGVTALRM, &act, 0);
sigaction(SIGPROF, &act, 0);
sigaction(SIGIO, &act, 0);
@@ -741,9 +745,10 @@ void _CPU_Stray_signal(int sig_num)
switch (sig_num)
{
#ifdef SIGCLD
case SIGCLD:
break;
#endif
default:
{
/*
@@ -987,7 +992,7 @@ void _CPU_SHM_Init(
help.val = 1;
status = semctl( _CPU_SHM_Semid, i, SETVAL, help );
#elif defined(__linux__)
#elif defined(__linux__) || defined(__FreeBSD__)
union semun help;
help.val = 1;

View File

@@ -382,6 +382,14 @@ extern "C" {
*/
#ifdef RTEMS_UNIXLIB
#if defined(__FreeBSD__)
#define RET_OFF 0
#define EBX_OFF 1
#define EBP_OFF 2
#define ESP_OFF 3
#define ESI_OFF 4
#define EDI_OFF 5
#else
#define EBX_OFF 0
#define ESI_OFF 1
#define EDI_OFF 2
@@ -389,6 +397,7 @@ extern "C" {
#define ESP_OFF 4
#define RET_OFF 5
#endif
#endif
#endif

View File

@@ -46,6 +46,10 @@ extern "C" {
#define CPU_MODEL_NAME "Linux"
#elif defined(__FreeBSD__)
#define CPU_MODEL_NAME "FreeBSD"
#else
#error "Unsupported CPU Model"

View File

@@ -54,6 +54,13 @@ case $target in
echo Not supported on unix port.
exit 0
;;
i[3456]86-unknown-freebsd2.[12]*)
echo freebsd
rtems_cpu=unix
bsp=freebsd2
echo Not supported on unix port.
exit 0
;;
*-rtems*)
cpu=`echo $target | sed -e 's/-.*//'`
rtems_cpu=$cpu

View File

@@ -24,6 +24,20 @@
#include <termios.h>
#include <unistd.h>
/*
* FreeBSD does not support a full POSIX termios so we have to help it out
*/
#if defined(__FreeBSD__)
#define XTABS 0
#define ONLRET 0
#define ONOCR 0
#define TABDLY 0
#define OLCUC 0
#define ILCUC 0
#endif
/*
* The size of the cooked buffer
*/

138
configure vendored
View File

@@ -1321,6 +1321,12 @@ case "${target}" in
# override these settings
RTEMS_HAS_POSIX_API=no
;;
i[3456]86-unknown-freebsd2.[12]*) # unix "simulator" port
target_cpu=unix
RTEMS_HOST=FreeBSD
# override these settings
RTEMS_HAS_POSIX_API=no
;;
no_cpu-*rtems*)
target_cpu=no_cpu
RTEMS_HAS_POSIX_API=no
@@ -1336,7 +1342,7 @@ case "${target}" in
;;
*)
echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6
echo "configure:1340: checking rtems target cpu" >&5
echo "configure:1346: checking rtems target cpu" >&5
target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
echo "$ac_t""$target_cpu" 1>&6
@@ -1355,7 +1361,7 @@ fi
# Is this a supported CPU?
echo $ac_n "checking if cpu $target_cpu is supported""... $ac_c" 1>&6
echo "configure:1359: checking if cpu $target_cpu is supported" >&5
echo "configure:1365: checking if cpu $target_cpu is supported" >&5
if test -d "$srcdir/c/src/exec/score/cpu/$target_cpu"; then
echo "$ac_t""yes" 1>&6
makefiles="$makefiles c/src/exec/score/cpu/$target_cpu/Makefile"
@@ -1380,7 +1386,7 @@ 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:1384: checking for $ac_word" >&5
echo "configure:1390: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CC_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1420,7 +1426,7 @@ rtems_save_CFLAGS=$CFLAGS
CC=$CC_FOR_TARGET
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1424: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:1430: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1430,11 +1436,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 1434 "configure"
#line 1440 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:1438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1454,12 +1460,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1458: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:1464: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1463: checking whether we are using GNU C" >&5
echo "configure:1469: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1468,7 +1474,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -1483,7 +1489,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1487: checking whether ${CC-cc} accepts -g" >&5
echo "configure:1493: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1525,7 +1531,7 @@ unset ac_cv_prog_cc_cross
echo $ac_n "checking whether $CC_FOR_TARGET accepts -specs""... $ac_c" 1>&6
echo "configure:1529: checking whether $CC_FOR_TARGET accepts -specs" >&5
echo "configure:1535: checking whether $CC_FOR_TARGET accepts -specs" >&5
if eval "test \"`echo '$''{'rtems_cv_gcc_specs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1544,7 +1550,7 @@ echo "$ac_t""$rtems_cv_gcc_specs" 1>&6
echo $ac_n "checking whether $CC_FOR_TARGET accepts --pipe""... $ac_c" 1>&6
echo "configure:1548: checking whether $CC_FOR_TARGET accepts --pipe" >&5
echo "configure:1554: checking whether $CC_FOR_TARGET accepts --pipe" >&5
if eval "test \"`echo '$''{'rtems_cv_gcc_pipe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1585,7 +1591,7 @@ 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:1589: checking for $ac_word" >&5
echo "configure:1595: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CXX_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1625,7 +1631,7 @@ rtems_save_CXXFLAGS=$CXXFLAGS
CXX=$CXX_FOR_TARGET
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1629: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
echo "configure:1635: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1635,11 +1641,11 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
#line 1639 "configure"
#line 1645 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1665,12 +1671,12 @@ if test $ac_cv_prog_cxx_works = no; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1669: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:1675: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
echo "configure:1674: checking whether we are using GNU C++" >&5
echo "configure:1680: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1679,7 +1685,7 @@ else
yes;
#endif
EOF
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@@ -1694,7 +1700,7 @@ if test $ac_cv_prog_gxx = yes; then
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:1698: checking whether ${CXX-g++} accepts -g" >&5
echo "configure:1704: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1757,7 +1763,7 @@ fi
# Extract the first word of ""$program_prefix"ar", so it can be a program name with args.
set dummy "$program_prefix"ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1761: checking for $ac_word" >&5
echo "configure:1767: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1789,7 +1795,7 @@ fi
# Extract the first word of ""$program_prefix"as", so it can be a program name with args.
set dummy "$program_prefix"as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1793: checking for $ac_word" >&5
echo "configure:1799: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1821,7 +1827,7 @@ fi
# Extract the first word of ""$program_prefix"nm", so it can be a program name with args.
set dummy "$program_prefix"nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1825: checking for $ac_word" >&5
echo "configure:1831: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1853,7 +1859,7 @@ fi
# Extract the first word of ""$program_prefix"ld", so it can be a program name with args.
set dummy "$program_prefix"ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1857: checking for $ac_word" >&5
echo "configure:1863: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1886,7 +1892,7 @@ fi
# Extract the first word of ""$program_prefix"ranlib", so it can be a program name with args.
set dummy "$program_prefix"ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1890: checking for $ac_word" >&5
echo "configure:1896: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1919,7 +1925,7 @@ fi
# Extract the first word of ""$program_prefix"objcopy", so it can be a program name with args.
set dummy "$program_prefix"objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1923: checking for $ac_word" >&5
echo "configure:1929: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1951,7 +1957,7 @@ fi
# Extract the first word of ""$program_prefix"size", so it can be a program name with args.
set dummy "$program_prefix"size; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1955: checking for $ac_word" >&5
echo "configure:1961: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1985,7 +1991,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1989: checking for $ac_word" >&5
echo "configure:1995: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2014,7 +2020,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2018: checking for $ac_word" >&5
echo "configure:2024: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2062,7 +2068,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2066: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:2072: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2072,11 +2078,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 2076 "configure"
#line 2082 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2096,12 +2102,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2100: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:2106: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:2105: checking whether we are using GNU C" >&5
echo "configure:2111: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2110,7 +2116,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -2125,7 +2131,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:2129: checking whether ${CC-cc} accepts -g" >&5
echo "configure:2135: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2156,12 +2162,12 @@ fi
for ac_func in strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2160: checking for $ac_func" >&5
echo "configure:2166: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2165 "configure"
#line 2171 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2184,7 +2190,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2212,7 +2218,7 @@ done
# find all the Executive Makefiles
echo $ac_n "checking for Makefile.in in c/src/exec/score/tools/$target_cpu""... $ac_c" 1>&6
echo "configure:2216: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5
echo "configure:2222: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5
if test -d $srcdir/c/src/exec/score/tools/$target_cpu; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2227,7 +2233,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/exec/rtems""... $ac_c" 1>&6
echo "configure:2231: checking for Makefile.in in c/src/exec/rtems" >&5
echo "configure:2237: checking for Makefile.in in c/src/exec/rtems" >&5
if test -d $srcdir/c/src/exec/rtems; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2242,7 +2248,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/exec/sapi""... $ac_c" 1>&6
echo "configure:2246: checking for Makefile.in in c/src/exec/sapi" >&5
echo "configure:2252: checking for Makefile.in in c/src/exec/sapi" >&5
if test -d $srcdir/c/src/exec/sapi; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2259,7 +2265,7 @@ fi
if test "$RTEMS_HAS_POSIX_API" = "yes"; then
echo $ac_n "checking for Makefile.in in c/src/exec/posix""... $ac_c" 1>&6
echo "configure:2263: checking for Makefile.in in c/src/exec/posix" >&5
echo "configure:2269: checking for Makefile.in in c/src/exec/posix" >&5
if test -d $srcdir/c/src/exec/posix; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2281,7 +2287,7 @@ if test -d "$srcdir/c/src/lib/libbsp/$target_cpu"; then
if test -z "$rtems_bsp"; then
echo $ac_n "checking for bsps""... $ac_c" 1>&6
echo "configure:2285: checking for bsps" >&5
echo "configure:2291: checking for bsps" >&5
files=`ls $srcdir/c/src/lib/libbsp/$target_cpu`
for file in $files; do
case $file in
@@ -2336,7 +2342,7 @@ echo "configure:2285: checking for bsps" >&5
bspdirs="$bspdirs $bspdir"
echo $ac_n "checking for Makefile.in in c/src/lib/libbsp/$bspcpudir/$bspdir""... $ac_c" 1>&6
echo "configure:2340: checking for Makefile.in in c/src/lib/libbsp/$bspcpudir/$bspdir" >&5
echo "configure:2346: checking for Makefile.in in c/src/lib/libbsp/$bspcpudir/$bspdir" >&5
if test -d $srcdir/c/src/lib/libbsp/$bspcpudir/$bspdir; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2359,7 +2365,7 @@ fi
# find all the CPU dependent library Makefiles
echo $ac_n "checking for Makefile.in in c/src/lib/libcpu/$target_cpu""... $ac_c" 1>&6
echo "configure:2363: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5
echo "configure:2369: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5
if test -d $srcdir/c/src/lib/libcpu/$target_cpu; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2376,7 +2382,7 @@ fi
if test "$skip_startfiles" != "yes"; then
echo $ac_n "checking for Makefile.in in c/src/lib/start/$target_cpu""... $ac_c" 1>&6
echo "configure:2380: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5
echo "configure:2386: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5
if test -d $srcdir/c/src/lib/start/$target_cpu; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2418,7 +2424,7 @@ fi
# If the tests are enabled, then find all the test suite Makefiles
echo $ac_n "checking if the test suites are enabled? ""... $ac_c" 1>&6
echo "configure:2422: checking if the test suites are enabled? " >&5
echo "configure:2428: checking if the test suites are enabled? " >&5
tests_enabled=yes
# Check whether --enable-tests or --disable-tests was given.
if test "${enable_tests+set}" = set; then
@@ -2437,7 +2443,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/tools/$target_cpu""... $ac_c" 1>&6
echo "configure:2441: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5
echo "configure:2447: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5
if test -d $srcdir/c/src/tests/tools/$target_cpu; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2454,7 +2460,7 @@ fi
if test "$tests_enabled" = "yes"; then
echo $ac_n "checking for Makefile.in in c/src/tests/libtests""... $ac_c" 1>&6
echo "configure:2458: checking for Makefile.in in c/src/tests/libtests" >&5
echo "configure:2464: checking for Makefile.in in c/src/tests/libtests" >&5
if test -d $srcdir/c/src/tests/libtests; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2469,7 +2475,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/sptests""... $ac_c" 1>&6
echo "configure:2473: checking for Makefile.in in c/src/tests/sptests" >&5
echo "configure:2479: checking for Makefile.in in c/src/tests/sptests" >&5
if test -d $srcdir/c/src/tests/sptests; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2484,7 +2490,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/tmtests""... $ac_c" 1>&6
echo "configure:2488: checking for Makefile.in in c/src/tests/tmtests" >&5
echo "configure:2494: checking for Makefile.in in c/src/tests/tmtests" >&5
if test -d $srcdir/c/src/tests/tmtests; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2499,7 +2505,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/mptests""... $ac_c" 1>&6
echo "configure:2503: checking for Makefile.in in c/src/tests/mptests" >&5
echo "configure:2509: checking for Makefile.in in c/src/tests/mptests" >&5
if test -d $srcdir/c/src/tests/mptests; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2515,7 +2521,7 @@ fi
if test "$RTEMS_HAS_POSIX_API" = "yes"; then
echo $ac_n "checking for Makefile.in in c/src/tests/psxtests""... $ac_c" 1>&6
echo "configure:2519: checking for Makefile.in in c/src/tests/psxtests" >&5
echo "configure:2525: checking for Makefile.in in c/src/tests/psxtests" >&5
if test -d $srcdir/c/src/tests/psxtests; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2533,7 +2539,7 @@ fi
# If the HWAPI is enabled, the find the HWAPI Makefiles
echo $ac_n "checking if the HWAPI is enabled? ""... $ac_c" 1>&6
echo "configure:2537: checking if the HWAPI is enabled? " >&5
echo "configure:2543: checking if the HWAPI is enabled? " >&5
# Check whether --enable-hwapi or --disable-hwapi was given.
if test "${enable_hwapi+set}" = set; then
enableval="$enable_hwapi"
@@ -2544,7 +2550,7 @@ if test "${enable_hwapi+set}" = set; then
makefiles="$makefiles c/src/lib/libhwapi/Makefile"
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/analog""... $ac_c" 1>&6
echo "configure:2548: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5
echo "configure:2554: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5
if test -d $srcdir/c/src/lib/libhwapi/analog; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2559,7 +2565,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/discrete""... $ac_c" 1>&6
echo "configure:2563: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5
echo "configure:2569: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5
if test -d $srcdir/c/src/lib/libhwapi/discrete; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2574,7 +2580,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/drivers""... $ac_c" 1>&6
echo "configure:2578: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5
echo "configure:2584: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5
if test -d $srcdir/c/src/lib/libhwapi/drivers; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2589,7 +2595,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory""... $ac_c" 1>&6
echo "configure:2593: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5
echo "configure:2599: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5
if test -d $srcdir/c/src/lib/libhwapi/non_volatile_memory; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2604,7 +2610,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/serial""... $ac_c" 1>&6
echo "configure:2608: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5
echo "configure:2614: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5
if test -d $srcdir/c/src/lib/libhwapi/serial; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2619,7 +2625,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/support""... $ac_c" 1>&6
echo "configure:2623: checking for Makefile.in in c/src/lib/libhwapi/support" >&5
echo "configure:2629: checking for Makefile.in in c/src/lib/libhwapi/support" >&5
if test -d $srcdir/c/src/lib/libhwapi/support; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2634,7 +2640,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/wrapup""... $ac_c" 1>&6
echo "configure:2638: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5
echo "configure:2644: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5
if test -d $srcdir/c/src/lib/libhwapi/wrapup; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2679,7 +2685,7 @@ fi
# pick up all the Makefiles in required parts of the tree
echo $ac_n "checking for Makefile.in in c/build-tools""... $ac_c" 1>&6
echo "configure:2683: checking for Makefile.in in c/build-tools" >&5
echo "configure:2689: checking for Makefile.in in c/build-tools" >&5
if test -d $srcdir/c/build-tools; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2694,7 +2700,7 @@ fi
echo $ac_n "checking for Makefile.in in make""... $ac_c" 1>&6
echo "configure:2698: checking for Makefile.in in make" >&5
echo "configure:2704: checking for Makefile.in in make" >&5
if test -d $srcdir/make; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2709,7 +2715,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libmisc""... $ac_c" 1>&6
echo "configure:2713: checking for Makefile.in in c/src/lib/libmisc" >&5
echo "configure:2719: checking for Makefile.in in c/src/lib/libmisc" >&5
if test -d $srcdir/c/src/lib/libmisc; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2724,7 +2730,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/samples""... $ac_c" 1>&6
echo "configure:2728: checking for Makefile.in in c/src/tests/samples" >&5
echo "configure:2734: checking for Makefile.in in c/src/tests/samples" >&5
if test -d $srcdir/c/src/tests/samples; then
rtems_av_save_dir=`pwd`;
cd $srcdir;

View File

@@ -153,6 +153,12 @@ case "${target}" in
# override these settings
RTEMS_HAS_POSIX_API=no
;;
i[[3456]]86-unknown-freebsd2.[[12]]*) # unix "simulator" port
target_cpu=unix
RTEMS_HOST=FreeBSD
# override these settings
RTEMS_HAS_POSIX_API=no
;;
no_cpu-*rtems*)
target_cpu=no_cpu
RTEMS_HAS_POSIX_API=no

View File

@@ -24,6 +24,20 @@
#include <termios.h>
#include <unistd.h>
/*
* FreeBSD does not support a full POSIX termios so we have to help it out
*/
#if defined(__FreeBSD__)
#define XTABS 0
#define ONLRET 0
#define ONOCR 0
#define TABDLY 0
#define OLCUC 0
#define ILCUC 0
#endif
/*
* The size of the cooked buffer
*/

View File

@@ -152,8 +152,12 @@ void _CPU_Signal_initialize( void )
sigaction(SIGUSR1, &act, 0);
sigaction(SIGUSR2, &act, 0);
sigaction(SIGCHLD, &act, 0);
#ifdef SIGCLD
sigaction(SIGCLD, &act, 0);
#endif
#ifdef SIGPWR
sigaction(SIGPWR, &act, 0);
#endif
sigaction(SIGVTALRM, &act, 0);
sigaction(SIGPROF, &act, 0);
sigaction(SIGIO, &act, 0);
@@ -741,9 +745,10 @@ void _CPU_Stray_signal(int sig_num)
switch (sig_num)
{
#ifdef SIGCLD
case SIGCLD:
break;
#endif
default:
{
/*
@@ -987,7 +992,7 @@ void _CPU_SHM_Init(
help.val = 1;
status = semctl( _CPU_SHM_Semid, i, SETVAL, help );
#elif defined(__linux__)
#elif defined(__linux__) || defined(__FreeBSD__)
union semun help;
help.val = 1;

View File

@@ -54,6 +54,13 @@ case $target in
echo Not supported on unix port.
exit 0
;;
i[3456]86-unknown-freebsd2.[12]*)
echo freebsd
rtems_cpu=unix
bsp=freebsd2
echo Not supported on unix port.
exit 0
;;
*-rtems*)
cpu=`echo $target | sed -e 's/-.*//'`
rtems_cpu=$cpu