mirror of
https://github.com/t-crest/rtems.git
synced 2025-11-16 12:34:47 +00:00
2003-06-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.ac: Remove "BLEEDING EDGE" warning. Put docs into RTEMS_BUILD_CONFIG_SUBDIRS. * acinclude.m4: Add AC_PREREQ(2.57). Major overhaul (PR 412). * aclocal/prog-cc.m4: Add RTEMS_GCC_ISYSTEM. * aclocal/gcc-isystem.m4: New. * Makefile.am: Add aclocal/gcc-isystem.m4.
This commit is contained in:
@@ -30,7 +30,7 @@ ACLOCAL_FILES = aclocal/bsp-alias.m4 aclocal/canonical-host.m4 \
|
||||
aclocal/project-root.m4 aclocal/rtems-debug.m4 \
|
||||
aclocal/rtems-test-no-pause.m4 aclocal/rtems-top.m4 \
|
||||
aclocal/target.m4 aclocal/tool-paths.m4 aclocal/bspopts.m4 \
|
||||
aclocal/ppc.m4 aclocal/bsp-configure.m4
|
||||
aclocal/ppc.m4 aclocal/bsp-configure.m4 aclocal/gcc-isystem.m4
|
||||
|
||||
noinst_SCRIPTS = bootstrap
|
||||
|
||||
|
||||
123
acinclude.m4
123
acinclude.m4
@@ -3,6 +3,7 @@
|
||||
## ${TARGET_CONFIGDIRS_LIST} is directories we build using the target tools.
|
||||
## ${BUILD_CONFIGDIRS_LIST} is directories we build using the build tools
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
|
||||
dnl RTEMS_ARG_VAR(VAR,HELP-STRING)
|
||||
dnl An internal macros to have help strings pretty
|
||||
@@ -42,64 +43,72 @@ AC_DEFUN([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS],
|
||||
[
|
||||
AC_CONFIG_COMMANDS_PRE([
|
||||
|
||||
test -z "$host_alias" && host_alias="$host"
|
||||
test -z "$build_alias" && build_alias="$build"
|
||||
test -z "$target_alias" && target_alias="$target"
|
||||
if test -z "${build_alias}"; then
|
||||
# build_alias is empty
|
||||
if test -z "${host_alias}"; then
|
||||
# host_alias is empty
|
||||
if test -z "${target_alias}"; then
|
||||
: target_alias is empty
|
||||
else
|
||||
: target_alias is not empty
|
||||
fi
|
||||
else
|
||||
# host_alias is not empty
|
||||
if test -z "${target_alias}"; then
|
||||
: target_alias is empty
|
||||
target_alias="${host_alias}"
|
||||
else
|
||||
: target_alias is not empty
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# build_alias is not empty
|
||||
if test -z "${host_alias}"; then
|
||||
# host_alias is empty
|
||||
if test -z "${target_alias}"; then
|
||||
: target_alias is empty
|
||||
else
|
||||
: target_alias is not empty
|
||||
fi
|
||||
else
|
||||
# host_alias is not empty
|
||||
if test -z "${target_alias}"; then
|
||||
: target_alias is empty
|
||||
target_alias="${host_alias}"
|
||||
else
|
||||
: target_alias is not empty
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
_RTEMS_BUILD_CONFIG_PREPARE
|
||||
_RTEMS_HOST_CONFIG_PREPARE
|
||||
_RTEMS_TARGET_CONFIG_PREPARE
|
||||
|
||||
build_subdir="."
|
||||
build_SUBDIRS="${build_configdirs}"
|
||||
build_configdirs="${build_configdirs}"
|
||||
|
||||
AS_IF([test $build = $host],
|
||||
AS_IF([test $build != $host],
|
||||
[dnl
|
||||
AS_IF([test $host = $target],
|
||||
[dnl b=h, h=t, t=b
|
||||
host_SUBDIRS="${host_configdirs}"
|
||||
host_configdirs="${host_configdirs}"
|
||||
target_SUBDIRS="${target_configdirs}"
|
||||
target_configdirs="${target_configdirs}"],
|
||||
[dnl b=h, h!=t, t!=b
|
||||
host_SUBDIRS="${host_configdirs}"
|
||||
host_configdirs="${host_configdirs}"
|
||||
target_SUBDIRS=`echo "${target_configdirs}" | \
|
||||
sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"`
|
||||
target_configdirs="${target_configdirs}"
|
||||
])
|
||||
host_subdir="${host_alias-$host}"
|
||||
host_SUBDIRS=`echo "${host_configdirs}" | \
|
||||
sed -e "s%\([[^ ]][[^ ]]*\)%$host_subdir/\1%g"`
|
||||
host_configdirs="${host_configdirs}"
|
||||
],[dnl
|
||||
AS_IF([test $host = $target],
|
||||
[ dnl b!=h, h=t, b!=t
|
||||
host_SUBDIRS=`echo "${host_configdirs}" | \
|
||||
sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"`
|
||||
host_configdirs="${host_configdirs}"
|
||||
AS_IF([test x"$enable_experimental" = x"yes" ],[
|
||||
target_SUBDIRS=`echo "${target_configdirs}" | \
|
||||
sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"`
|
||||
target_configdirs="${target_configdirs}"
|
||||
])
|
||||
],[dnl
|
||||
AS_IF([test $build = $target],
|
||||
[dnl b!=h, h!=t, b=t
|
||||
host_SUBDIRS=`echo "${host_configdirs}" | \
|
||||
sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"`
|
||||
host_configdirs="${host_configdirs}"
|
||||
AS_IF([test x"$enable_experimental" = x"yes" ],[
|
||||
target_SUBDIRS="${target_configdirs}"
|
||||
target_configdirs="${target_configdirs}"
|
||||
])
|
||||
],[dnl b!=h, h!=t, b!=t
|
||||
host_SUBDIRS=`echo "${host_configdirs}" | \
|
||||
sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"`
|
||||
host_configdirs="${host_configdirs}"
|
||||
AS_IF([test x"$enable_experimental" = x"yes" ],[
|
||||
target_SUBDIRS=`echo "${target_configdirs}" | \
|
||||
sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"`
|
||||
target_configdirs="${target_configdirs}"
|
||||
])
|
||||
])
|
||||
])
|
||||
host_SUBDIRS="${host_configdirs}"
|
||||
host_configdirs="${host_configdirs}"
|
||||
])
|
||||
|
||||
AS_IF([test $build != $target],
|
||||
[dnl
|
||||
target_subdir="${target_alias-$target}"
|
||||
target_SUBDIRS=`echo "${target_configdirs}" | \
|
||||
sed -e "s%\([[^ ]][[^ ]]*\)%$target_subdir/\1%g"`
|
||||
target_configdirs="${target_configdirs}"
|
||||
],[dnl
|
||||
target_SUBDIRS="${target_configdirs}"
|
||||
target_configdirs="${target_configdirs}"
|
||||
])
|
||||
|
||||
AC_SUBST(host_SUBDIRS)
|
||||
@@ -330,11 +339,11 @@ m4_ifdef([_RTEMS_BUILD_CONFIGDIRS_LIST],
|
||||
m4_expand_once([_RTEMS_TOOLS([build],[BUILD])])
|
||||
m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([buildargs])])
|
||||
eval buildargs_prune $ac_configure_args
|
||||
buildargs="'--host=${build}' '--build=${build}' ${buildargs}"
|
||||
test -n "${target_alias}" && \
|
||||
buildargs="${buildargs} --target='${target_alias}'"
|
||||
build_subdir="."
|
||||
buildargs="'--host=${build_alias-$build}' '--build=${build_alias-$build}' ${buildargs}"
|
||||
buildargs="${buildargs} '--target=${target_alias-$target}'"
|
||||
],[])
|
||||
AC_SUBST(buildargs)
|
||||
AC_SUBST(build_subdir)
|
||||
])
|
||||
|
||||
## PUBLIC: RTEMS_HOST_CONFIG_SUBDIRS(host_subdir)
|
||||
@@ -355,9 +364,10 @@ m4_ifdef([_RTEMS_HOST_CONFIGDIRS_LIST],
|
||||
m4_expand_once([_RTEMS_TOOLS([host],[HOST])])
|
||||
m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([hostargs])])
|
||||
eval hostargs_prune $ac_configure_args
|
||||
hostargs="'--host=${host_alias}' '--build=${build}' '--target=${target_alias}' ${hostargs}"
|
||||
host_subdir="${host_alias}"
|
||||
hostargs="'--host=${host_alias-$host}' '--build=${build_alias-$build}' '--target=${target_alias-$target}' ${hostargs}"
|
||||
],[])
|
||||
AC_SUBST(hostargs)
|
||||
AC_SUBST(host_subdir)
|
||||
])
|
||||
|
||||
## PUBLIC: RTEMS_TARGET_CONFIG_SUBDIRS(target_subdir)
|
||||
@@ -378,7 +388,8 @@ m4_ifdef([_RTEMS_TARGET_CONFIGDIRS_LIST],
|
||||
m4_expand_once([_RTEMS_TOOLS([target],[TARGET])])
|
||||
m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([targetargs])])
|
||||
eval targetargs_prune $ac_configure_args
|
||||
targetargs="'--host=${target_alias}' '--build=${build}' '--target=${target_alias}' ${targetargs}"
|
||||
target_subdir="${target_alias}"
|
||||
targetargs="'--host=${target_alias-$target}' '--build=${build_alias-$build}' '--target=${target_alias-$target}' ${targetargs}"
|
||||
],[])
|
||||
AC_SUBST(targetargs)
|
||||
AC_SUBST(target_subdir)
|
||||
])
|
||||
|
||||
@@ -26,14 +26,23 @@ AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET,
|
||||
[
|
||||
dnl check target cc
|
||||
RTEMS_PROG_CC
|
||||
dnl check if the compiler supports --specs
|
||||
RTEMS_GCC_SPECS
|
||||
dnl check if the compiler supports -isystem
|
||||
RTEMS_GCC_ISYSTEM
|
||||
dnl check if the target compiler may use --pipe
|
||||
RTEMS_GCC_PIPE
|
||||
test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe"
|
||||
|
||||
dnl check if the compiler supports --specs
|
||||
RTEMS_GCC_SPECS
|
||||
|
||||
if test "$GCC" = yes; then
|
||||
RTEMS_CFLAGS="$RTEMS_CFLAGS -Wall"
|
||||
m4_if([$1],,[],[RTEMS_CFLAGS="$RTEMS_CFLAGS $1"])
|
||||
fi
|
||||
|
||||
AS_IF([test x"$rtems_cv_gcc_isystem" = x"yes"],[
|
||||
RTEMS_CPPFLAGS="-isystem \$(PROJECT_INCLUDE)"],[
|
||||
RTEMS_CPPFLAGS="-I\$(PROJECT_INCLUDE)"
|
||||
])
|
||||
AC_SUBST(RTEMS_CPPFLAGS)
|
||||
])
|
||||
|
||||
13
configure.ac
13
configure.ac
@@ -37,17 +37,6 @@ AC_ARG_ENABLE([docs],
|
||||
[AC_HELP_STRING([--enable-docs],[enable building documentation
|
||||
(default:disabled)])])
|
||||
|
||||
if test $host != $build; then
|
||||
AC_MSG_WARN([]
|
||||
[*** *** *** WARNING *** *** ***]
|
||||
[]
|
||||
[Entering BEYOND BLEEDING EDGE TERRITORY]
|
||||
[]
|
||||
[You are trying to build RTEMS Canadian cross]
|
||||
[If you really mean it, feel free to continue ...]
|
||||
[*** *** *** *** *** *** *** ***])
|
||||
fi
|
||||
|
||||
## NOTES:
|
||||
## * tools/build are host-native tools to be installed on the host.
|
||||
## * tools/cpu are host-native or host-cross-target-tools
|
||||
@@ -61,7 +50,7 @@ RTEMS_HOST_CONFIG_SUBDIRS([tools/build])
|
||||
])
|
||||
|
||||
AS_IF([test x"${enable_docs}" = x"yes"],
|
||||
[RTEMS_HOST_CONFIG_SUBDIRS([doc])])
|
||||
[RTEMS_BUILD_CONFIG_SUBDIRS([doc])])
|
||||
|
||||
AS_IF([test x"$enable_multilib" = x"yes"],[
|
||||
RTEMS_TARGET_CONFIG_SUBDIRS([cpukit])
|
||||
|
||||
Reference in New Issue
Block a user