From 08a5f852715d0173f444b30db262d08870b3ab60 Mon Sep 17 00:00:00 2001 From: Kartatz <105828205+Kartatz@users.noreply.github.com> Date: Sat, 2 Sep 2023 00:48:58 -0300 Subject: [PATCH] Update to GCC 13.2 --- .github/workflows/build.yml | 77 +++++++++++-- .gitmodules | 3 + build.sh | 223 ++++++++++++++++++++++++++---------- build_all.sh | 39 +++++++ iot-headed-device-32.sh | 2 +- iot-headed-device-64.sh | 2 +- iot-headless-device.sh | 2 +- mobile-device.sh | 2 +- mobile-emulator.sh | 2 +- submodules/obggcc | 1 + tools/setup_toolchain.sh | 28 +++++ wearable-device.sh | 2 +- wearable-emulator.sh | 2 +- 13 files changed, 310 insertions(+), 75 deletions(-) create mode 100644 .gitmodules create mode 100644 build_all.sh create mode 160000 submodules/obggcc create mode 100644 tools/setup_toolchain.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 76ddc76..05ba29b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,18 +6,81 @@ on: - '**' jobs: - build: - concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + native-build: + name: 'Native build' runs-on: ubuntu-latest steps: - uses: actions/checkout@main with: submodules: true - - name: Run build script - run: bash ./build.sh + - name: Build Nul + run: | + bash './build.sh' 'native' + - name: Generate tarball + run: | + declare tarball_filename='/tmp/x86_64-linux-gnu.tar.xz' + tar --directory='/tmp' --create --file=- 'nul' | xz --threads='0' --compress -9 > "${tarball_filename}" + sha256sum "${tarball_filename}" | sed 's|/tmp/||' > "${tarball_filename}.sha256" - name: Upload artifact uses: actions/upload-artifact@main with: - path: ./tizen-cross.tar.xz \ No newline at end of file + name: native-toolchain + if-no-files-found: error + path: | + /tmp/x86_64-linux-gnu.tar.xz + /tmp/x86_64-linux-gnu.tar.xz.sha256 + + cross-build: + name: 'Cross build' + needs: native-build + runs-on: ubuntu-latest + continue-on-error: true + strategy: + matrix: + target: [ + 'alpha-unknown-linux-gnu', + 'x86_64-unknown-linux-gnu', + 'i386-unknown-linux-gnu', + 'arm-unknown-linux-gnueabi', + 'arm-unknown-linux-gnueabihf', + 'hppa-unknown-linux-gnu', + 'aarch64-unknown-linux-gnu', + 'mips-unknown-linux-gnu', + 'mipsel-unknown-linux-gnu', + 'powerpc-unknown-linux-gnu', + 's390-unknown-linux-gnu', + 's390x-unknown-linux-gnu', + 'sparc-unknown-linux-gnu', + 'powerpc64le-unknown-linux-gnu' + ] + steps: + - uses: actions/checkout@main + with: + submodules: true + - name: Download artifact + uses: actions/download-artifact@main + with: + name: native-toolchain + - name: Setup toolchain + run: | + tar --directory='/tmp' --extract --file='./x86_64-linux-gnu.tar.xz' + mv '/tmp/nul' '/tmp/nul-toolchain' + - name: Build Nul with OBGGCC + run: | + source './tools/setup_toolchain.sh' + source './submodules/obggcc/tools/setup_toolchain.sh' + + bash './build.sh' '${{ matrix.target }}' + - name: Generate tarball + run: | + declare tarball_filename='/tmp/${{ matrix.target }}.tar.xz' + tar --directory='/tmp' --create --file=- 'nul' | xz --threads='0' --compress -9 > "${tarball_filename}" + sha256sum "${tarball_filename}" | sed 's|/tmp/||' > "${tarball_filename}.sha256" + - name: Upload artifact + uses: actions/upload-artifact@main + with: + name: cross-toolchain + if-no-files-found: error + path: | + /tmp/${{ matrix.target }}.tar.xz + /tmp/${{ matrix.target }}.tar.xz.sha256 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..013bb83 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "submodules/obggcc"] + path = submodules/obggcc + url = https://github.com/AmanoTeam/obggcc diff --git a/build.sh b/build.sh index 26271f4..baeef63 100644 --- a/build.sh +++ b/build.sh @@ -1,12 +1,12 @@ #!/bin/bash -set -e -set -u +set -eu declare -r current_source_directory="${PWD}" -declare -r toolchain_directory='/tmp/unknown-unknown-tizen' -declare -r toolchain_tarball="$(pwd)/tizen-cross.tar.xz" +declare -r revision="$(git rev-parse --short HEAD)" + +declare -r toolchain_directory='/tmp/nul' declare -r gmp_tarball='/tmp/gmp.tar.xz' declare -r gmp_directory='/tmp/gmp-6.2.1' @@ -18,42 +18,63 @@ declare -r mpc_tarball='/tmp/mpc.tar.gz' declare -r mpc_directory='/tmp/mpc-1.3.1' declare -r binutils_tarball='/tmp/binutils.tar.xz' -declare -r binutils_directory='/tmp/binutils-2.40' +declare -r binutils_directory='/tmp/binutils-2.41' + +declare -r gcc_tarball='/tmp/gcc.tar.gz' +declare -r gcc_directory='/tmp/gcc-12.3.0' + +declare -r optflags='-Os' +declare -r linkflags='-Wl,-s' + +declare -r max_jobs="$(($(nproc) * 8))" + +declare build_type="${1}" + +if [ -z "${build_type}" ]; then + build_type='native' +fi + +declare is_native='0' + +if [ "${build_type}" == 'native' ]; then + is_native='1' +fi + +declare OBGGCC_TOOLCHAIN='/tmp/obggcc-toolchain' +declare CROSS_COMPILE_TRIPLET='' -declare -r gcc_tarball='/tmp/gcc.tar.xz' -declare -r gcc_directory='/tmp/gcc-12.2.0' +declare cross_compile_flags='' -declare -r cflags='-Os -s -DNDEBUG' +if ! (( is_native )); then + source "./submodules/obggcc/toolchains/${build_type}.sh" + cross_compile_flags+="--host=${CROSS_COMPILE_TRIPLET}" +fi if ! [ -f "${gmp_tarball}" ]; then - wget --no-verbose 'https://mirrors.kernel.org/gnu/gmp/gmp-6.2.1.tar.xz' --output-document="${gmp_tarball}" + curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://mirrors.kernel.org/gnu/gmp/gmp-6.2.1.tar.xz' --output "${gmp_tarball}" tar --directory="$(dirname "${gmp_directory}")" --extract --file="${gmp_tarball}" fi if ! [ -f "${mpfr_tarball}" ]; then - wget --no-verbose 'https://mirrors.kernel.org/gnu/mpfr/mpfr-4.2.0.tar.xz' --output-document="${mpfr_tarball}" + curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://mirrors.kernel.org/gnu/mpfr/mpfr-4.2.0.tar.xz' --output "${mpfr_tarball}" tar --directory="$(dirname "${mpfr_directory}")" --extract --file="${mpfr_tarball}" fi if ! [ -f "${mpc_tarball}" ]; then - wget --no-verbose 'https://mirrors.kernel.org/gnu/mpc/mpc-1.3.1.tar.gz' --output-document="${mpc_tarball}" + curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://mirrors.kernel.org/gnu/mpc/mpc-1.3.1.tar.gz' --output "${mpc_tarball}" tar --directory="$(dirname "${mpc_directory}")" --extract --file="${mpc_tarball}" fi if ! [ -f "${binutils_tarball}" ]; then - wget --no-verbose 'https://mirrors.kernel.org/gnu/binutils/binutils-2.40.tar.xz' --output-document="${binutils_tarball}" + curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://mirrors.kernel.org/gnu/binutils/binutils-2.41.tar.xz' --output "${binutils_tarball}" tar --directory="$(dirname "${binutils_directory}")" --extract --file="${binutils_tarball}" fi if ! [ -f "${gcc_tarball}" ]; then - wget --no-verbose 'https://mirrors.kernel.org/gnu/gcc/gcc-12.2.0/gcc-12.2.0.tar.xz' --output-document="${gcc_tarball}" + curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://mirrors.kernel.org/gnu/gcc/gcc-12.3.0/gcc-12.3.0.tar.xz' --output "${gcc_tarball}" tar --directory="$(dirname "${gcc_directory}")" --extract --file="${gcc_tarball}" fi -while read file; do - sed -i "s/-O2/${cflags}/g" "${file}" -done <<< "$(find '/tmp' -type 'f' -wholename '*configure')" - [ -d "${gmp_directory}/build" ] || mkdir "${gmp_directory}/build" cd "${gmp_directory}/build" @@ -61,9 +82,13 @@ cd "${gmp_directory}/build" ../configure \ --prefix="${toolchain_directory}" \ --enable-shared \ - --enable-static + --enable-static \ + ${cross_compile_flags} \ + CFLAGS="${optflags}" \ + CXXFLAGS="${optflags}" \ + LDFLAGS="${linkflags}" -make all --jobs="$(nproc)" +make all --jobs make install [ -d "${mpfr_directory}/build" ] || mkdir "${mpfr_directory}/build" @@ -74,9 +99,13 @@ cd "${mpfr_directory}/build" --prefix="${toolchain_directory}" \ --with-gmp="${toolchain_directory}" \ --enable-shared \ - --enable-static + --enable-static \ + ${cross_compile_flags} \ + CFLAGS="${optflags}" \ + CXXFLAGS="${optflags}" \ + LDFLAGS="${linkflags}" -make all --jobs="$(nproc)" +make all --jobs make install [ -d "${mpc_directory}/build" ] || mkdir "${mpc_directory}/build" @@ -87,17 +116,21 @@ cd "${mpc_directory}/build" --prefix="${toolchain_directory}" \ --with-gmp="${toolchain_directory}" \ --enable-shared \ - --enable-static + --enable-static \ + ${cross_compile_flags} \ + CFLAGS="${optflags}" \ + CXXFLAGS="${optflags}" \ + LDFLAGS="${linkflags}" -make all --jobs="$(nproc)" +make all --jobs make install declare -ra targets=( + 'wearable-device' + 'wearable-emulator' 'iot-headless-device' 'iot-headed-device-64' 'iot-headed-device-32' - 'wearable-device' - 'wearable-emulator' 'mobile-device' 'mobile-emulator' ) @@ -105,32 +138,73 @@ declare -ra targets=( for target in "${targets[@]}"; do source "${current_source_directory}/${target}.sh" - declare url="https://github.com/AmanoTeam/t1z3n-sysr00t/releases/latest/download/${target}.tar.xz" + declare sysroot_filename='/tmp/sysroot.tar.xz' + declare sysroot_directory="/tmp/${target}" - declare sysroot_tarball='/tmp/sysroot.tar.xz' - declare sysroot_directory="${toolchain_directory}/${device_type}/${triple}" + curl \ + --connect-timeout '10' \ + --retry '15' \ + --retry-all-errors \ + --fail \ + --silent \ + --location \ + --output "${sysroot_filename}" \ + --url "https://github.com/AmanoTeam/tizen-sysroot/releases/latest/download/${target}.tar.xz" - mkdir --parent "${sysroot_directory}" + [ -d "${sysroot_directory}" ] || mkdir "${sysroot_directory}" - wget --no-verbose "${url}" --output-document="${sysroot_tarball}" - tar --directory="${sysroot_directory}" --extract --file="${sysroot_tarball}" + tar --extract --directory="${sysroot_directory}" --file="${sysroot_filename}" + + [ -d "${toolchain_directory}/${triplet}/lib" ] || mkdir --parent "${toolchain_directory}/${triplet}/lib" + + cp --recursive "${sysroot_directory}/lib" "${toolchain_directory}/${triplet}" if [ -d "${sysroot_directory}/lib64" ]; then - mv "${sysroot_directory}/lib64/"* "${sysroot_directory}/lib" - rmdir "${sysroot_directory}/lib64" + cp --recursive "${sysroot_directory}/lib64/"* "${toolchain_directory}/${triplet}/lib" fi + cp --recursive "${sysroot_directory}/usr/lib" "${toolchain_directory}/${triplet}" + if [ -d "${sysroot_directory}/usr/lib64" ]; then - mv "${sysroot_directory}/usr/lib64/"* "${sysroot_directory}/usr/lib" - rmdir "${sysroot_directory}/usr/lib64" + cp --recursive "${sysroot_directory}/usr/lib64/"* "${toolchain_directory}/${triplet}/lib" fi - cp --recursive "${sysroot_directory}/usr/lib" "${sysroot_directory}" - cp --recursive "${sysroot_directory}/usr/include" "${sysroot_directory}" + cp --recursive "${sysroot_directory}/usr/include" "${toolchain_directory}/${triplet}" + + while read name; do + if [ -f "${name}" ]; then + chmod 644 "${name}" + elif [ -d "${name}" ]; then + chmod 755 "${name}" + fi + done <<< "$(find "${toolchain_directory}/${triplet}")" + + cd "${toolchain_directory}/${triplet}/lib" - rm --recursive "${sysroot_directory}/usr" + while read name; do + if [[ "$(file --brief --mime-type "${name}")" != 'application/x-sharedlib' ]]; then + continue + fi + + declare soname="$(readelf -d "${name}" | grep 'SONAME' | sed --regexp-extended 's/.+\[(.+)\]/\1/g')" + declare basename="$(basename "${name}")" + + if [ -z "${soname}" ]; then + continue + fi + + if [ "${basename}" == "${soname}" ]; then + continue + fi + + unlink "${name}" + + ln --symbolic "${soname}" "${basename}" + done <<< "$(find "${toolchain_directory}/${triplet}/lib" -maxdepth '1' -mindepth '1' -type 'f' -wholename '*lib*.so*')" - echo -e "OUTPUT_FORMAT(${output_format})\nGROUP ( ./libc.so.6 ./libc_nonshared.a AS_NEEDED ( ./${ld} ) )" > "${sysroot_directory}/lib/libc.so" + find "${toolchain_directory}/${triplet}/lib" -maxdepth '1' -mindepth '1' -type 'd' -exec rm --recursive {} \; + + sed --in-place 's|/usr/lib64|.|g; s|/lib64/|./|g; s|/usr/lib|.|g; s|/lib/|./|g' "${toolchain_directory}/${triplet}/lib/libc.so" [ -d "${binutils_directory}/build" ] || mkdir "${binutils_directory}/build" @@ -138,28 +212,39 @@ for target in "${targets[@]}"; do rm --force --recursive ./* ../configure \ - --target="${triple}" \ - --prefix="${toolchain_directory}/${device_type}" \ + --target="${triplet}" \ + --prefix="${toolchain_directory}" \ --enable-gold \ - --enable-ld + --enable-ld \ + --enable-lto \ + --disable-gprofng \ + --with-static-standard-libraries \ + --with-sysroot="${toolchain_directory}/${triplet}" \ + ${cross_compile_flags} \ + CFLAGS="${optflags}" \ + CXXFLAGS="${optflags}" \ + LDFLAGS="${linkflags}" - make all --jobs="$(nproc)" + make all --jobs="${max_jobs}" make install [ -d "${gcc_directory}/build" ] || mkdir "${gcc_directory}/build" + cd "${gcc_directory}/build" rm --force --recursive ./* ../configure \ - --target="${triple}" \ - --prefix="${toolchain_directory}/${device_type}" \ + --target="${triplet}" \ + --prefix="${toolchain_directory}" \ --with-linker-hash-style='gnu' \ --with-gmp="${toolchain_directory}" \ --with-mpc="${toolchain_directory}" \ --with-mpfr="${toolchain_directory}" \ - --with-system-zlib \ - --with-bugurl='https://github.com/AmanoTeam/t1z3ncr0ss/issues' \ + --with-bugurl='https://github.com/AmanoTeam/Nul/issues' \ + --with-pkgversion="Nul v0.1-${revision}" \ + --with-sysroot="${toolchain_directory}/${triplet}" \ + --with-native-system-header-dir='/include' \ --enable-__cxa_atexit \ --enable-cet='auto' \ --enable-checking='release' \ @@ -171,26 +256,42 @@ for target in "${targets[@]}"; do --enable-link-serialization='1' \ --enable-linker-build-id \ --enable-lto \ - --disable-multilib \ - --enable-plugin \ --enable-shared \ --enable-threads='posix' \ --enable-libssp \ - --disable-libstdcxx-pch \ - --disable-werror \ --enable-languages='c,c++' \ + --enable-ld \ + --enable-gold \ --disable-libgomp \ --disable-bootstrap \ + --disable-libstdcxx-pch \ + --disable-werror \ + --disable-multilib \ + --disable-plugin \ + --disable-nls \ --without-headers \ - --enable-ld \ - --enable-gold \ - --with-pic \ - --with-sysroot="${sysroot_directory}" \ - --with-native-system-header-dir='/include' \ - --with-gcc-major-version-only + ${cross_compile_flags} \ + CFLAGS="${optflags}" \ + CXXFLAGS="${optflags}" \ + LDFLAGS="-Wl,-rpath-link,${OBGGCC_TOOLCHAIN}/${CROSS_COMPILE_TRIPLET}/lib ${linkflags}" - LD_LIBRARY_PATH="${toolchain_directory}/lib" PATH="${PATH}:${toolchain_directory}/bin" make CFLAGS_FOR_TARGET="${cflags}" CXXFLAGS_FOR_TARGET="${cflags}" all --jobs=16 #"$(nproc)" + LD_LIBRARY_PATH="${toolchain_directory}/lib" PATH="${PATH}:${toolchain_directory}/bin" make \ + CFLAGS_FOR_TARGET="${optflags} ${linkflags}" \ + CXXFLAGS_FOR_TARGET="${optflags} ${linkflags}" \ + all --jobs="${max_jobs}" make install -done - -tar --directory="$(dirname "${toolchain_directory}")" --create --file=- "$(basename "${toolchain_directory}")" | xz --threads=0 --compress -9 > "${toolchain_tarball}" \ No newline at end of file + + cd "${toolchain_directory}/${triplet}/bin" + + for name in *; do + rm "${name}" + ln -s "../../bin/${triplet}-${name}" "${name}" + done + + rm --recursive "${toolchain_directory}/share" + rm --recursive "${toolchain_directory}/lib/gcc/${triplet}/"*"/include-fixed" + + patchelf --add-rpath '$ORIGIN/../../../../lib' "${toolchain_directory}/libexec/gcc/${triplet}/"*"/cc1" + patchelf --add-rpath '$ORIGIN/../../../../lib' "${toolchain_directory}/libexec/gcc/${triplet}/"*"/cc1plus" + patchelf --add-rpath '$ORIGIN/../../../../lib' "${toolchain_directory}/libexec/gcc/${triplet}/"*"/lto1" +done \ No newline at end of file diff --git a/build_all.sh b/build_all.sh new file mode 100644 index 0000000..e38e6d9 --- /dev/null +++ b/build_all.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +set -eu + +declare -ra targets=( + 'alpha-unknown-linux-gnu' + 'x86_64-unknown-linux-gnu' + 'i386-unknown-linux-gnu' + 'arm-unknown-linux-gnueabi' + 'arm-unknown-linux-gnueabihf' + 'hppa-unknown-linux-gnu' + 'aarch64-unknown-linux-gnu' + 'mips-unknown-linux-gnu' + 'mipsel-unknown-linux-gnu' + 'powerpc-unknown-linux-gnu' + 's390-unknown-linux-gnu' + 's390x-unknown-linux-gnu' + 'sparc-unknown-linux-gnu' + 'powerpc64le-unknown-linux-gnu' + 'mips64el-unknown-linux-gnuabi64' +) + +declare -r tarballs_directory="${PWD}/nul-tarballs" + +[ -d "${tarballs_directory}" ] || mkdir "${tarballs_directory}" + +source './tools/setup_toolchain.sh' +source './submodules/obggcc/tools/setup_toolchain.sh' + +for target in "${targets[@]}"; do + bash './build.sh' "${target}" + + declare tarball_filename="${tarballs_directory}/${target}.tar.xz" + + tar --directory='/tmp' --create --file=- 'nul' | xz --threads=0 --compress -9 > "${tarball_filename}" + sha256sum "${tarball_filename}" > "${tarball_filename}.sha256" + + rm --recursive --force '/tmp/nul' +done diff --git a/iot-headed-device-32.sh b/iot-headed-device-32.sh index fd2c539..4f2eeea 100644 --- a/iot-headed-device-32.sh +++ b/iot-headed-device-32.sh @@ -1,6 +1,6 @@ #!/bin/bash -declare triple='arm-tizen-linux-gnueabi' +declare triplet='arm-tizeniot-linux-gnueabi' declare output_format='elf32-littlearm' declare ld='ld-linux.so.3' diff --git a/iot-headed-device-64.sh b/iot-headed-device-64.sh index 2593e7f..e6c014c 100644 --- a/iot-headed-device-64.sh +++ b/iot-headed-device-64.sh @@ -1,6 +1,6 @@ #!/bin/bash -declare triple='aarch64-tizen-linux-gnu' +declare triplet='aarch64-tizeniot-linux-gnu' declare output_format='elf64-littleaarch64' declare ld='ld-linux-aarch64.so.1' diff --git a/iot-headless-device.sh b/iot-headless-device.sh index 287f10f..2941e8d 100644 --- a/iot-headless-device.sh +++ b/iot-headless-device.sh @@ -1,6 +1,6 @@ #!/bin/bash -declare triple='arm-tizen-linux-gnueabi' +declare triplet='arm-tizeniotheadless-linux-gnueabi' declare output_format='elf32-littlearm' declare ld='ld-linux.so.3' diff --git a/mobile-device.sh b/mobile-device.sh index 6607e0d..ae4efd8 100644 --- a/mobile-device.sh +++ b/mobile-device.sh @@ -1,6 +1,6 @@ #!/bin/bash -declare triple='arm-tizen-linux-gnueabi' +declare triplet='arm-tizenmobile-linux-gnueabi' declare output_format='elf32-littlearm' declare ld='ld-linux.so.3' diff --git a/mobile-emulator.sh b/mobile-emulator.sh index b6a3b0d..dd4bfd6 100644 --- a/mobile-emulator.sh +++ b/mobile-emulator.sh @@ -1,6 +1,6 @@ #!/bin/bash -declare triple='i386-tizen-linux-gnueabi' +declare triple='i386-tizenmobile-linux-gnueabi' declare output_format='elf32-i386' declare ld='ld-linux.so.2' diff --git a/submodules/obggcc b/submodules/obggcc new file mode 160000 index 0000000..9499bd3 --- /dev/null +++ b/submodules/obggcc @@ -0,0 +1 @@ +Subproject commit 9499bd3eeb8a005cbea5c22c1c839f79e2f34e25 diff --git a/tools/setup_toolchain.sh b/tools/setup_toolchain.sh new file mode 100644 index 0000000..a5e3f6d --- /dev/null +++ b/tools/setup_toolchain.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -eu + +declare -r KAL_HOME='/tmp/kal-toolchain' + +if [ -d "${KAL_HOME}" ]; then + PATH+=":${KAL_HOME}/bin" + export KAL_HOME \ + PATH + return 0 +fi + +declare -r KAL_CROSS_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --retry 10 --retry-delay 3 --silent --url 'https://api.github.com/repos/AmanoTeam/Kal/releases/latest')")" +declare -r KAL_CROSS_TARBALL='/tmp/kal.tar.xz' +declare -r KAL_CROSS_URL="https://github.com/AmanoTeam/Kal/releases/download/${KAL_CROSS_TAG}/x86_64-unknown-linux-gnu.tar.xz" + +curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${KAL_CROSS_URL}" --output "${KAL_CROSS_TARBALL}" +tar --directory="$(dirname "${KAL_CROSS_TARBALL}")" --extract --file="${KAL_CROSS_TARBALL}" + +rm "${KAL_CROSS_TARBALL}" + +mv '/tmp/kal' "${KAL_HOME}" + +PATH+=":${KAL_HOME}/bin" + +export KAL_HOME \ + PATH diff --git a/wearable-device.sh b/wearable-device.sh index 5f3ff33..50bbff1 100644 --- a/wearable-device.sh +++ b/wearable-device.sh @@ -1,6 +1,6 @@ #!/bin/bash -declare triple='arm-tizen-linux-gnueabi' +declare triplet='arm-tizenwearable-linux-gnueabi' declare output_format='elf32-littlearm' declare ld='ld-linux.so.3' diff --git a/wearable-emulator.sh b/wearable-emulator.sh index 2b6e9b8..99754b5 100644 --- a/wearable-emulator.sh +++ b/wearable-emulator.sh @@ -1,6 +1,6 @@ #!/bin/bash -declare triple='i386-tizen-linux-gnueabi' +declare triple='i386-tizenwearable-linux-gnueabi' declare output_format='elf32-i386' declare ld='ld-linux.so.2'