On 06/25/14 04:07, Vidya Praveen wrote:
PING!
On Wed, Jun 04, 2014 at 02:56:00PM +0100, Vidya Praveen wrote:
Hello,
This is to follow up the patch I had posted to fix bind_pic_locally some time
ago (sorry, this went in to my back log for a while).
To summarize, multilib_flags when it contains -fpic or -fPIC, overrides -fpie
or -fPIE that is added by bind_pic_locally. The fix that was finally agreed on
was to store the flags to a variable at bind_pic_locally and append it to
multilib_flags just before invoking target_compile and remove it immediately
after that (Refer [1]).
This patch implements the same. Since this is an issue not only for gcc but
also for g++ and gfortran tests, I have fixed this in g++.exp and gfortran.exp
along with gcc.exp.
This was tested and works fine on:
aarch64-none-elf
aarch64-none-linux-gnu
arm-none-linux-gnueabihf
x86_64-unknown-linux-gnu
OK for trunk?
Cheers
VP.
[1] http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00365.html
~~~
gcc/testsuite/ChangeLog:
2014-06-04 Vidya Praveen <vidyaprav...@arm.com>
* lib/target-support.exp (bind_pic_locally): Save the flags to
'flags_to_postpone' instead of appending to 'flags'.
* lib/gcc.exp (gcc_target_compile): Append board_info's multilib_flags
with flags_to_postpone and revert after target_compile.
* lib/g++.exp (g++_target_compile): Ditto.
* lib/gfortran.exp (gfortran_target_compile): Ditto.
OK. Oh how I hate tcl...
jeff