aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.misc-tests/linkage.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.misc-tests/linkage.exp')
-rw-r--r--gcc/testsuite/gcc.misc-tests/linkage.exp15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/testsuite/gcc.misc-tests/linkage.exp b/gcc/testsuite/gcc.misc-tests/linkage.exp
index 6617023..a080521 100644
--- a/gcc/testsuite/gcc.misc-tests/linkage.exp
+++ b/gcc/testsuite/gcc.misc-tests/linkage.exp
@@ -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"