[PATCH mig] tests: preprocess .defs with target compiler, not host cpp

Paulo Duarte <[email protected]>
Newsgroups gmane.os.hurd.bugs
Message-ID <[email protected]>
run_mig used bare cpp, so cross-test preprocessing saw host
macros, not the target's.  Switch to "$CC -E -x c" -- matches
mig.in's production preprocessing.
---
 tests/test_lib.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test_lib.sh b/tests/test_lib.sh
index 43ef738..7cbe639 100644
--- a/tests/test_lib.sh
+++ b/tests/test_lib.sh
@@ -38,7 +38,7 @@ run_mig () {
   file="$1"
   module="$2"
   echo "Generating stubs for $module..."
-  cpp $file -I$TEST_DIR | $MIGCOM -server $module-server.c -user $module-user.c -header $module-header.h
+  ${CC:-cc} -E -x c $file -I$TEST_DIR | $MIGCOM -server $module-server.c -user $module-user.c -header $module-header.h
 }
 
 test_module () {
-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.