summaryrefslogtreecommitdiffstats
path: root/cpukit/aclocal
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-09-21 14:30:53 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-09-21 14:30:53 +0000
commitd71ab7fdf84c039744713da3fa4c5f8917e34f13 (patch)
treedca18ee61d20bca52b6a5fa6b0ad6f62f3b89813 /cpukit/aclocal
parent2004-09-17 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-d71ab7fdf84c039744713da3fa4c5f8917e34f13.tar.bz2
2004-09-21 Ralf Corsepius <ralf_corsepius@rtems.org>
* aclocal/gcc-weak.m4: New (Extracted from cpukit/configure.ac). * configure.ac: Add RTEMS_CHECK_GCC_WEAK.
Diffstat (limited to 'cpukit/aclocal')
-rw-r--r--cpukit/aclocal/gcc-weak.m419
1 files changed, 19 insertions, 0 deletions
diff --git a/cpukit/aclocal/gcc-weak.m4 b/cpukit/aclocal/gcc-weak.m4
new file mode 100644
index 0000000000..73cfb28e7e
--- /dev/null
+++ b/cpukit/aclocal/gcc-weak.m4
@@ -0,0 +1,19 @@
+AC_DEFUN([RTEMS_CHECK_GCC_WEAK],[
+AC_CACHE_CHECK([whether $CC supports function __attribute__((weak))],
+[rtems_cv_cc_attribute_weak],[
+ AS_IF([test x"$GCC" = xyes],[
+ save_CFLAGS=$CFLAGS
+ CFLAGS=-Werror])
+
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(
+ [void myfunc(char c) __attribute__ ((weak));
+ void myfunc(char c) {}],
+ [])],
+ [rtems_cv_cc_attribute_weak=yes],
+ [rtems_cv_cc_attribute_weak=no])
+
+ AS_IF([test x"$GCC" = xyes],[
+ CFLAGS=$save_CFLAGS])
+])
+])