2010-05-31 Kai Tietz <kai.tietz@onevision.com>
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 31 May 2010 14:06:41 +0000 (14:06 +0000)
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 31 May 2010 14:06:41 +0000 (14:06 +0000)
PR target/44161
* config/i386/cygming.h (SUBTARGET_OVERRIDE_OPTIONS): Handle
flag_pic.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160070 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/cygming.h

index c1b62ce..21e4530 100644 (file)
@@ -1,3 +1,9 @@
+2010-05-31  Kai Tietz  <kai.tietz@onevision.com>
+
+       PR target/44161
+       * config/i386/cygming.h (SUBTARGET_OVERRIDE_OPTIONS): Handle
+       flag_pic.
+
 2010-05-31  Eric Botcazou  <ebotcazou@adacore.com>
 
        * cgraphunit.c (cgraph_decide_is_function_needed): Really return false
index 71a5d8d..999cb6e 100644 (file)
@@ -152,7 +152,15 @@ union tree_node;
 #undef  SUBTARGET_OVERRIDE_OPTIONS
 #define SUBTARGET_OVERRIDE_OPTIONS                                     \
 do {                                                                   \
-  if (flag_pic)                                                                \
+  if (TARGET_64BIT && flag_pic != 1)                                   \
+    {                                                                  \
+      if (flag_pic > 1)                                                        \
+        warning (0,                                                    \
+                "-fPIC ignored for target (all code is position independent)"\
+                 );                                                    \
+      flag_pic = 1;                                                    \
+    }                                                                  \
+  else if (!TARGET_64BIT && flag_pic)                                  \
     {                                                                  \
       warning (0, "-f%s ignored for target (all code is position independent)",\
               (flag_pic > 1) ? "PIC" : "pic");                         \