Commit 1a1e6a9d by Fariborz Jahanian Committed by Fariborz Jahanian

Define __PIC__ for darwin targets.

OKed by Mike Stump.

From-SVN: r103447
parent 130869aa
2005-08-24 Fariborz Jahanian <fjahanian@apple.com>
* config/darwin.h: define __PIC__
* config/rs6000/darwin.h: Add SUBTARGET_OS_CPP_BUILTINS to
TARGET_OS_CPP_BUILTINS macro.
2005-08-24 Paolo Bonzini <bonzini@gnu.org>
* config/rs6000/rs6000.md: Fix thinko in the peephole2 I added
......
......@@ -140,6 +140,14 @@ Boston, MA 02110-1301, USA. */
{ "-unexported_symbols_list", "-Zunexported_symbols_list" }, \
SUBTARGET_OPTION_TRANSLATE_TABLE
#define SUBTARGET_OS_CPP_BUILTINS() \
do \
{ \
if (flag_pic) \
builtin_define ("__PIC__"); \
} \
while (0)
/* These compiler options take n arguments. */
#undef WORD_SWITCH_TAKES_ARG
......
......@@ -55,6 +55,7 @@
builtin_define ("__POWERPC__"); \
builtin_define ("__NATURAL_ALIGNMENT__"); \
darwin_cpp_builtins (pfile); \
SUBTARGET_OS_CPP_BUILTINS (); \
} \
while (0)
......
/* { dg-do run { target "i?86-*-*-darwin" powerpc*-*-darwin* } } */
/* { dg-options "-fPIC" } */
#if defined __PIC__
int main() {
return 0;
}
#else
error "NO __PIC__ DEFINED"
#endif
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