[General Questions and Answers] jdmanley87:
Well, I had a day free yesterday and tried everything again, and I believe I hit the same stopping point error after correcting several others. Only this time, I made an actual script and patchfiles to handle everything to make this more organized. Again has anyone attempted to do this?

First, the script.

#!/bin/bash

HOME_DIR=/home/jmanley
GCC_BUILD_DIR=$HOME_DIR/gcc-android-build
HOST=arm-linux-androideabi
CFLAGS='-Wall -O -mandroid -mbionic'
LIBCFLAGS='-O2 -mandroid -mbionic'
LIBCPPFLAGS='-O2 -mandroid -mbionic'
LIBCXXFLAGS='-O2 -mandroid -mbionic -fno-implicit-templates'
PREFIX=/data
TOOLCHAIN_DIR=$HOME_DIR/arm-linux-androideabi-4.8
SYSROOT=$TOOLCHAIN_DIR/sysroot
GCC_VERSION=4.9.0
MPFR_VERSION=3.1.2
GMP_VERSION=6.0.0a
RENAMED_GMP_VERSION=6.0.0
MPC_VERSION=1.0.2
LDFLAGS='-lc -ldl -lgcc -lm -static'
LIBS='-lc -ldl -lgcc -lm -lsupc++ -lgnustl_shared -lgmp'
CC=arm-linux-androideabi-gcc
CXX=arm-linux-androideabi-g++
LD=arm-linux-androideabi-ld
RANLIB=arm-linux-androideabi-ranlib
AR=arm-linux-androideabi-ar
STRIP=arm-linux-androideabi-strip
PATH=$TOOLCHAIN_DIR/bin:$PATH

cd $HOME_DIR
mkdir $GCC_BUILD_DIR
tar -jxf gcc-$GCC_VERSION.tar.bz2
cd $HOME_DIR/gcc-$GCC_VERSION
tar -jxf ../gmp-$GMP_VERSION.tar.bz2
mv gmp-$RENAMED_GMP_VERSION gmp
tar -jxf ../mpfr-$MPFR_VERSION.tar.bz2
mv mpfr-$MPFR_VERSION mpfr
tar -zxf ../mpc-$MPC_VERSION.tar.gz
mv mpc-$MPC_VERSION mpc
patch -Np0 -i $HOME_DIR/getpagesize-gcc.patch
patch -Np0 -i $HOME_DIR/mpfr-impl.patch
patch -Np0 -i $HOME_DIR/libcpp-files.patch
patch -Np0 -i $HOME_DIR/libcpp-macro.patch
cd $GCC_BUILD_DIR

../gcc-$GCC_VERSION/configure \
--prefix=$PREFIX --host=$HOST --disable-option-checking --disable-ld \
--enable-shared --enable-languages=c \
--disable-bootstrap -disable-gold --disable-fortran --disable-libssp \
--disable-libquadmath --disable-libquadmath-support --disable-libada \
--disable-multilib --disable-libgomp --disable-cloog --disable-werror \
--with-sysroot=$SYSROOT --disable-nls --disable-long-long
make
sudo make install

Second, the actual error in question.

../../../gcc-4.9.0/gmp/mpz/powm_ui.c:162: error: undefined reference to '__gmpn_invert_limb'
divrem_1.c:228: error: undefined reference to '__gmpn_invert_limb'
divrem_1.c:149: error: undefined reference to '__gmpn_invert_limb'
divrem_2.c:91: error: undefined reference to '__gmpn_invert_limb'
collect2: error: ld returned 1 exit status
make[2]: *** [cc1] Error 1
make[2]: Leaving directory `/home/jmanley/gcc-android-build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/home/jmanley/gcc-android-build'
make: *** [all] Error 2

Now, some of the patchfiles I made to fix previous errors. Is any of this recommended?

*** libiberty/getpagesize.c	2005-03-27 07:31:13.000000000 -0800
--- getpagesize.c	2014-07-13 14:59:40.270231633 -0700
***************
*** 60,71 ****
# endif /* PAGESIZE */
#endif /* GNU_OUR_PAGESIZE */

- int
- getpagesize (void)
- {
- return (GNU_OUR_PAGESIZE);
- }
-
#else /* VMS */

#if 0	/* older distributions of gcc-vms are missing <syidef.h> */
--- 60,65 ----

*** libcpp/files.c	2014-01-02 14:24:45.000000000 -0800
--- files.c	2014-07-13 19:09:23.685783988 -0700
***************
*** 716,726 ****
cpp_error (pfile, CPP_DL_WARNING,
"%s is shorter than expected", file->path);

file->buffer = _cpp_convert_input (pfile,
CPP_OPTION (pfile, input_charset),
buf, size + 16, total,
&file->buffer_start,
!	&file->st.st_size);
file->buffer_valid = true;

return true;
--- 716,728 ----
cpp_error (pfile, CPP_DL_WARNING,
"%s is shorter than expected", file->path);

+ off_t ot = (off_t) file->st.st_size;
file->buffer = _cpp_convert_input (pfile,
CPP_OPTION (pfile, input_charset),
buf, size + 16, total,
&file->buffer_start,
!	&ot);
! file->st.st_size = ot;
file->buffer_valid = true;

return true;

*** libcpp/macro.c	2014-02-18 22:05:55.000000000 -0800
--- macro.c	2014-07-13 19:55:27.751477291 -0700
***************
*** 250,256 ****
struct tm *tb = NULL;
struct stat *st = _cpp_get_file_stat (file);
if (st)
!	tb = localtime (&st->st_mtime);
if (tb)
{
char *str = asctime (tb);
--- 250,260 ----
struct tm *tb = NULL;
struct stat *st = _cpp_get_file_stat (file);
if (st)
!	{
!	time_t tt = (time_t) st->st_mtime;
!	tb = localtime (&tt);
!	st->st_mtime = tt;
!	}
if (tb)
{
char *str = asctime (tb);

*** mpfr/src/mpfr-impl.h	2013-03-13 08:37:36.000000000 -0700
--- mpfr-impl.h	2014-07-13 18:44:36.599599742 -0700
***************
*** 1135,1142 ****
#include <locale.h>
/* Warning! In case of signed char, the value of MPFR_DECIMAL_POINT may
be negative (the ISO C99 does not seem to forbid negative values). */
! #define MPFR_DECIMAL_POINT (localeconv()->decimal_point[0])
! #define MPFR_THOUSANDS_SEPARATOR (localeconv()->thousands_sep[0])
#else
#define MPFR_DECIMAL_POINT ((char) '.')
#define MPFR_THOUSANDS_SEPARATOR ('\0')
--- 1135,1142 ----
#include <locale.h>
/* Warning! In case of signed char, the value of MPFR_DECIMAL_POINT may
be negative (the ISO C99 does not seem to forbid negative values). */
! #define MPFR_DECIMAL_POINT ((char) '.')
! #define MPFR_THOUSANDS_SEPARATOR ('\0')
#else
#define MPFR_DECIMAL_POINT ((char) '.')
#define MPFR_THOUSANDS_SEPARATOR ('\0')