build-host-gcc.sh: enable libgomp where possible (ARM > 4.4.3)
diff --git a/build/tools/build-host-gcc.sh b/build/tools/build-host-gcc.sh
index 2145396..a2157ef 100755
--- a/build/tools/build-host-gcc.sh
+++ b/build/tools/build-host-gcc.sh
@@ -1408,7 +1408,6 @@
ARGS=$ARGS" --with-gnu-as --with-gnu-ld"
ARGS=$ARGS" --enable-threads --disable-libssp --disable-libmudflap"
- ARGS=$ARGS" --disable-libgomp" # TODO: Add option to enable this
ARGS=$ARGS" --disable-libstdc__-v3 --disable-sjlj-exceptions"
ARGS=$ARGS" --disable-tls"
ARGS=$ARGS" --disable-libquadmath --disable-libitm --disable-bootstrap"
@@ -1418,6 +1417,19 @@
ARGS=$ARGS" --disable-werror"
ARGS=$ARGS" --enable-target-optspace"
+ case "$GCC_VERSION" in
+ 4.4.3)
+ ARGS=$ARGS" --disable-libgomp"
+ ;;
+ *)
+ case $TARGET_ARCH in
+ arm) ARGS=$ARGS" --enable-libgomp";;
+ x86) ARGS=$ARGS" --disable-libgomp";;
+ mips|mipsel) ARGS=$ARGS" --disable-libgomp";;
+ esac
+ ;;
+ esac
+
# Place constructors/destructors in .init_array/.fini_array, not in
# .ctors/.dtors on Android. Note that upstream Linux GLibc is now doing
# the same.