mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-29 02:20:21 +08:00
67c600b995
Commit 754f8def0dfeeb43afa5a96ad1971fd0ef02c419 ("libgloss: merge stub arch configure scripts up a level") had an unintended side-effect: the MULTI* variables in the Makefiles no longer get rewritten at configure time in the subdirs. Only the top-level Makefile still is. This is because the configure integration of multilib (both the way libgloss did it manually and the way AM_ENABLE_MULTILIB does it) only rewrites "Makefile". We could try propagating the MULTI* variables from libgloss/Makefile down via FLAGS_TO_PASS, but this runs into a limitation: the multilib logic uses this variable to switch from libgloss/ to each multilib libgloss/, and libgloss uses this variable to enter subdirectories. The latter we want, but the former ends up overridding the Makefile environment. We could side-step that with some GNU Make directives, but it feels like we're getting a bit too deep down the rabbit hole. Instead, let's call config-ml.in ourselves for each subdir Makefile that the top-level configure generates. This restores the previous behavior and should be less risky in general. This logic should be unnecessary when/if we switch libgloss over to a non-recursive Automake build (since all build+install settings are in the single libgloss/Makefile), but it'll be a while before we can land that rework, so let's fix this up now.
75 lines
1.6 KiB
Plaintext
75 lines
1.6 KiB
Plaintext
dnl Process this file with autoconf to produce a configure script.
|
|
AC_INIT(redboot-crt0.S)
|
|
|
|
dnl Support --disable-newlib-supplied-syscalls
|
|
AC_ARG_ENABLE(newlib-supplied-syscalls,
|
|
[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
|
|
[case "${enableval}" in
|
|
yes) newlib_may_supply_syscalls=yes ;;
|
|
no) newlib_may_supply_syscalls=no ;;
|
|
*) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
|
|
esac], [newlib_may_supply_syscalls=yes])dnl
|
|
|
|
if test "x$newlib_may_supply_syscalls" = "xyes"; then
|
|
BUILD_CRT0_TRUE='#'
|
|
BUILD_CRT0_FALSE=
|
|
else
|
|
BUILD_CRT0_TRUE=
|
|
BUILD_CRT0_FALSE='#'
|
|
fi
|
|
|
|
AC_SUBST(BUILD_CRT0_TRUE)
|
|
AC_SUBST(BUILD_CRT0_FALSE)
|
|
|
|
AC_CONFIG_AUX_DIR(../..)
|
|
|
|
AC_CANONICAL_SYSTEM
|
|
AC_ARG_PROGRAM
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
LIB_AC_PROG_CC
|
|
AS=${AS-as}
|
|
AC_SUBST(AS)
|
|
AR=${AR-ar}
|
|
AC_SUBST(AR)
|
|
LD=${LD-ld}
|
|
AC_SUBST(LD)
|
|
AC_PROG_RANLIB
|
|
LIB_AM_PROG_AS
|
|
|
|
case "${target}" in
|
|
*-*-elf | *-*-eabi* | *-*-tirtos*)
|
|
objtype=elf-
|
|
;;
|
|
*-*-coff)
|
|
objtype=coff-
|
|
;;
|
|
esac
|
|
|
|
AC_SUBST(objtype)
|
|
|
|
host_makefile_frag=`cd $srcdir/../config;pwd`/default.mh
|
|
|
|
dnl We have to assign the same value to other variables because autoconf
|
|
dnl doesn't provide a mechanism to substitute a replacement keyword with
|
|
dnl arbitrary data or pathnames.
|
|
dnl
|
|
host_makefile_frag_path=$host_makefile_frag
|
|
AC_SUBST(host_makefile_frag_path)
|
|
AC_SUBST_FILE(host_makefile_frag)
|
|
|
|
# Configure cpu init plug-ins
|
|
if test -d "${srcdir}/cpu-init"; then
|
|
subdirs="${subdirs} cpu-init"
|
|
AC_CONFIG_FILES([cpu-init/Makefile], [dnl
|
|
ac_file=cpu-init/Makefile . ${srcdir}/../../config-ml.in
|
|
])
|
|
AC_SUBST(subdirs)
|
|
fi
|
|
|
|
AM_ENABLE_MULTILIB(, ../..)
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
AC_OUTPUT
|