#!/bin/sh # $Id: gcc-vg.in 6861 2012-05-27 19:08:55Z cher $ # Copyright (c) 2012 Alexander Chernov # using EJUDGE_FLAGS we may pass additional flags LANG_CONFIG_DIR="/home/judges/compile/conf/lang.d" [ "${EJUDGE_LANG_CONFIG}" = "" ] && EJUDGE_LANG_CONFIG="${LANG_CONFIG_DIR}/gcc-vg.cfg" if [ -f "${EJUDGE_LANG_CONFIG}" ] then . "${EJUDGE_LANG_CONFIG}" else version="unknown" GCCRUN="gcc" GCCDIR= fi if [ x"${version}" = x ] then echo "This language is not supported." >&2 exit 1 fi if [ x"${GCCDIR}" != x ] then PATH="${GCCDIR}:${PATH}" fi [ x"${EJUDGE_FLAGS}" = x ] && EJUDGE_FLAGS="-g -O2 -std=gnu11" unset LANG unset LC_ALL unset LC_MESSAGES unset LANGUAGE exec "${GCCRUN}" ${EJUDGE_FLAGS} "$1" -o "$2" -lm