Commit 5dd4087e by Sandra Loosemore Committed by Sandra Loosemore

mips.c (mips_option_override): Check -fpic for compatibility with -mabicalls and ABI.

2012-08-04  Sandra Loosemore  <sandra@codesourcery.com>
	    Richard Sandiford  <rdsandiford@googlemail.com>

	gcc/
	* config/mips/mips.c (mips_option_override): Check -fpic
	for compatibility with -mabicalls and ABI.

	gcc/testsuite/
	* g++.dg/opt/enum2.C: Require fpic target.
	* g++.dg/lto/20090303_0.C: Likewise.

Co-Authored-By: Richard Sandiford <rdsandiford@googlemail.com>

From-SVN: r190150
parent 08264e04
2012-08-04 Sandra Loosemore <sandra@codesourcery.com>
Richard Sandiford <rdsandiford@googlemail.com>
* config/mips/mips.c (mips_option_override): Check -fpic
for compatibility with -mabicalls and ABI.
2012-08-04 Catherine Moore <clm@codesourcery.com>
Sandra Loosemore <sandra@codesourcery.com>
......
......@@ -16162,6 +16162,16 @@ mips_option_override (void)
target_flags &= ~MASK_ABICALLS;
}
/* PIC requires -mabicalls. */
if (flag_pic)
{
if (mips_abi == ABI_EABI)
error ("cannot generate position-independent code for %qs",
"-mabi=eabi");
else if (!TARGET_ABICALLS)
error ("position-independent code requires %qs", "-mabicalls");
}
if (TARGET_ABICALLS_PIC2)
/* We need to set flag_pic for executables as well as DSOs
because we may reference symbols that are not defined in
......
2012-08-04 Sandra Loosemore <sandra@codesourcery.com>
Richard Sandiford <rdsandiford@googlemail.com>
* g++.dg/opt/enum2.C: Require fpic target.
* g++.dg/lto/20090303_0.C: Likewise.
2012-08-04 Sandra Loosemore <sandra@codesourcery.com>
Catherine Moore <clm@codesourcery.com>
* gcc.target/mips/clear-cache-1.c: Test for alternate cache
......
/* { dg-lto-do run } */
/* { dg-require-effective-target fpic } */
/* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC}} } */
/* { dg-lto-options {{-flto -flto-partition=1to1}} { target sparc*-*-* } } */
/* { dg-suppress-ld-options {-fPIC} } */
......
// PR c++/43680
// Test that we don't make excessively aggressive assumptions about what
// values an enum variable can have.
// { dg-do run { target fpic } }
// { dg-options "-O2 -fPIC" }
// { dg-do run }
extern "C" void abort ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment