add the platform 4.0 toolchain buildscript for mac osx
authorshingil.kang <shingil.kang@samsung.com>
Fri, 19 May 2017 06:14:22 +0000 (15:14 +0900)
committertaekgoo.kim <taekgoo.kim@samsung.com>
Mon, 4 Dec 2017 09:51:35 +0000 (18:51 +0900)
Change-Id: I1efa72abeee98ec0a073e7bf4e86b8309c2ac0ab
Signed-off-by: shingil.kang <shingil.kang@samsung.com>
build-aarch64-macos-macos.sh [new file with mode: 0755]
build-arm-macos-macos.sh [new file with mode: 0755]
build-i586-macos-macos.sh [new file with mode: 0755]
build-x86_64-macos-macos.sh [new file with mode: 0755]

diff --git a/build-aarch64-macos-macos.sh b/build-aarch64-macos-macos.sh
new file mode 100755 (executable)
index 0000000..7ba7e95
--- /dev/null
@@ -0,0 +1,111 @@
+#!/bin/sh -e
+
+SYSROOT_DIR=/Users/s-core/git/gcc-6.2/sysroot-aarch64
+
+CURDIR=`pwd`
+BINUTILS_DIR=${CURDIR}/binutils/binutils-2.27
+GCC_SOURCE_DIR=${CURDIR}/gcc/gcc-6.2.1
+PROGRAM_PREFIX=aarch64-linux-gnu-
+BUILD_TARGET=aarch64-tizen-linux-gnu
+
+if [ "$1" ] ; then
+PREFIX_DIR=$1
+else
+PREFIX_DIR=${CURDIR}/aarch64-linux-gnu-gcc-6.2
+fi
+
+CI=
+CE=
+CX=
+CN=
+
+color_setting()
+{
+# tput setting when 0 and 1 file descriptor is set and tput exist
+  TPUT="`which tput`"
+  if [ -t 0 -a -t 1 -a -n "$TPUT" ]
+  then
+      CI="`$TPUT setf 6 || true`"
+      CE="`$TPUT setf 4 || true`"
+      CX="`$TPUT setf 2 || true`"
+      CN="`$TPUT sgr0 || true`"
+  fi
+}
+
+log()
+{
+    echo "$CI $@ $CN"
+}
+
+color_setting
+
+
+# clean directories
+log "[remove prefix, build dir]"
+rm -rf ${PREFIX_DIR}
+
+
+# Configure/Build/Install Binutils
+log "[Configuring Binutils...]"
+cd ${BINUTILS_DIR}
+
+rm -rf tmp_build
+mkdir tmp_build
+cd tmp_build
+../configure \
+    --prefix=${PREFIX_DIR} \
+    --with-sysroot=${SYSROOT_DIR} \
+    --with-pic \
+    --disable-nls \
+    --enable-plugins \
+    --enable-gold \
+    --target=${BUILD_TARGET}
+
+log "[Building Binutils...]"
+make -j10
+log "[Installing Binutils...]"
+make install
+cd ${CURDIR}
+
+# Configure/Build/Install GCC
+log "[Configuring GCC...]"
+cd ${GCC_SOURCE_DIR}
+
+rm -rf tmp_build
+mkdir tmp_build
+#cd gmp
+#rm -f configure
+#autoconf
+cd tmp_build
+pwd
+CXX="g++ -fbracket-depth=1024" ../configure \
+    --prefix=${PREFIX_DIR} \
+    --enable-languages=c,c++ \
+    --enable-checking=release \
+    --disable-libssp \
+    --disable-bootstrap \
+    --disable-libvtv \
+    --enable-plugin \
+    --disable-libgcj \
+    --with-sysroot=${SYSROOT_DIR} \
+    --enable-__cxa_atexit \
+    --enable-libstdcxx-allocator=new \
+    --enable-linker-build-id \
+    --without-system-libunwind \
+    --enable-threads=posix \
+    --disable-multilib \
+    --disable-libquadmath \
+    --enable-lto \
+    --disable-sjlj-exceptions \
+    --disable-libmpx \
+    --with-bugurl=http://bugs.tizen.org/ \
+    --target=${BUILD_TARGET} \
+    --disable-nls \
+    --with-pkgversion="Tizen/Linaro GCC 6.2.1 2017.05" \
+    --disable-sjlj-exceptions
+
+log "[Building GCC...]"
+make -j10
+log "[Installing GCC...]"
+make install
+cd ${CURDIR}
diff --git a/build-arm-macos-macos.sh b/build-arm-macos-macos.sh
new file mode 100755 (executable)
index 0000000..eab6877
--- /dev/null
@@ -0,0 +1,108 @@
+#!/bin/sh -e
+
+SYSROOT_DIR=/Users/s-core/git/gcc-6.2/sysroot-arm
+
+CURDIR=`pwd`
+BINUTILS_DIR=${CURDIR}/binutils/binutils-2.27
+GCC_SOURCE_DIR=${CURDIR}/gcc/gcc-6.2.1
+PROGRAM_PREFIX=arm-linux-gnueabi-
+BUILD_TARGET=arm-linux-gnueabi
+
+if [ "$1" ] ; then
+PREFIX_DIR=$1
+else
+PREFIX_DIR=${CURDIR}/arm-linux-gnueabi-gcc-6.2
+fi
+
+CI=
+CE=
+CX=
+CN=
+
+color_setting()
+{
+# tput setting when 0 and 1 file descriptor is set and tput exist
+  TPUT="`which tput`"
+  if [ -t 0 -a -t 1 -a -n "$TPUT" ]
+  then
+      CI="`$TPUT setf 6 || true`"
+      CE="`$TPUT setf 4 || true`"
+      CX="`$TPUT setf 2 || true`"
+      CN="`$TPUT sgr0 || true`"
+  fi
+}
+
+log()
+{
+    echo "$CI $@ $CN"
+}
+
+color_setting
+
+
+# clean directories
+log "[remove prefix, build dir]"
+rm -rf ${PREFIX_DIR}
+
+
+# Configure/Build/Install Binutils
+log "[Configuring Binutils...]"
+cd ${BINUTILS_DIR}
+
+rm -rf tmp_build
+mkdir tmp_build
+cd tmp_build
+../configure \
+    --prefix=${PREFIX_DIR} \
+    --with-sysroot=${SYSROOT_DIR} \
+    --with-pic \
+    --disable-nls \
+       --enable-plugins \
+       --enable-gold \
+    --target=${BUILD_TARGET}
+
+#--enable-shared \
+log "[Building Binutils...]"
+make -j8
+log "[Installing Binutils...]"
+make install
+cd ${CURDIR}
+
+# Configure/Build/Install GCC
+log "[Configuring GCC...]"
+cd ${GCC_SOURCE_DIR}
+
+rm -rf tmp_build
+mkdir tmp_build
+cd tmp_build
+pwd
+CXX="g++ -fbracket-depth=1024" ../configure \
+    --prefix=${PREFIX_DIR} \
+    --enable-languages=c,c++ \
+    --enable-checking=release \
+    --disable-libssp \
+    --disable-bootstrap \
+    --disable-libvtv \
+    --enable-plugin \
+    --disable-libgcj \
+    --disable-nls \
+    --with-system-zlib \
+    --with-sysroot=${SYSROOT_DIR} \
+    --enable-__cxa_atexit \
+    --enable-libstdcxx-allocator=new \
+    --enable-linker-build-id \
+    --without-system-libunwind \
+    --enable-threads=posix \
+    --disable-multilib \
+    --disable-libquadmath \
+    --enable-lto \
+    --disable-sjlj-exceptions \
+    --with-bugurl=http://bugs.tizen.org/ \
+    '--with-pkgversion=Tizen/Linaro GCC 6.2.1 2016.12' \
+    --target=${BUILD_TARGET}
+
+log "[Building GCC...]"
+make -j8
+log "[Installing GCC...]"
+make install
+cd ${CURDIR}
diff --git a/build-i586-macos-macos.sh b/build-i586-macos-macos.sh
new file mode 100755 (executable)
index 0000000..44772e4
--- /dev/null
@@ -0,0 +1,108 @@
+#!/bin/sh -e
+
+SYSROOT_DIR=/Users/s-core/git/gcc-6.2/sysroot-i586
+
+CURDIR=`pwd`
+BINUTILS_DIR=${CURDIR}/binutils/binutils-2.27
+GCC_SOURCE_DIR=${CURDIR}/gcc/gcc-6.2.1
+PROGRAM_PREFIX=i586-linux-gnueabi-
+BUILD_TARGET=i586-linux-gnueabi
+
+if [ "$1" ] ; then
+PREFIX_DIR=$1
+else
+PREFIX_DIR=${CURDIR}/i586-linux-gnueabi-gcc-6.2
+fi
+
+CI=
+CE=
+CX=
+CN=
+
+color_setting()
+{
+# tput setting when 0 and 1 file descriptor is set and tput exist
+  TPUT="`which tput`"
+  if [ -t 0 -a -t 1 -a -n "$TPUT" ]
+  then
+      CI="`$TPUT setf 6 || true`"
+      CE="`$TPUT setf 4 || true`"
+      CX="`$TPUT setf 2 || true`"
+      CN="`$TPUT sgr0 || true`"
+  fi
+}
+
+log()
+{
+    echo "$CI $@ $CN"
+}
+
+color_setting
+
+
+# clean directories
+log "[remove prefix, build dir]"
+rm -rf ${PREFIX_DIR}
+
+
+# Configure/Build/Install Binutils
+log "[Configuring Binutils...]"
+cd ${BINUTILS_DIR}
+
+rm -rf tmp_build
+mkdir tmp_build
+cd tmp_build
+../configure \
+    --prefix=${PREFIX_DIR} \
+    --with-sysroot=${SYSROOT_DIR} \
+    --with-pic \
+    --disable-nls \
+       --enable-plugins \
+       --enable-gold \
+    --target=${BUILD_TARGET}
+
+log "[Building Binutils...]"
+make -j8
+log "[Installing Binutils...]"
+make install
+cd ${CURDIR}
+
+# Configure/Build/Install GCC
+log "[Configuring GCC...]"
+cd ${GCC_SOURCE_DIR}
+
+rm -rf tmp_build
+mkdir tmp_build
+cd tmp_build
+pwd
+CXX="g++ -fbracket-depth=1024" ../configure \
+    --prefix=${PREFIX_DIR} \
+    --enable-languages=c,c++ \
+    --enable-checking=release \
+    --disable-libssp \
+    --disable-bootstrap \
+    --disable-libvtv \
+    --enable-plugin \
+    --disable-libgcj \
+    --disable-nls \
+    --with-system-zlib \
+    --with-sysroot=${SYSROOT_DIR} \
+    --enable-__cxa_atexit \
+    --enable-libstdcxx-allocator=new \
+    --enable-linker-build-id \
+    --without-system-libunwind \
+    --enable-threads=posix \
+    --disable-multilib \
+    --disable-libquadmath \
+    --enable-lto \
+    --disable-sjlj-exceptions \
+    --disable-libmpx \
+    --with-bugurl=http://bugs.tizen.org/ \
+    '--with-pkgversion=Tizen/Linaro GCC 6.2.1 2016.12' \
+    --target=${BUILD_TARGET}
+
+log "[Building GCC...]"
+make -j8
+log "[Installing GCC...]"
+make install
+cd ${CURDIR}
diff --git a/build-x86_64-macos-macos.sh b/build-x86_64-macos-macos.sh
new file mode 100755 (executable)
index 0000000..527214e
--- /dev/null
@@ -0,0 +1,112 @@
+#!/bin/sh -e
+
+SYSROOT_DIR=/Users/s-core/git/gcc-6.2/sysroot-x86_64
+
+CURDIR=`pwd`
+BINUTILS_DIR=${CURDIR}/binutils/binutils-2.27
+GCC_SOURCE_DIR=${CURDIR}/gcc/gcc-6.2.1
+PROGRAM_PREFIX=x86_64-linux-gnu-
+BUILD_TARGET=x86_64-tizen-linux-gnu
+
+if [ "$1" ] ; then
+PREFIX_DIR=$1
+else
+PREFIX_DIR=${CURDIR}/x86_64-linux-gnu-gcc-6.2
+fi
+
+CI=
+CE=
+CX=
+CN=
+
+color_setting()
+{
+# tput setting when 0 and 1 file descriptor is set and tput exist
+  TPUT="`which tput`"
+  if [ -t 0 -a -t 1 -a -n "$TPUT" ]
+  then
+      CI="`$TPUT setf 6 || true`"
+      CE="`$TPUT setf 4 || true`"
+      CX="`$TPUT setf 2 || true`"
+      CN="`$TPUT sgr0 || true`"
+  fi
+}
+
+log()
+{
+    echo "$CI $@ $CN"
+}
+
+color_setting
+
+
+# clean directories
+log "[remove prefix, build dir]"
+rm -rf ${PREFIX_DIR}
+
+
+# Configure/Build/Install Binutils
+log "[Configuring Binutils...]"
+cd ${BINUTILS_DIR}
+
+rm -rf tmp_build
+mkdir tmp_build
+cd tmp_build
+../configure \
+    --prefix=${PREFIX_DIR} \
+    --with-sysroot=${SYSROOT_DIR} \
+    --with-pic \
+    --disable-nls \
+    --enable-plugins \
+    --enable-gold \
+    --target=${BUILD_TARGET}
+
+log "[Building Binutils...]"
+make -j10
+log "[Installing Binutils...]"
+make install
+cd ${CURDIR}
+
+# Configure/Build/Install GCC
+log "[Configuring GCC...]"
+cd ${GCC_SOURCE_DIR}
+
+rm -rf tmp_build
+mkdir tmp_build
+#cd gmp
+#rm -f configure
+#autoconf
+cd tmp_build
+pwd
+CXX="g++ -fbracket-depth=1024" ../configure \
+    --prefix=${PREFIX_DIR} \
+    --enable-languages=c,c++ \
+    --enable-checking=release \
+    --disable-libssp \
+    --disable-bootstrap \
+    --disable-libvtv \
+    --enable-plugin \
+    --disable-libgcj \
+    --with-sysroot=${SYSROOT_DIR} \
+    --enable-__cxa_atexit \
+    --enable-libstdcxx-allocator=new \
+    --enable-linker-build-id \
+    --without-system-libunwind \
+    --enable-threads=posix \
+    --disable-multilib \
+    --disable-libquadmath \
+    --enable-lto \
+    --disable-sjlj-exceptions \
+    --disable-libmpx \
+    --with-bugurl=http://bugs.tizen.org/ \
+    --target=${BUILD_TARGET} \
+    --disable-nls \
+    --with-pkgversion="Tizen/Linaro GCC 6.2.1 2017.05" \
+    --disable-libmpx \
+    --enable-multilib
+
+log "[Building GCC...]"
+make -j10
+log "[Installing GCC...]"
+make install
+cd ${CURDIR}