summaryrefslogtreecommitdiffstats
path: root/aclocal.m4
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-03-21 15:27:00 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-03-21 15:27:00 +0000
commit04c99873c91d65915c392c21c212519ca8eabe90 (patch)
treec93d80add4c7d39a60981c66d12067ba46315eb5 /aclocal.m4
parentAdded enough symbols to the conftest.c program to make sure it would (diff)
downloadrtems-04c99873c91d65915c392c21c212519ca8eabe90.tar.bz2
Fixed RTEMS_PROG_CC_WORKS and RTEMS_PROG_CXX_WORKS so they could
successfully work on powerpc-rtems and hppa1.1-rtems.
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m437
1 files changed, 34 insertions, 3 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index db24cf8444..681ec21d3e 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -121,7 +121,23 @@ AC_DEFUN(RTEMS_PROG_CC_WORKS,
AC_LANG_SAVE
AC_LANG_C
AC_TRY_COMPILER(
-[void *malloc() { return 0; }
+[
+#if defined(__PPC__)
+ int __SDATA_START__; int __SDATA2_START__;
+ int __GOT_START__; int __GOT_END__;
+ int __GOT2_START__; int __GOT2_END__;
+ int __SBSS_END__; int __SBSS2_END__;
+ int __FIXUP_START__; int __FIXUP_END__;
+ int __EXCEPT_START__; int __EXCEPT_END__;
+ int __init; int __fini;
+#endif
+#if defined(__hppa__)
+ asm ( ".subspa \$GLOBAL\$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=40");
+ asm ( ".export \$global\$" );
+ asm ( "\$global\$:");
+#endif
+ int atexit() { return 0; }
+ void *malloc() { return 0; }
main(){return(0);}],
rtems_cv_prog_cc_works, rtems_cv_prog_cc_cross)
AC_LANG_RESTORE
@@ -247,8 +263,23 @@ AC_TRY_COMPILER(
if test "$rtems_cv_prog_cxx_works" = "no"; then
dnl now retry with our own version of malloc
AC_TRY_COMPILER(
- [extern "C" void *malloc();
- void *malloc() { return (0); }
+ [extern "C" void *malloc(); void *malloc() { return (0); }
+ extern "C" int atexit(); int atexit() { return 0; }
+#if defined(__PPC__)
+ int __SDATA_START__; int __SDATA2_START__;
+ int __GOT_START__; int __GOT_END__;
+ int __GOT2_START__; int __GOT2_END__;
+ int __SBSS_END__; int __SBSS2_END__;
+ int __FIXUP_START__; int __FIXUP_END__;
+ int __EXCEPT_START__; int __EXCEPT_END__;
+ int __init; int __fini;
+#endif
+#if defined(__hppa__)
+ asm ( ".subspa \$GLOBAL\$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=40");
+ asm ( ".export \$global\$" );
+ asm ( "\$global\$:");
+#endif
+
main(){return(0);}],
rtems_cv_prog_cxx_works, rtems_cv_prog_cxx_cross)
fi