From 6dadbd89976883cce62b7ed9a356112043bc362c Mon Sep 17 00:00:00 2001 From: Jade Abraham Date: Tue, 3 Dec 2024 15:33:31 -0800 Subject: [PATCH] fix compopts for old python Signed-off-by: Jade Abraham --- test/library/packages/Python/COMPOPTS | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/library/packages/Python/COMPOPTS b/test/library/packages/Python/COMPOPTS index 14f4d0dc9092..220078b739c6 100755 --- a/test/library/packages/Python/COMPOPTS +++ b/test/library/packages/Python/COMPOPTS @@ -12,4 +12,9 @@ PYTHON_INCLUDE_DIR=$($chpl_python -c "import sysconfig; print(sysconfig.get_path PYTHON_LIB_DIR=$($chpl_python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))") PYTHON_LDVERSION=$($chpl_python -c "import sysconfig; print(sysconfig.get_config_var('LDVERSION'))") -echo "--ccflags -isystem$PYTHON_INCLUDE_DIR -L$PYTHON_LIB_DIR --ldflags -Wl,-rpath,$PYTHON_LIB_DIR -lpython$PYTHON_LDVERSION" +DISABLE_WARNINGS="" +# some older python's don't use `#ifndef` when they should +# so we disable redefintion warnings for clean testing +DISABLE_WARNINGS+="--ccflags -Wno-macro-redefined" + +echo "--ccflags -isystem$PYTHON_INCLUDE_DIR -L$PYTHON_LIB_DIR --ldflags -Wl,-rpath,$PYTHON_LIB_DIR -lpython$PYTHON_LDVERSION $DISABLE_WARNINGS"