#!/bin/bash
# put this in a directory next to the real "gcc"

GCC=$0
# strip off the -mpx since we are called as "gcc-mpx"
# to find the real gcc
GCC=${GCC/-mpx/};
DIR="$(basename $GCC)"
# note, this will have to be "/lib" for 32-bit
exec $GCC -L$DIR/../lib64 -fcheck-pointer-bounds -mmpx "$@"

