commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r6718 - in gnuradio/branches/developers/eb/cross: . co


From: eb
Subject: [Commit-gnuradio] r6718 - in gnuradio/branches/developers/eb/cross: . config
Date: Sat, 27 Oct 2007 16:18:37 -0600 (MDT)

Author: eb
Date: 2007-10-27 16:18:36 -0600 (Sat, 27 Oct 2007)
New Revision: 6718

Added:
   gnuradio/branches/developers/eb/cross/configure-cell-cross
Modified:
   gnuradio/branches/developers/eb/cross/config/lf_cxx.m4
   gnuradio/branches/developers/eb/cross/configure.ac
Log:
work-in-progress on cell cross-compilation setup

Modified: gnuradio/branches/developers/eb/cross/config/lf_cxx.m4
===================================================================
--- gnuradio/branches/developers/eb/cross/config/lf_cxx.m4      2007-10-27 
22:15:24 UTC (rev 6717)
+++ gnuradio/branches/developers/eb/cross/config/lf_cxx.m4      2007-10-27 
22:18:36 UTC (rev 6718)
@@ -37,11 +37,6 @@
 
 # -----------------------------------------------------------------------
 # This macro tests the C++ compiler for various portability problem.
-# 1. Defines CXX_HAS_NO_BOOL if the compiler does not support the bool
-#    data type
-# 2. Defines CXX_HAS_BUGGY_FOR_LOOPS if the compiler has buggy
-#    scoping for the for-loop
-# 3. Defines USE_ASSERT if the user wants to use assertions
 # -----------------------------------------------------------------------
 
 
@@ -56,33 +51,7 @@
   AC_LANG_SAVE
   AC_LANG_CPLUSPLUS
 
-  dnl Check whether we have bool
-  AC_MSG_CHECKING(whether C++ has bool)
-  AC_TRY_RUN([main() { bool b1=true; bool b2=false; }],
-             [ AC_MSG_RESULT(yes) ],
-             [ AC_MSG_RESULT(no)
-               AC_DEFINE(CXX_HAS_NO_BOOL,[],[Define if C++ is missing bool 
type]) ],
-             [ AC_MSG_WARN(Don't cross-compile)]
-            )
 
-  dnl Test whether C++ has buggy for-loops
-  AC_MSG_CHECKING(whether C++ has buggy scoping in for-loops)
-  AC_TRY_COMPILE([#include <iostream.h>], [
-   for (int i=0;i<10;i++) { }
-   for (int i=0;i<10;i++) { }
-], [ AC_MSG_RESULT(no) ],
-   [ AC_MSG_RESULT(yes)
-     AC_DEFINE(CXX_HAS_BUGGY_FOR_LOOPS,[],[Define if for loop scoping is 
broken]) ])
-
-  dnl Test whether the user wants to enable assertions
-  AC_MSG_CHECKING(whether user wants assertions)
-  AC_ARG_ENABLE(assert,
-                [  --disable-assert        don't use cpp.h assert],
-                [ AC_DEFINE(NDEBUG,[],[Define to disable asserts (don't 
doit!)])
-                  AC_MSG_RESULT(no)  ],
-                [ AC_MSG_RESULT(yes) ],
-               )
-
   dnl Test whether C++ has std::isnan
   AC_MSG_CHECKING(whether C++ has std::isnan)
   AC_TRY_COMPILE([#include <cmath>], [
@@ -96,26 +65,3 @@
   AC_LANG_RESTORE
 ])
 
-AH_BOTTOM([// Workaround for compilers with buggy for-loop scoping
-// That's quite a few compilers actually including recent versions of
-// Dec Alpha cxx, HP-UX CC and SGI CC.
-// The trivial "if" statement provides the correct scoping to the 
-// for loop
-
-#ifdef CXX_HAS_BUGGY_FOR_LOOPS
-#undef for
-#define for if(1) for
-#endif
-])
-
-AH_BOTTOM([// If the C++ compiler we use doesn't have bool, then
-// the following is a near-perfect work-around. 
-// You must make sure your code does not depend on "int" and "bool"
-// being two different types, in overloading for instance.
-
-#ifdef CXX_HAS_NO_BOOL
-#define bool int
-#define true 1
-#define false 0
-#endif
-])

Added: gnuradio/branches/developers/eb/cross/configure-cell-cross
===================================================================
--- gnuradio/branches/developers/eb/cross/configure-cell-cross                  
        (rev 0)
+++ gnuradio/branches/developers/eb/cross/configure-cell-cross  2007-10-27 
22:18:36 UTC (rev 6718)
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+scriptdir=`dirname $0`
+
+arch=ppu
+#cell_root=/mnt/ps3
+cell_root=/opt/cell-root-snapshot
+
+export CC=${arch}32-gcc
+export CXX=${arch}32-g++
+export AR=${arch}-ar
+export NM=${arch}-nm
+export RANLIB=${arch}-ranlib
+export STRIP=${arch}-strip
+export F77=false
+
+export CPPFLAGS=-I${cell_root}/usr/include
+export LDFLAGS="-L${cell_root}/lib -L${cell_root}/usr/lib"
+
+export PKG_CONFIG_PATH=${cell_root}/usr/lib:${cell_root}/usr/local/lib
+
+export FFTW3F_CFLAGS=
+export FFTW3F_LIBS="-lfftw3f -lm"
+
+$scriptdir/configure                                   \
+    --prefix=/home/eb/cell-prefix                      \
+    --host=powerpc64-unknown-linux-gnu                 


Property changes on: gnuradio/branches/developers/eb/cross/configure-cell-cross
___________________________________________________________________
Name: svn:executable
   + *

Modified: gnuradio/branches/developers/eb/cross/configure.ac
===================================================================
--- gnuradio/branches/developers/eb/cross/configure.ac  2007-10-27 22:15:24 UTC 
(rev 6717)
+++ gnuradio/branches/developers/eb/cross/configure.ac  2007-10-27 22:18:36 UTC 
(rev 6718)
@@ -20,14 +20,24 @@
 AC_INIT
 AC_PREREQ(2.57)
 AM_CONFIG_HEADER(config.h)
+AC_CONFIG_SRCDIR([gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc])
+
+AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
-AC_CANONICAL_TARGET([])
+AC_CANONICAL_TARGET
+if test x$cross_compiling != xyes; then
+  AC_MSG_NOTICE([Configuring GNU Radio for cross compilation])
+else
+  AC_MSG_NOTICE([Configuring GNU Radio for native compilation])
+fi
+
 AM_INIT_AUTOMAKE(gnuradio,3.1svn)
-AC_CONFIG_SRCDIR([gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc])
 
+
 DEFINES=""
 AC_SUBST(DEFINES)
 
+
 dnl Remember if the user explicity set CXXFLAGS
 if test -n "${CXXFLAGS}"; then
   user_set_cxxflags=yes
@@ -96,10 +106,15 @@
 CFLAGS="${CFLAGS} $PTHREAD_CFLAGS"
 CXXFLAGS="${CXXFLAGS} $PTHREAD_CFLAGS"
 
-if test "x$CXX_FOR_BUILD" = x
+if test x$CXX_FOR_BUILD = x
 then
-  CXX_FOR_BUILD=${CXX}
+  if x$cross_compiling = xno; then
+    CXX_FOR_BUILD=${CXX}
+  else
+    CXX_FOR_BUILD=g++
+  fi
 fi
+
 AC_SUBST(CXX_FOR_BUILD)
 
 dnl Check for SysV shm (mandatory)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]