summaryrefslogtreecommitdiff
path: root/gcc/acinclude.m4
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-24 12:47:59 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-24 12:47:59 +0000
commit110557507c069b5d503b683d0ea74debd893e025 (patch)
treee31eba91035adf50eb6418316cd709bfd4b26ab3 /gcc/acinclude.m4
parent41206c9583f468718d640668438b42074c3c6be0 (diff)
downloadgcc-110557507c069b5d503b683d0ea74debd893e025.tar.gz
2009-12-24 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 155453 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@155456 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/acinclude.m4')
-rw-r--r--gcc/acinclude.m421
1 files changed, 19 insertions, 2 deletions
diff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4
index 2b553e27e69..6f0f979d78c 100644
--- a/gcc/acinclude.m4
+++ b/gcc/acinclude.m4
@@ -442,6 +442,22 @@ AC_DEFUN([gcc_GAS_VERSION_GTE_IFELSE],
ifelse([$1], elf, [_gcc_GAS_VERSION_GTE_IFELSE($@)],
[_gcc_GAS_VERSION_GTE_IFELSE(,$@)])])
+dnl # gcc_GAS_FLAGS
+dnl # Used by gcc_GAS_CHECK_FEATURE
+dnl #
+AC_DEFUN([gcc_GAS_FLAGS],
+[AC_CACHE_CHECK([assembler flags], gcc_cv_as_flags,
+[ case "$target" in
+ i[[34567]]86-*-linux*)
+ dnl Always pass --32 to ia32 Linux assembler.
+ gcc_cv_as_flags="--32"
+ ;;
+ *)
+ gcc_cv_as_flags=" "
+ ;;
+ esac])
+])
+
dnl gcc_GAS_CHECK_FEATURE(description, cv, [[elf,]major,minor,patchlevel],
dnl [extra switches to as], [assembler input],
dnl [extra testing logic], [command if feature available])
@@ -454,14 +470,15 @@ dnl if assembly succeeds. If EXTRA TESTING LOGIC is not the empty string,
dnl then it is run instead of simply setting CV to "yes" - it is responsible
dnl for doing so, if appropriate.
AC_DEFUN([gcc_GAS_CHECK_FEATURE],
-[AC_CACHE_CHECK([assembler for $1], [$2],
+[AC_REQUIRE([gcc_GAS_FLAGS])dnl
+AC_CACHE_CHECK([assembler for $1], [$2],
[[$2]=no
ifelse([$3],,,[dnl
if test $in_tree_gas = yes; then
gcc_GAS_VERSION_GTE_IFELSE($3, [[$2]=yes])
el])if test x$gcc_cv_as != x; then
echo ifelse(m4_substr([$5],0,1),[$], "[$5]", '[$5]') > conftest.s
- if AC_TRY_COMMAND([$gcc_cv_as $4 -o conftest.o conftest.s >&AS_MESSAGE_LOG_FD])
+ if AC_TRY_COMMAND([$gcc_cv_as $gcc_cv_as_flags $4 -o conftest.o conftest.s >&AS_MESSAGE_LOG_FD])
then
ifelse([$6],, [$2]=yes, [$6])
else