In testsuite setup environment before first usage of compiler

In testsuite environment should be setup before compiler usage. Currently it is done before any actual tests are run, but after Dejagnu check for linker plugin support. Because environment is not set properly check for plugin support always fails, regardless of whether linker plugins are supported. What is more if several tests are running in one Dejagnu instance, then they inherit environment of previous one, thus only the first linker plugin check will fail due to environment, following checks will get a proper environment and will succeed (if linker plugins are supported). As a consequence not only the results will be misleading (because invalid compiler options will be used in torture testing) but also the results will differ depending on how tests a run: in single thread mode when every test will run subsequently in the same Dejagnu instance (only one linker test will fail) or in a parallel environment when test are running in different environments (multiple linker tests will fail).

2013-06-24  Anton Kolesov   <anton.kolesov@synopsys.com>

    * testsuite/lib/c-torture.exp: Setup linker environment variables before
    checking linker plugin support.
    * testsuite/lib/gcc-dg.exp: Likewise.
Merge pull request #15 from foss-for-synopsys-dwc-arc-processors/anton-testsuite-linker-plugin2

Setup environment in testsuite before first usage of compiler