Add linear file generator, CIRCQ emulation for BSD (bug #1626)