aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.3/libgomp/configure.ac
diff options
context:
space:
mode:
authorKeith Obenschain <obenschaink@gmail.com>2012-03-23 17:14:06 -0400
committerKeith Obenschain <obenschaink@gmail.com>2012-03-23 17:14:06 -0400
commit1271761f530c0050154e8d526b95f952df551751 (patch)
tree4ce535cc9afdb94b354a23a9848ed0a3ca9ea7cf /gcc-4.4.3/libgomp/configure.ac
parentcf90705c8503b3a763801a4f31f6f2272015f0dc (diff)
downloadtoolchain_gcc-1271761f530c0050154e8d526b95f952df551751.tar.gz
toolchain_gcc-1271761f530c0050154e8d526b95f952df551751.tar.bz2
toolchain_gcc-1271761f530c0050154e8d526b95f952df551751.zip
Modifications to enable OpenMP in Android.
This patch enables OpenMP support in the Android NDK by modifying the following: Specify that pthreads are supported in -lc instead of -lpthread (linux-android.h) Change the order of ANDROID_LIB_SPEC and LINUX_TARGET_LIB_SPEC so the above change will take precedence (linux-eabi.h) Modified autoconf for libgomp to check to see if the pthread libraries exist in libc (configure.ac) Added include to env.c so PAGE_SIZE is defined. To enable these changes, add "--enable-libgomp" to configure command under build-gcc.sh. Change-Id: I8b460159b768f64f5198ef5494346cdf75510250 Signed-off-by: Keith Obenschain <obenschaink@gmail.com>
Diffstat (limited to 'gcc-4.4.3/libgomp/configure.ac')
-rw-r--r--gcc-4.4.3/libgomp/configure.ac9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc-4.4.3/libgomp/configure.ac b/gcc-4.4.3/libgomp/configure.ac
index a46f99c60..5bafe61d1 100644
--- a/gcc-4.4.3/libgomp/configure.ac
+++ b/gcc-4.4.3/libgomp/configure.ac
@@ -168,6 +168,13 @@ AC_LINK_IFELSE(
void *g(void *d) { return NULL; }],
[pthread_t t; pthread_create(&t,NULL,g,NULL);])],
[XPCFLAGS=" -Wc,-pthread"],
+ [CFLAGS="$save_CFLAGS" LIBS="$LIBS"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <pthread.h>
+ void *g(void *d) { return NULL; }],
+ [pthread_t t; pthread_create(&t,NULL,g,NULL);])],
+ [],
[CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -175,7 +182,7 @@ AC_LINK_IFELSE(
void *g(void *d) { return NULL; }],
[pthread_t t; pthread_create(&t,NULL,g,NULL);])],
[],
- [AC_MSG_ERROR([Pthreads are required to build libgomp])])])
+ [AC_MSG_ERROR([Pthreads are required to build libgomp])])])])
# Check for functions needed.
AC_CHECK_FUNCS(getloadavg clock_gettime strtoull)