Files
rtems/cpukit/aclocal/gcc-weak.m4
Ralf Corsepius d71ab7fdf8 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.
2004-09-21 14:30:53 +00:00

20 lines
485 B
Plaintext

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])
])
])