#!/bin/bash set -e cd $(dirname $0) mold=`pwd`/../mold echo -n "Testing $(basename -s .sh $0) ... " t=$(pwd)/tmp/$(basename -s .sh $0) mkdir -p $t if [ $(uname -m) = x86_64 ]; then dialect=gnu2 elif [ $(uname -m) = aarch64 ]; then dialect=desc else echo skipped exit 0 fi cat < extern _Thread_local int foo; int main() { foo = 42; printf("%d\n", foo); } EOF cat <