PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/aclocal/gcc-weak.m4

http://rtems-atapi.googlecode.com/
m4 | 19 lines | 17 code | 2 blank | 0 comment | 0 complexity | 421e562ece8c307e01696a39a71833a5 MD5 | raw file
 1AC_DEFUN([RTEMS_CHECK_GCC_WEAK],[
 2AC_CACHE_CHECK([whether $CC supports function __attribute__((weak))],
 3[rtems_cv_cc_attribute_weak],[
 4  AS_IF([test x"$GCC" = xyes],[
 5    save_CFLAGS=$CFLAGS
 6    CFLAGS=-Werror])
 7
 8  AC_COMPILE_IFELSE([
 9    AC_LANG_PROGRAM(
10    [void myfunc(char c) __attribute__ ((weak));
11     void myfunc(char c) {}],
12    [])],
13    [rtems_cv_cc_attribute_weak=yes],
14    [rtems_cv_cc_attribute_weak=no])
15
16  AS_IF([test x"$GCC" = xyes],[
17    CFLAGS=$save_CFLAGS])
18])
19])