From e7a70b05af97adc28ae2845c2ed19f05df06deb2 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Mon, 26 Sep 2011 16:11:28 -0700 Subject: [PATCH] Fix statically-linked tests on Linux --- run_tests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run_tests.py b/run_tests.py index 007f1381..c1581a56 100755 --- a/run_tests.py +++ b/run_tests.py @@ -17,6 +17,7 @@ import random import string import mutex import subprocess +import platform parser = OptionParser() parser.add_option("-r", "--random-shuffle", dest="random", help="Randomly order tests", @@ -137,8 +138,10 @@ def run_tasks_from_queue(queue): gcc_arch = '-m32' else: gcc_arch = '-m64' - gcc_cmd = "g++ -Wl,-no_pie %s test_static.cpp -DTEST_SIG=%d %s.o -o %s" % \ + gcc_cmd = "g++ %s test_static.cpp -DTEST_SIG=%d %s.o -o %s" % \ (gcc_arch, match, filename, exe_name) + if platform.system() == 'Darwin': + gcc_cmd += ' -Wl,-no_pie' if should_fail: gcc_cmd += " -DEXPECT_FAILURE"