OSDN Git Service

2006-09-08 Eric Christopher <echristo@apple.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.misc-tests / linkage.exp
index 6617023..a080521 100644 (file)
@@ -4,15 +4,15 @@
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 # This file used to be gcc.c-torture/special/special.exp, which
 # was written by Rob Savoye. (rob@cygnus.com)
@@ -73,7 +73,14 @@ if [isnative] then {
            } elseif [ string match "*32-bit*" $file_string ] {
                set native_cflags "-m32"
            }
-       }
+        } elseif [istarget "*-*-darwin*"] {
+            set file_string [exec file "linkage-x.o"]
+            if [ string match "*64-bit*" $file_string ] {
+                set native_cflags "-m64"
+            } elseif [ string match "*32-bit*" $file_string ] {
+                set native_cflags "-m32"
+            }
+        }
 
        if [file exists "linkage-y.o"] then {
            file delete "linkage-y.o"