summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-07-14 08:43:24 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-07-14 09:18:16 -0700
commit49d00f48e8e3c1331d367785f19c69867a47b4cd (patch)
tree5d9edd2b228cf66d312491ea7bf535647a0bcd27 /config/bitfields.m4
parentFix build issue with nat/linux-namespaces.c. (diff)
downloadbinutils-gdb-49d00f48e8e3c1331d367785f19c69867a47b4cd.tar.gz
binutils-gdb-49d00f48e8e3c1331d367785f19c69867a47b4cd.tar.bz2
binutils-gdb-49d00f48e8e3c1331d367785f19c69867a47b4cd.zip
Sync config files with GCC
Sync with GCC 2015-05-13 Eric Botcazou <ebotcazou@adacore.com> * sjlj.m4: New file. 2015-05-04 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bitfields.m4: Change int to long long, and use bitfields of width 1 instead of 0. 2015-05-01 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bitfields.m4: New file. 2015-04-14 H.J. Lu <hongjiu.lu@intel.com> * bootstrap-mpx.mk: New file. 2015-03-25 Uros Bizjak <ubizjak@gmail.com> PR bootstrap/65537 * bootstrap-lto-noplugin.mk: New build configuration. 2014-11-13 Kirill Yukhin <kirill.yukhin@intel.com> * target-posix: New file. 2014-10-27 Tom Tromey <tromey@redhat.com> * gcc-plugin.m4: New file.
Diffstat (limited to 'config/bitfields.m4')
-rw-r--r--config/bitfields.m425
1 files changed, 25 insertions, 0 deletions
diff --git a/config/bitfields.m4 b/config/bitfields.m4
new file mode 100644
index 00000000000..8185cd302a9
--- /dev/null
+++ b/config/bitfields.m4
@@ -0,0 +1,25 @@
+dnl Copyright (C) 2015 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Define HAVE_BITFIELD_TYPE_MATTERS if the type of bitfields effects their
+# alignment.
+
+AC_DEFUN([gt_BITFIELD_TYPE_MATTERS],
+[
+ AC_CACHE_CHECK([if the type of bitfields matters], gt_cv_bitfield_type_matters,
+ [
+ AC_TRY_COMPILE(
+ [struct foo1 { char x; char y:1; char z; };
+struct foo2 { char x; long long int y:1; char z; };
+int foo1test[ sizeof (struct foo1) < sizeof (struct foo2) ? 1 : -1 ]; ],
+ [], gt_cv_bitfield_type_matters=yes, gt_cv_bitfield_type_matters=no)
+ ])
+ if test $gt_cv_bitfield_type_matters = yes; then
+ AC_DEFINE(HAVE_BITFIELD_TYPE_MATTERS, 1,
+ [Define if the type of bitfields effects alignment.])
+ fi
+])