📄 configure.in
字号:
# i386-pc-pe-coff != i386-pc-coff. i386-*-pe-coff) ;; # Uncommenting the next line will turn on support for i386 AOUT # for the default linux configuration # i386-*-linux*-elf) emulation="i386elf i386aout" ;; # i386-*-aout) emulation="i386aout" ;; i386-*-coff) emulation="i386coff" ;; i386-*-elf) emulation="i386elf" ;; # Always all formats. The first stated emulation becomes the default. cris-*-*aout*) emulation="crisaout criself" ;; cris-*-*) emulation="criself crisaout" ;; esac emulations="$emulations $emulation"done# Turn on all targets if possibleif test ${all_targets} = "yes"; then case ${target_cpu_type} in i386) case ${obj_format} in aout) emulations="$emulations i386coff i386elf" ;; coff) emulations="$emulations i386aout i386elf" ;; elf) emulations="$emulations i386aout i386coff" ;; esac ;; esacfi# Assign floating point type. Most processors with FP support# IEEE FP. On those that don't support FP at all, usually IEEE# is emulated.case ${target_cpu} in vax | tahoe ) atof=${target_cpu} ;; pdp11) atof=vax ;; *) atof=ieee ;;esaccase "${obj_format}" in "") AC_MSG_ERROR(GAS does not know what format to use for target ${target}) ;;esac# Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).cgen_cpu_prefix=""if test $using_cgen = yes ; then case ${target_cpu} in *) cgen_cpu_prefix=${target_cpu} ;; esac AC_SUBST(cgen_cpu_prefix) AC_DEFINE(USING_CGEN, 1, [Using cgen code?])fidnldnl Make sure the desired support files exist.dnlif test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then AC_MSG_ERROR(GAS does not support target CPU ${target_cpu_type})fiif test ! -r ${srcdir}/config/obj-${obj_format}.c; then AC_MSG_ERROR(GAS does not have support for object file format ${obj_format})ficase ${user_bfd_gas}-${primary_bfd_gas} in yes-yes | no-no) # We didn't override user's choice. ;; no-yes) AC_MSG_WARN(Use of BFD is required for ${target}; overriding config options.) ;; no-preferred) primary_bfd_gas=no ;; *-preferred) primary_bfd_gas=yes ;; yes-*) primary_bfd_gas=yes ;; -*) # User specified nothing. ;;esac# Some COFF configurations want these random other flags set.case ${obj_format} in coff) case ${target_cpu_type} in i386) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;; m68k) AC_DEFINE(M68KCOFF, 1, [Using m68k COFF?]) ;; m88k) AC_DEFINE(M88KCOFF, 1, [Using m88k COFF?]) ;; esac ;;esac# Getting this done right is going to be a bitch. Each configuration specified# with --enable-targets=... should be checked for environment, format, cpu, and# bfd_gas setting.## For each configuration, the necessary object file support code must be linked# in. This might be only one, it might be up to four. The necessary emulation# code needs to be provided, too.## And then there's "--enable-targets=all"....## For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.formats="${obj_format}"emfiles=""EMULATIONS=""GAS_UNIQ(emulations)for em in . $emulations ; do case $em in .) continue ;; mipsbelf | mipslelf | mipself) fmt=elf file=mipself ;; mipsbecoff | mipslecoff | mipsecoff) fmt=ecoff file=mipsecoff ;; *coff) fmt=coff file=$em ;; *aout) fmt=aout file=$em ;; *elf) fmt=elf file=$em ;; esac formats="$formats $fmt" emfiles="$emfiles e-$file.o" EMULATIONS="$EMULATIONS &$em,"doneGAS_UNIQ(formats)GAS_UNIQ(emfiles)if test `set . $formats ; shift ; echo $#` -gt 1 ; then for fmt in $formats ; do case $fmt in aout) AC_DEFINE(OBJ_MAYBE_AOUT, 1, [a.out support?]) ;; bout) AC_DEFINE(OBJ_MAYBE_BOUT, 1, [b.out support?]) ;; coff) AC_DEFINE(OBJ_MAYBE_COFF, 1, [COFF support?]) ;; ecoff) AC_DEFINE(OBJ_MAYBE_ECOFF, 1, [ECOFF support?]) ;; elf) AC_DEFINE(OBJ_MAYBE_ELF, 1, [ELF support?]) ;; generic) AC_DEFINE(OBJ_MAYBE_GENERIC, 1, [generic support?]) ;; hp300) AC_DEFINE(OBJ_MAYBE_HP300, 1, [HP300 support?]) ;; ieee) AC_DEFINE(OBJ_MAYBE_IEEE, 1, [IEEE support?]) ;; som) AC_DEFINE(OBJ_MAYBE_SOM, 1, [SOM support?]) ;; vms) AC_DEFINE(OBJ_MAYBE_VMS, 1, [VMS support?]) ;; esac extra_objects="$extra_objects obj-$fmt.o" done obj_format=multifiif test `set . $emfiles ; shift ; echo $#` -gt 0 ; then DEFAULT_EMULATION=`set . $emulations ; echo $2` # e-mips* has more than one emulation per file, e-i386* has just one at the # moment. If only one emulation is specified, then don't define # USE_EMULATIONS or include any of the e-files as they will only be bloat. case "${obj_format}${emfiles}" in multi* | *mips*) extra_objects="$extra_objects $emfiles" AC_DEFINE(USE_EMULATIONS, 1, [Use emulation support?]) ;; esacfiAC_SUBST(extra_objects)AC_DEFINE_UNQUOTED(EMULATIONS, $EMULATIONS, [Supported emulations.])AC_DEFINE_UNQUOTED(DEFAULT_EMULATION, "$DEFAULT_EMULATION", [Default emulation.])case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in yes-*-coff) need_bfd=yes ;; no-*-coff) need_bfd=yes AC_DEFINE(MANY_SEGMENTS, 1, [old COFF support?]) ;;esacreject_dev_configs=yescase ${reject_dev_configs}-${dev} in yes-yes) # Oops. AC_MSG_ERROR(GAS does not support the ${generic_target} configuration.) ;;esacAC_SUBST(target_cpu_type)AC_SUBST(obj_format)AC_SUBST(te_file)AC_SUBST(install_tooldir)AC_SUBST(atof)dnl AC_SUBST(emulation)case "${primary_bfd_gas}" in yes) AC_DEFINE(BFD_ASSEMBLER, 1, [Use BFD interface?]) need_bfd=yes ;;esac# do we need the opcodes library?case "${need_opcodes}" inyes) OPCODES_LIB=../opcodes/libopcodes.la ;;esaccase "${need_bfd}" inyes) BFDLIB=../bfd/libbfd.la ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h' ;;esacAC_SUBST(BFDLIB)AC_SUBST(OPCODES_LIB)AC_SUBST(ALL_OBJ_DEPS)AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${target_alias}", [Target alias.])AC_DEFINE_UNQUOTED(TARGET_CANONICAL, "${target}", [Canonical target.])AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}", [Target CPU.])AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", [Target vendor.])AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.])AC_PROG_CCAC_PROG_YACCAM_PROG_LEXALL_LINGUAS="fr tr es"CY_GNU_GETTEXTAM_MAINTAINER_MODEAC_EXEEXTAC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h)# Put this here so that autoconf's "cross-compiling" message doesn't confuse# people who are not cross-compiling but are compiling cross-assemblers.AC_MSG_CHECKING(whether compiling a cross-assembler)if test "${host}" = "${target}"; then cross_gas=noelse cross_gas=yes AC_DEFINE(CROSS_COMPILE, 1, [Compiling cross-assembler?])fiAC_MSG_RESULT($cross_gas)dnl ansidecl.h will deal with constdnl AC_CONSTAC_FUNC_ALLOCAAC_C_INLINE# VMS doesn't have unlink.AC_CHECK_FUNCS(unlink remove, break)# Some systems don't have sbrk().AC_CHECK_FUNCS(sbrk)# do we need the math library?case "${need_libm}" inyes) AC_CHECK_LIBM AC_SUBST(LIBM) ;;esac# Some non-ANSI preprocessors botch requoting inside strings. That's bad# enough, but on some of those systems, the assert macro relies on requoting# working properly!GAS_WORKING_ASSERT# On some systems, the system header files may not declare malloc, realloc,# and free. There are places where gas needs these functions to have been# declared -- such as when taking their addresses.gas_test_headers="#ifdef HAVE_MEMORY_H#include <memory.h>#endif#ifdef HAVE_STRING_H#include <string.h>#else#ifdef HAVE_STRINGS_H#include <strings.h>#endif#endif#ifdef HAVE_STDLIB_H#include <stdlib.h>#endif#ifdef HAVE_UNISTD_H#include <unistd.h>#endif"GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers)GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers)# Does errno.h declare errno, or do we have to add a separate declaration# for it?GAS_CHECK_DECL_NEEDED(errno, f, int f, [#ifdef HAVE_ERRNO_H#include <errno.h>#endif])dnl This must come last.dnl We used to make symlinks to files in the source directory, but nowdnl we just use the right name for .c files, and create .h files indnl the build directory which include the right .h file. Make surednl the old symlinks don't exist, so that a reconfigure in an existingdnl directory behaves reasonably.AC_OUTPUT(Makefile doc/Makefile ${GDBINIT}:gdbinit.in po/Makefile.in:po/Make-in,[rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h echo '#include "te-'"${te_file}"'.h"' > targ-env.h echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h if test "x$cgen_cpu_prefix" != x ; then echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h fi sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile],[target_cpu_type=${target_cpu_type} cgen_cpu_prefix=${cgen_cpu_prefix} obj_format=${obj_format} te_file=${te_file}])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -