summaryrefslogtreecommitdiffstats
path: root/aclocal/i386-gas-code16.m4
blob: ec0314980e49765d68352867d4cd4bc715d20ee2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
dnl
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
    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
  AC_SUBST(RTEMS_GAS_CODE16)
])