summaryrefslogtreecommitdiffstats
path: root/aclocal
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-04 18:20:14 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-04 18:20:14 +0000
commitb62a92c804ea40e723864d1995edcb9075dd06c8 (patch)
tree79046e07319c8e326ba1157949d678109b2c8b0c /aclocal
parent4f021c01cc038194b004ab291a2242ea9559479c (diff)
downloadrtems-b62a92c804ea40e723864d1995edcb9075dd06c8.tar.bz2
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
The patch below actuallly consists of two patches: 1) moving librpc to c/src/librpc similar to what has been done to librtems++ 2) reworked configure scripts, many safety and dependency checks added to aclocal/*.m4 macros + configuration fixes. To apply: mkdir c/src/librpc mkdir c/src/librpc/src cp c/src/lib/librpc/*.c c/src/librpc/src cp c/src/lib/librpc/Makefile.in c/src/librpc/src mkdir c/src/librpc/include mkdir c/src/librpc/include/rpc cp c/src/lib/include/rpc/* c/src/librpc/include/rpc patch -p1 < ../rtems-rc-19990820-7.diff rm -rf c/src/lib/librpc rm -rf c/src/lib/include/rpc ./autogen The additional checks in aclocal/*m4 macros add rather restrictive, sometimes unnecessarily restrictive constraints on the sequence of how macros can be used in a configure.in script. Adding them has let my problems with some more complicated configuration options vanish. Apparently some macros had not been in the required order . ---- Now I still get some linking errors for some cpus and bsps, esp when linking cdtest, but also at other locations: e.g. this happens for mips64orion/p4600: # make[5]: Entering directory `/lfs/poseidon/users/rtems/src/multi/build/mips64orion-rtems/c/p4600/tests/samples/hello' /opt/rtems/bin/mips64orion-rtems-gcc --pipe -B../../../../../../p4600/lib/ -specs bsp_specs -qrtems -DP4000 -DCPU_R4000 -DP3_DIAG -D_R4000 -D__mips=3 -mcpu=4600 -G0 -I../../../../../../p4600/lib/include/networking -g -Wall -ansi -fasm -O4 -fomit-frame-pointer -o o-p4600/hello.exe o-p4600/init.o ../../../../../../p4600/lib/no-dpmem.rel ../../../../../../p4600/lib/no-event.rel ../../../../../../p4600/lib/no-msg.rel ../../../../../../p4600/lib/no-mp.rel ../../../../../../p4600/lib/no-part.rel ../../../../../../p4600/lib/no-signal.rel ../../../../../../p4600/lib/no-timer.rel ../../../../../../p4600/lib/no-rtmon.rel /opt/rtems/mips64orion-rtems/lib/libc.a(dtoa.o): In function `_dtoa_r': /opt/hermes/embedded/build/build-mips64orion-tools/mips64orion-rtems/newlib/libc/stdlib/../../../../../src/newlib/libc/stdlib/dtoa.c:348: relocation truncated to fit: R_MIPS_LITERAL no symbol /opt/hermes/embedded/build/build-mips64orion-tools/mips64orion-rtems/newlib/libc/stdlib/../../../../../src/newlib/libc/stdlib/dtoa.c:348: relocation truncated to fit: R_MIPS_LITERAL no symbol /opt/hermes/embedded/build/build-mips64orion-tools/mips64orion-rtems/newlib/libc/stdlib/../../../../../src/newlib/libc/stdlib/dtoa.c:348: relocation truncated to fit: R_MIPS_LITERAL no symbol collect2: ld returned 1 exit status # mips64orion-rtems-gcc -v Reading specs from /opt/rtems/lib/gcc-lib/mips64orion-rtems/2.95.1/specs gcc version 2.95.1 19990816 (release) # mips64orion-rtems-ld -v GNU ld version 2.9.5 (with BFD 2.9.5)
Diffstat (limited to 'aclocal')
-rw-r--r--aclocal/check-bsps.m42
-rw-r--r--aclocal/check-cpu.m42
-rw-r--r--aclocal/check-multiprocessing.m42
-rw-r--r--aclocal/check-networking.m43
-rw-r--r--aclocal/check-posix.m42
-rw-r--r--aclocal/check-rdbg.m42
-rw-r--r--aclocal/enable-networking.m42
-rw-r--r--aclocal/enable-posix.m42
-rw-r--r--aclocal/enable-rdbg.m42
-rw-r--r--aclocal/enable-rtemsbsp.m47
-rw-r--r--aclocal/gcc-specs.m42
-rw-r--r--aclocal/prog-cc.m41
-rw-r--r--aclocal/prog-cxx.m41
-rw-r--r--aclocal/rtems-top.m43
14 files changed, 31 insertions, 2 deletions
diff --git a/aclocal/check-bsps.m4 b/aclocal/check-bsps.m4
index 71c8921cd4..673061c69a 100644
--- a/aclocal/check-bsps.m4
+++ b/aclocal/check-bsps.m4
@@ -39,6 +39,8 @@ AC_MSG_RESULT([[$]$1 .. done])
AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
[dnl
+AC_REQUIRE([RTEMS_TOP])
+
AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
AC_MSG_RESULT([yes])
diff --git a/aclocal/check-cpu.m4 b/aclocal/check-cpu.m4
index 60551ba4d8..e8f1bb96ed 100644
--- a/aclocal/check-cpu.m4
+++ b/aclocal/check-cpu.m4
@@ -5,6 +5,8 @@ AC_DEFUN(RTEMS_CHECK_CPU,
[dnl
AC_REQUIRE([RTEMS_TOP])
AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
+AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
+
# Is this a supported CPU?
AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
diff --git a/aclocal/check-multiprocessing.m4 b/aclocal/check-multiprocessing.m4
index 84a2cabaef..05c66efa03 100644
--- a/aclocal/check-multiprocessing.m4
+++ b/aclocal/check-multiprocessing.m4
@@ -6,6 +6,8 @@ AC_DEFUN(RTEMS_CHECK_MULTIPROCESSING,
[dnl
AC_REQUIRE([RTEMS_TOP])dnl
AC_REQUIRE([RTEMS_CHECK_CPU])dnl
+AC_REQUIRE([RTEMS_ENABLE_MULTIPROCESSING])dnl
+
AC_CACHE_CHECK([whether BSP supports multiprocessing],
rtems_cv_HAS_MP,
[dnl
diff --git a/aclocal/check-networking.m4 b/aclocal/check-networking.m4
index 487b543373..cff88766d1 100644
--- a/aclocal/check-networking.m4
+++ b/aclocal/check-networking.m4
@@ -3,6 +3,9 @@ dnl
AC_DEFUN(RTEMS_CHECK_NETWORKING,
[dnl
AC_REQUIRE([RTEMS_CHECK_CPU])dnl
+AC_REQUIRE([RTEMS_ENABLE_NETWORKING])dnl
+AC_BEFORE([$0], [RTEMS_CHECK_RDBG])dnl
+
AC_CACHE_CHECK([whether BSP supports networking],
rtems_cv_HAS_NETWORKING,
[dnl
diff --git a/aclocal/check-posix.m4 b/aclocal/check-posix.m4
index 43d175deac..a49fd008d7 100644
--- a/aclocal/check-posix.m4
+++ b/aclocal/check-posix.m4
@@ -3,6 +3,8 @@ dnl
AC_DEFUN(RTEMS_CHECK_POSIX_API,
[dnl
AC_REQUIRE([RTEMS_CHECK_CPU])dnl
+AC_REQUIRE([RTEMS_ENABLE_POSIX])dnl
+
AC_CACHE_CHECK([whether BSP supports libposix],
rtems_cv_HAS_POSIX_API,
[dnl
diff --git a/aclocal/check-rdbg.m4 b/aclocal/check-rdbg.m4
index a096938308..a386d90469 100644
--- a/aclocal/check-rdbg.m4
+++ b/aclocal/check-rdbg.m4
@@ -4,6 +4,8 @@ AC_DEFUN(RTEMS_CHECK_RDBG,
[dnl
AC_REQUIRE([RTEMS_TOP])dnl
AC_REQUIRE([RTEMS_CHECK_CPU])dnl
+AC_REQUIRE([RTEMS_CHECK_NETWORKING])dnl
+AC_REQUIRE([RTEMS_ENABLE_RDBG])dnl
AC_CACHE_CHECK([whether BSP supports librdbg],
rtems_cv_HAS_RDBG,
[
diff --git a/aclocal/enable-networking.m4 b/aclocal/enable-networking.m4
index 5bc5b55498..995e3da9f9 100644
--- a/aclocal/enable-networking.m4
+++ b/aclocal/enable-networking.m4
@@ -2,6 +2,8 @@ dnl $Id$
AC_DEFUN(RTEMS_ENABLE_NETWORKING,
[
+AC_BEFORE([$0], [RTEMS_CHECK_NETWORKING])dnl
+
AC_ARG_ENABLE(networking,
[ --enable-networking enable TCP/IP stack],
[case "${enableval}" in
diff --git a/aclocal/enable-posix.m4 b/aclocal/enable-posix.m4
index 9384ea3a7d..d19c9b41a6 100644
--- a/aclocal/enable-posix.m4
+++ b/aclocal/enable-posix.m4
@@ -2,6 +2,8 @@ dnl $Id$
AC_DEFUN(RTEMS_ENABLE_POSIX,
[
+AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
+
AC_ARG_ENABLE(posix,
[ --enable-posix enable posix interface],
[case "${enableval}" in
diff --git a/aclocal/enable-rdbg.m4 b/aclocal/enable-rdbg.m4
index 927a3428bf..a10294a06c 100644
--- a/aclocal/enable-rdbg.m4
+++ b/aclocal/enable-rdbg.m4
@@ -2,6 +2,8 @@ dnl $Id$
AC_DEFUN(RTEMS_ENABLE_RDBG,
[
+AC_BEFORE([$0], [RTEMS_CHECK_RDBG])dnl
+
AC_ARG_ENABLE(rdbg,
[ --enable-rdbg enable remote debugger],
[case "${enableval}" in
diff --git a/aclocal/enable-rtemsbsp.m4 b/aclocal/enable-rtemsbsp.m4
index c1a952e505..21b5abfd74 100644
--- a/aclocal/enable-rtemsbsp.m4
+++ b/aclocal/enable-rtemsbsp.m4
@@ -5,6 +5,7 @@ dnl used by the toplevel configure script
dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list)
AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
[
+AC_BEFORE([$0], [RTEMS_ENV_RTEMSBSP])dnl
AC_ARG_ENABLE(rtemsbsp,
[ --enable-rtemsbsp=bsp1 bsp2 .. BSPs to include in build],
[case "${enableval}" in
@@ -17,6 +18,12 @@ dnl Pass a single BSP via an environment variable
dnl used by per BSP configure scripts
AC_DEFUN(RTEMS_ENV_RTEMSBSP,
[dnl
+AC_BEFORE([$0], [RTEMS_ENABLE_RTEMSBSP])dnl
+AC_BEFORE([$0], [RTEMS_PROJECT_ROOT])dnl
+AC_BEFORE([$0], [RTEMS_CHECK_CUSTOM_BSP])dnl
+AC_BEFORE([$0], [RTEMS_CHECK_MULTIPROCESSING])dnl
+AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
+
AC_MSG_CHECKING([for RTEMS_BSP])
AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
[dnl
diff --git a/aclocal/gcc-specs.m4 b/aclocal/gcc-specs.m4
index a422717d8a..1c77eb634a 100644
--- a/aclocal/gcc-specs.m4
+++ b/aclocal/gcc-specs.m4
@@ -3,8 +3,6 @@ dnl $Id$
dnl
dnl Check whether the target compiler accepts -specs
dnl
-dnl 98/02/11 Ralf Corsepius corsepiu@faw.uni-ulm.de
-dnl
AC_DEFUN(RTEMS_GCC_SPECS,
[AC_REQUIRE([RTEMS_PROG_CC])
diff --git a/aclocal/prog-cc.m4 b/aclocal/prog-cc.m4
index b89161305b..af8c6122b4 100644
--- a/aclocal/prog-cc.m4
+++ b/aclocal/prog-cc.m4
@@ -10,6 +10,7 @@ AC_DEFUN(RTEMS_PROG_CC,
[
AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_BEFORE([$0], [AC_PROG_CC])dnl
+AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
dnl Only accept gcc and cc
diff --git a/aclocal/prog-cxx.m4 b/aclocal/prog-cxx.m4
index 426eb6dae0..e77a3d08b5 100644
--- a/aclocal/prog-cxx.m4
+++ b/aclocal/prog-cxx.m4
@@ -10,6 +10,7 @@ AC_DEFUN(RTEMS_PROG_CXX,
[
AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
AC_BEFORE([$0], [AC_PROG_CXX])dnl
+AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
dnl Only accept g++ and c++
diff --git a/aclocal/rtems-top.m4 b/aclocal/rtems-top.m4
index 76af32acd6..0bf57da6d7 100644
--- a/aclocal/rtems-top.m4
+++ b/aclocal/rtems-top.m4
@@ -7,6 +7,9 @@ dnl $1 .. relative path from this configure.in to the toplevel configure.in
dnl
AC_DEFUN(RTEMS_TOP,
[dnl
+AC_BEFORE([$0], [AC_CONFIG_AUX_DIR])dnl
+AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
+
AC_ARG_WITH(target-subdir,
[ --with-target-subdir=DIR],
TARGET_SUBDIR="$withval",