From: Daniel Jacobowitz <drow@mvista.com>
To: gcc-patches@gcc.gnu.org
Cc: binutils@sources.redhat.com, gdb-patches@sources.redhat.com
Subject: [toplevel] GCC_NO_EXECUTABLES
Date: Wed, 27 Aug 2003 17:15:00 -0000 [thread overview]
Message-ID: <20030827171507.GA14215@nevyn.them.org> (raw)
I'll submit this piece separately from the users of it...
This is a modified version of AC_NO_EXECUTABLES. Yes, I'm aware that this
should be submitted to Autoconf eventually, probably to replace
AC_NO_EXECUTABLES; I would like it to stew in the GCC tree for a little
while first, however. It's closer to the internals of autoconf than I
really wanted it to be.
DJ, I know you asked for this to be added to acx.m4 instead. Unfortunately,
it uses constructs that autoconf 2.13 can't parse, thus breaking
regenerating the toplevel configure. So I put it in a separate file after
all.
Tested, along with the patches to follow momentarily, on an extensive
collection of targets (all --build=i686-linux). Is this OK?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2003-08-27 Daniel Jacobowitz <drow@mvista.com>
* config/no-executables.m4: New file.
# GCC_NO_EXECUTABLES
# -----------------
# FIXME: The GCC team has specific needs which the current Autoconf
# framework cannot solve elegantly. This macro implements a dirty
# hack until Autoconf is able to provide the services its users
# need.
#
# Several of the support libraries that are often built with GCC can't
# assume the tool-chain is already capable of linking a program: the
# compiler often expects to be able to link with some of such
# libraries.
#
# In several of these libraries, workarounds have been introduced to
# avoid the AC_PROG_CC_WORKS test, that would just abort their
# configuration. The introduction of AC_EXEEXT, enabled either by
# libtool or by CVS autoconf, have just made matters worse.
#
# Unlike the previous AC_NO_EXECUTABLES, this test does not
# disable link tests at autoconf time, but at configure time.
# This allows AC_NO_EXECUTABLES to be invoked conditionally.
AC_DEFUN_ONCE([GCC_NO_EXECUTABLES],
[m4_divert_push([KILL])
AC_BEFORE([$0], [_AC_COMPILER_EXEEXT])
AC_BEFORE([$0], [AC_LINK_IFELSE])
m4_define([_AC_COMPILER_EXEEXT],
AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
# FIXME: Cleanup?
AS_IF([AC_TRY_EVAL(ac_link)], [gcc_no_link=no], [gcc_no_link=yes])
if test x$gcc_no_link = xyes; then
# Setting cross_compile will disable run tests; it will
# also disable AC_CHECK_FILE but that's generally
# correct if we can't link.
cross_compiling=yes
EXEEXT=
else
m4_defn([_AC_COMPILER_EXEEXT])dnl
fi
)
m4_define([AC_LINK_IFELSE],
if test x$gcc_no_link = xyes; then
AC_MSG_ERROR([Link tests are not allowed after [[$0]].])
fi
m4_defn([AC_LINK_IFELSE]))
dnl This is a shame. We have to provide a default for some link tests,
dnl similar to the default for run tests.
m4_define([AC_FUNC_MMAP],
if test x$gcc_no_link = xyes; then
if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
ac_cv_func_mmap_fixed_mapped=no
fi
fi
if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
m4_defn([AC_FUNC_MMAP])
fi)
m4_divert_pop()dnl
])# GCC_NO_EXECUTABLES
next reply other threads:[~2003-08-27 17:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-27 17:15 Daniel Jacobowitz [this message]
2003-08-27 18:18 ` DJ Delorie
2003-08-27 19:14 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030827171507.GA14215@nevyn.them.org \
--to=drow@mvista.com \
--cc=binutils@sources.redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox