From d71ab7fdf84c039744713da3fa4c5f8917e34f13 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 21 Sep 2004 14:30:53 +0000 Subject: 2004-09-21 Ralf Corsepius * aclocal/gcc-weak.m4: New (Extracted from cpukit/configure.ac). * configure.ac: Add RTEMS_CHECK_GCC_WEAK. --- cpukit/ChangeLog | 5 +++++ cpukit/aclocal/gcc-weak.m4 | 19 +++++++++++++++++++ cpukit/configure.ac | 18 +----------------- 3 files changed, 25 insertions(+), 17 deletions(-) create mode 100644 cpukit/aclocal/gcc-weak.m4 (limited to 'cpukit') diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index ee1b9ab363..62c8ea9040 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2004-09-21 Ralf Corsepius + + * aclocal/gcc-weak.m4: New (Extracted from cpukit/configure.ac). + * configure.ac: Add RTEMS_CHECK_GCC_WEAK. + 2004-09-17 Joel Sherrill PR 677/misc 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]) +]) +]) diff --git a/cpukit/configure.ac b/cpukit/configure.ac index 5611088853..9d72d96095 100644 --- a/cpukit/configure.ac +++ b/cpukit/configure.ac @@ -227,23 +227,7 @@ AC_COMPILE_IFELSE( AC_MSG_RESULT([$HAVE_ASSIGNABLE_STDIO]) # libmisc/serdbg exploits weak symbols -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]) -]) +RTEMS_CHECK_GCC_WEAK AC_CHECK_HEADERS([sys/cdefs.h],[NEED_SYS_CDEFS_H=no],[NEED_SYS_CDEFS_H=yes]) AC_CHECK_HEADERS([sys/queue.h],[NEED_SYS_QUEUE_H=no],[NEED_SYS_QUEUE_H=yes]) -- cgit v1.2.3