--- tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro.orig	2015-07-05 12:53:46.000000000 -0700
+++ tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro	2015-07-05 12:53:25.000000000 -0700
@@ -7,10 +7,10 @@
 load(qt)

 i386.target = good.i386.dylib
-i386.commands = $(CXX) $(CXXFLAGS) -shared -arch i386 -o $@ -I$(INCPATH) $<
+i386.commands = $(CXX) $(filter-out -arch i386 x86_64,$(CXXFLAGS)) -shared -arch i386 -o $@ -I$(INCPATH) $<
 i386.depends += $$PWD/../fakeplugin.cpp
 x86_64.target = good.x86_64.dylib
-x86_64.commands = $(CXX) $(CXXFLAGS) -shared -arch x86_64 -o $@ -I$(INCPATH) $<
+x86_64.commands = $(CXX) $(filter-out -arch i386 x86_64,$(CXXFLAGS)) -shared -arch x86_64 -o $@ -I$(INCPATH) $<
 x86_64.depends += $$PWD/../fakeplugin.cpp

 # Current Mac OS X toolchains have no compiler for PPC anymore