Compile IAMCU tests with -fno-pie -no-pie
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 4 Aug 2015 11:54:20 +0000 (11:54 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 4 Aug 2015 11:54:20 +0000 (04:54 -0700)
Since IAMCU tests clear all scratch integer registers with:

  asm __volatile__ ("xor %%eax, %%eax\n\t" \
                    "xor %%edx, %%edx\n\t" \
                    "xor %%ecx, %%ecx\n\t" \
                    ::: "eax", "edx", "ecx");

PIC register may be trashed between setting PIC register and using it.
This patch compiles AMCU tests with -fno-pie -no-pie.

PR target/67110
* gcc.target/i386/iamcu/abi-iamcu.exp (additional_flags): Add
-fno-pie -no-pie.

From-SVN: r226570

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp

index fb22e07ed6e0d38e3568e76ca87b149e41968498..69b511a849f0e64a848def3cfbc301e029c8f037 100644 (file)
@@ -1,3 +1,9 @@
+2015-08-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/67110
+       * gcc.target/i386/iamcu/abi-iamcu.exp (additional_flags): Add
+       -fno-pie -no-pie.
+
 2015-08-04  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/66427
index b5b3261039aa2a9421bc59cfb4916115211ae1f9..8bcee0fce057863943b1bbbad30388271af5feff 100644 (file)
@@ -29,7 +29,7 @@ if { (![istarget x86_64-*-linux*] && ![istarget i?86-*-linux*])
 
 torture-init
 set-torture-options $C_TORTURE_OPTIONS
-set additional_flags "-miamcu -W -Wall -Wno-abi"
+set additional_flags "-miamcu -W -Wall -Wno-abi -fno-pie -no-pie"
 
 foreach src [lsort [glob -nocomplain $srcdir/$subdir/test_*.c]] {
     if {[runtest_file_p $runtests $src]} {