diff options
author | Keith Obenschain <obenschaink@gmail.com> | 2012-03-23 17:14:06 -0400 |
---|---|---|
committer | Keith Obenschain <obenschaink@gmail.com> | 2012-03-23 17:14:06 -0400 |
commit | 1271761f530c0050154e8d526b95f952df551751 (patch) | |
tree | 4ce535cc9afdb94b354a23a9848ed0a3ca9ea7cf /gcc-4.4.3/gcc/config | |
parent | cf90705c8503b3a763801a4f31f6f2272015f0dc (diff) | |
download | toolchain_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/gcc/config')
-rw-r--r-- | gcc-4.4.3/gcc/config/arm/linux-eabi.h | 2 | ||||
-rw-r--r-- | gcc-4.4.3/gcc/config/linux-android.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/gcc-4.4.3/gcc/config/arm/linux-eabi.h b/gcc-4.4.3/gcc/config/arm/linux-eabi.h index 2ca881890..6ab0f52df 100644 --- a/gcc-4.4.3/gcc/config/arm/linux-eabi.h +++ b/gcc-4.4.3/gcc/config/arm/linux-eabi.h @@ -82,7 +82,7 @@ #undef LIB_SPEC #define LIB_SPEC \ LINUX_OR_ANDROID_LD (LINUX_TARGET_LIB_SPEC, \ - LINUX_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC) + ANDROID_LIB_SPEC " " LINUX_TARGET_LIB_SPEC ) #undef STARTFILE_SPEC #define STARTFILE_SPEC \ diff --git a/gcc-4.4.3/gcc/config/linux-android.h b/gcc-4.4.3/gcc/config/linux-android.h index 5ca3858a2..f2a3d9c6f 100644 --- a/gcc-4.4.3/gcc/config/linux-android.h +++ b/gcc-4.4.3/gcc/config/linux-android.h @@ -50,7 +50,8 @@ "%{!frtti:%{!fno-rtti: -fno-rtti}}" #define ANDROID_LIB_SPEC \ - "%{!static: -ldl}" + "%{!static: -ldl} \ + %{pthread:-lc}" #define ANDROID_STARTFILE_SPEC \ "%{!shared:" \ |