mirror of
https://github.com/t-crest/rtems.git
synced 2025-12-05 15:15:48 +00:00
Added new autoconf test for i386 code16/code32 support. The guts of the
test were suggested by Ian Taylor <ian@airs.com> and Joel did the hard part of putting it in aclocal and editting all the offending Makefiles and source code which could use this feature.
This commit is contained in:
47
aclocal.m4
vendored
47
aclocal.m4
vendored
@@ -1,6 +1,8 @@
|
|||||||
dnl aclocal.m4 generated automatically by aclocal 1.2
|
dnl aclocal.m4 generated automatically by aclocal 1.2
|
||||||
|
|
||||||
|
dnl
|
||||||
dnl $Id$
|
dnl $Id$
|
||||||
|
dnl
|
||||||
|
|
||||||
dnl macro to detect mkdir
|
dnl macro to detect mkdir
|
||||||
AC_DEFUN(RTEMS_PATH_MKDIR,
|
AC_DEFUN(RTEMS_PATH_MKDIR,
|
||||||
@@ -40,7 +42,9 @@ AC_MSG_RESULT($rtems_cv_prog_MKDIR_M)
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl
|
||||||
dnl $Id$
|
dnl $Id$
|
||||||
|
dnl
|
||||||
|
|
||||||
dnl canonicalize target name
|
dnl canonicalize target name
|
||||||
dnl NOTE: Most rtems targets do not fullfil autoconf's
|
dnl NOTE: Most rtems targets do not fullfil autoconf's
|
||||||
@@ -56,6 +60,9 @@ changequote([, ])dnl
|
|||||||
AC_MSG_RESULT($target_cpu)
|
AC_MSG_RESULT($target_cpu)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl $Id$
|
||||||
|
dnl
|
||||||
dnl Set program_prefix
|
dnl Set program_prefix
|
||||||
dnl
|
dnl
|
||||||
dnl 98/05/20 Ralf Corsepius (corsepiu@faw.uni-ulm.de)
|
dnl 98/05/20 Ralf Corsepius (corsepiu@faw.uni-ulm.de)
|
||||||
@@ -259,6 +266,7 @@ unset ac_cv_prog_cxx_works
|
|||||||
unset ac_cv_prog_cxx_cross
|
unset ac_cv_prog_cxx_cross
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
dnl $Id$
|
dnl $Id$
|
||||||
dnl
|
dnl
|
||||||
dnl Set target tools
|
dnl Set target tools
|
||||||
@@ -355,6 +363,10 @@ dnl NOTE: These may not be available if not using gnutools
|
|||||||
RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
|
RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl $Id$
|
||||||
|
dnl
|
||||||
|
|
||||||
AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
|
AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
|
||||||
[
|
[
|
||||||
AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works,
|
AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works,
|
||||||
@@ -377,6 +389,33 @@ fi
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl $Id$
|
||||||
|
dnl
|
||||||
|
|
||||||
|
dnl check for i386 gas supporting 16 bit mode
|
||||||
|
|
||||||
|
AC_DEFUN(RTEMS_I386_GAS_CODE16,
|
||||||
|
if test "${target_cpu}" = "i386"; then
|
||||||
|
AC_CACHE_CHECK([for 16 bit mode assembler support],
|
||||||
|
rtems_cv_prog_gas_code16,
|
||||||
|
[cat > conftest.s << EOF
|
||||||
|
.code16
|
||||||
|
data32 addr32 lgdt 0
|
||||||
|
EOF
|
||||||
|
if AC_TRY_COMMAND($AS_FOR_TARGET -o conftest.o conftest.s); then
|
||||||
|
rtems_cv_prog_gas_code16=yes
|
||||||
|
else
|
||||||
|
rtems_cv_prog_gas_code16=no
|
||||||
|
fi])
|
||||||
|
RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16"
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl $Id$
|
||||||
|
dnl
|
||||||
dnl Detect the Cygwin32 environment (unix under Win32)
|
dnl Detect the Cygwin32 environment (unix under Win32)
|
||||||
dnl
|
dnl
|
||||||
dnl 98/06/16 David Fiddes (D.J.Fiddes@hw.ac.uk)
|
dnl 98/06/16 David Fiddes (D.J.Fiddes@hw.ac.uk)
|
||||||
@@ -396,6 +435,9 @@ CYGWIN32=
|
|||||||
test "$rtems_cv_cygwin32" = yes && CYGWIN32=yes])
|
test "$rtems_cv_cygwin32" = yes && CYGWIN32=yes])
|
||||||
|
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl $Id$
|
||||||
|
dnl
|
||||||
dnl Set the EXE extension
|
dnl Set the EXE extension
|
||||||
dnl
|
dnl
|
||||||
dnl 98/06/16 David Fiddes (D.J.Fiddes@hw.ac.uk)
|
dnl 98/06/16 David Fiddes (D.J.Fiddes@hw.ac.uk)
|
||||||
@@ -529,7 +571,9 @@ rtems_cv_sysv_msg="yes", rtems_cv_sysv_msg="no", :)
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
dnl $Id$
|
dnl $Id$
|
||||||
|
dnl
|
||||||
|
|
||||||
dnl RTEMS_CHECK_MAKEFILE(path)
|
dnl RTEMS_CHECK_MAKEFILE(path)
|
||||||
dnl Search for Makefile.in's within the directory starting
|
dnl Search for Makefile.in's within the directory starting
|
||||||
@@ -540,12 +584,15 @@ AC_DEFUN(RTEMS_CHECK_MAKEFILE,
|
|||||||
[RTEMS_CHECK_FILES_IN($1,Makefile,makefiles)
|
[RTEMS_CHECK_FILES_IN($1,Makefile,makefiles)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
dnl $Id$
|
dnl $Id$
|
||||||
|
dnl
|
||||||
|
|
||||||
dnl RTEMS_CHECK_FILES_IN(path,file,var)
|
dnl RTEMS_CHECK_FILES_IN(path,file,var)
|
||||||
dnl path .. path relative to srcdir, where to start searching for files
|
dnl path .. path relative to srcdir, where to start searching for files
|
||||||
dnl file .. name of the files to search for
|
dnl file .. name of the files to search for
|
||||||
dnl var .. shell variable to append files found
|
dnl var .. shell variable to append files found
|
||||||
|
|
||||||
AC_DEFUN(RTEMS_CHECK_FILES_IN,
|
AC_DEFUN(RTEMS_CHECK_FILES_IN,
|
||||||
[
|
[
|
||||||
AC_MSG_CHECKING(for $2.in in $1)
|
AC_MSG_CHECKING(for $2.in in $1)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ dnl $Id$
|
|||||||
dnl
|
dnl
|
||||||
|
|
||||||
dnl check for i386 gas supporting 16 bit mode
|
dnl check for i386 gas supporting 16 bit mode
|
||||||
|
dnl - binutils 2.9.1.0.7 and higher
|
||||||
|
|
||||||
AC_DEFUN(RTEMS_I386_GAS_CODE16,
|
AC_DEFUN(RTEMS_I386_GAS_CODE16,
|
||||||
if test "${target_cpu}" = "i386"; then
|
if test "${target_cpu}" = "i386"; then
|
||||||
@@ -17,9 +18,7 @@ EOF
|
|||||||
else
|
else
|
||||||
rtems_cv_prog_gas_code16=no
|
rtems_cv_prog_gas_code16=no
|
||||||
fi])
|
fi])
|
||||||
if test "$rtems_cv_prog_gas_code16" = "yes"; then
|
RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16"
|
||||||
AC_DEFINE(RTEMS_PROG_GAS_CODE16)
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ srcdir = @srcdir@
|
|||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
RTEMS_GAS_CODE16 = @RTEMS_GAS_CODE16@
|
||||||
|
|
||||||
PGMS=${ARCH}/start.o
|
PGMS=${ARCH}/start.o
|
||||||
|
|
||||||
@@ -32,7 +33,9 @@ include $(RTEMS_ROOT)/make/leaf.cfg
|
|||||||
# (OPTIONAL) Add local stuff here using +=
|
# (OPTIONAL) Add local stuff here using +=
|
||||||
#
|
#
|
||||||
|
|
||||||
DEFINES +=
|
ifeq ($(RTEMS_GAS_CODE16),yes)
|
||||||
|
DEFINES += -DNEXT_GAS
|
||||||
|
endif
|
||||||
CPPFLAGS +=
|
CPPFLAGS +=
|
||||||
CFLAGS +=
|
CFLAGS +=
|
||||||
|
|
||||||
|
|||||||
@@ -40,12 +40,9 @@ changes:
|
|||||||
#include "80386ex.inc"
|
#include "80386ex.inc"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Needed for binutils 2.9.1.0.7 and higher
|
* NEXT_GAS Needed for binutils 2.9.1.0.7 and higher
|
||||||
* #define NEXT_GAS
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define NEXT_GAS
|
|
||||||
|
|
||||||
EXTERN (boot_card) /* exits to bspstart */
|
EXTERN (boot_card) /* exits to bspstart */
|
||||||
EXTERN (stack_start) /* defined in startup/linkcmds */
|
EXTERN (stack_start) /* defined in startup/linkcmds */
|
||||||
EXTERN (Clock_exit)
|
EXTERN (Clock_exit)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ include $(RTEMS_ROOT)/make/leaf.cfg
|
|||||||
#
|
#
|
||||||
|
|
||||||
#DEFINES += -DPRINTON
|
#DEFINES += -DPRINTON
|
||||||
DEFINES += -I$(srcdir)
|
DEFINES += -I$(srcdir)
|
||||||
CPPFLAGS +=
|
CPPFLAGS +=
|
||||||
CFLAGS += -g
|
CFLAGS += -g
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ srcdir = @srcdir@
|
|||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
RTEMS_GAS_CODE16 = @RTEMS_GAS_CODE16@
|
||||||
|
|
||||||
PGMS=${ARCH}/start.o ${ARCH}/start16.bin
|
PGMS=${ARCH}/start.o ${ARCH}/start16.bin
|
||||||
|
|
||||||
@@ -32,7 +33,9 @@ include $(RTEMS_ROOT)/make/leaf.cfg
|
|||||||
# (OPTIONAL) Add local stuff here using +=
|
# (OPTIONAL) Add local stuff here using +=
|
||||||
#
|
#
|
||||||
|
|
||||||
DEFINES +=
|
ifeq ($(RTEMS_GAS_CODE16),yes)
|
||||||
|
DEFINES += -DNEXT_GAS
|
||||||
|
endif
|
||||||
CPPFLAGS +=
|
CPPFLAGS +=
|
||||||
CFLAGS +=
|
CFLAGS +=
|
||||||
|
|
||||||
|
|||||||
@@ -227,6 +227,9 @@ fi
|
|||||||
|
|
||||||
RTEMS_CANONICALIZE_TOOLS
|
RTEMS_CANONICALIZE_TOOLS
|
||||||
|
|
||||||
|
dnl if this is an i386, does gas have good code16 support?
|
||||||
|
RTEMS_I386_GAS_CODE16
|
||||||
|
|
||||||
dnl check host cc
|
dnl check host cc
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
|
||||||
@@ -439,6 +442,7 @@ AC_ARG_ENABLE(hwapi, \
|
|||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AC_SUBST(RTEMS_GAS_CODE16)
|
||||||
AC_SUBST(rtems_cv_prog_cc_cross)
|
AC_SUBST(rtems_cv_prog_cc_cross)
|
||||||
AC_SUBST(RTEMS_BSP_LIST)
|
AC_SUBST(RTEMS_BSP_LIST)
|
||||||
AC_SUBST(RTEMS_HOST)
|
AC_SUBST(RTEMS_HOST)
|
||||||
|
|||||||
Reference in New Issue
Block a user