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:
Joel Sherrill
1998-09-30 20:58:39 +00:00
parent 2405b76726
commit 2c3840b563
8 changed files with 241 additions and 130 deletions

47
aclocal.m4 vendored
View File

@@ -1,6 +1,8 @@
dnl aclocal.m4 generated automatically by aclocal 1.2
dnl
dnl $Id$
dnl
dnl macro to detect mkdir
AC_DEFUN(RTEMS_PATH_MKDIR,
@@ -40,7 +42,9 @@ AC_MSG_RESULT($rtems_cv_prog_MKDIR_M)
])
dnl
dnl $Id$
dnl
dnl canonicalize target name
dnl NOTE: Most rtems targets do not fullfil autoconf's
@@ -56,6 +60,9 @@ changequote([, ])dnl
AC_MSG_RESULT($target_cpu)
])
dnl
dnl $Id$
dnl
dnl Set program_prefix
dnl
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
])
dnl
dnl $Id$
dnl
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)
])
dnl
dnl $Id$
dnl
AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
[
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
dnl 98/06/16 David Fiddes (D.J.Fiddes@hw.ac.uk)
@@ -396,6 +435,9 @@ CYGWIN32=
test "$rtems_cv_cygwin32" = yes && CYGWIN32=yes])
dnl
dnl $Id$
dnl
dnl Set the EXE extension
dnl
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
dnl RTEMS_CHECK_MAKEFILE(path)
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)
])
dnl
dnl $Id$
dnl
dnl RTEMS_CHECK_FILES_IN(path,file,var)
dnl path .. path relative to srcdir, where to start searching for files
dnl file .. name of the files to search for
dnl var .. shell variable to append files found
AC_DEFUN(RTEMS_CHECK_FILES_IN,
[
AC_MSG_CHECKING(for $2.in in $1)

View File

@@ -3,6 +3,7 @@ dnl $Id$
dnl
dnl check for i386 gas supporting 16 bit mode
dnl - binutils 2.9.1.0.7 and higher
AC_DEFUN(RTEMS_I386_GAS_CODE16,
if test "${target_cpu}" = "i386"; then
@@ -17,9 +18,7 @@ EOF
else
rtems_cv_prog_gas_code16=no
fi])
if test "$rtems_cv_prog_gas_code16" = "yes"; then
AC_DEFINE(RTEMS_PROG_GAS_CODE16)
fi
RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16"
fi
)

View File

@@ -7,6 +7,7 @@ srcdir = @srcdir@
VPATH = @srcdir@
RTEMS_ROOT = @top_srcdir@
PROJECT_ROOT = @PROJECT_ROOT@
RTEMS_GAS_CODE16 = @RTEMS_GAS_CODE16@
PGMS=${ARCH}/start.o
@@ -32,7 +33,9 @@ include $(RTEMS_ROOT)/make/leaf.cfg
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
ifeq ($(RTEMS_GAS_CODE16),yes)
DEFINES += -DNEXT_GAS
endif
CPPFLAGS +=
CFLAGS +=

View File

@@ -40,12 +40,9 @@ changes:
#include "80386ex.inc"
/*
* Needed for binutils 2.9.1.0.7 and higher
* #define NEXT_GAS
* NEXT_GAS Needed for binutils 2.9.1.0.7 and higher
*/
#define NEXT_GAS
EXTERN (boot_card) /* exits to bspstart */
EXTERN (stack_start) /* defined in startup/linkcmds */
EXTERN (Clock_exit)

View File

@@ -7,6 +7,7 @@ srcdir = @srcdir@
VPATH = @srcdir@
RTEMS_ROOT = @top_srcdir@
PROJECT_ROOT = @PROJECT_ROOT@
RTEMS_GAS_CODE16 = @RTEMS_GAS_CODE16@
PGMS=${ARCH}/start.o ${ARCH}/start16.bin
@@ -32,7 +33,9 @@ include $(RTEMS_ROOT)/make/leaf.cfg
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
ifeq ($(RTEMS_GAS_CODE16),yes)
DEFINES += -DNEXT_GAS
endif
CPPFLAGS +=
CFLAGS +=

298
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -227,6 +227,9 @@ fi
RTEMS_CANONICALIZE_TOOLS
dnl if this is an i386, does gas have good code16 support?
RTEMS_I386_GAS_CODE16
dnl check host cc
AC_PROG_CC
@@ -439,6 +442,7 @@ AC_ARG_ENABLE(hwapi, \
AC_MSG_RESULT(no)
)
AC_SUBST(RTEMS_GAS_CODE16)
AC_SUBST(rtems_cv_prog_cc_cross)
AC_SUBST(RTEMS_BSP_LIST)
AC_SUBST(RTEMS_HOST)