File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,13 @@ matrix:
7272 packages :
7373 - astyle
7474
75+ # Check public symbols of dynamic libraries
76+ - env : BUILDOPTIONS='--symbols'
77+ addons :
78+ apt :
79+ packages :
80+ - libtool-bin
81+
7582 # Run always with valgrind (no sanitizer, but debug info)
7683 - env : COMPILE_DEBUG=1 BUILDOPTIONS='--with-cc=gcc-4.9 --with-m64 --with-valgrind'
7784 addons :
Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ VALGRIND_OPTS=" --leak-check=full --show-leak-kinds=all --error-exitcode=1 "
195195# VALGRIND_OPTS=""
196196VALGRIND_BIN=" "
197197CHECK_FORMAT=" "
198+ CHECK_SYMBOLS=" "
198199C89=" "
199200C89_C99_ROUNDTRIP=" "
200201TUNE_CMD=" ./etc/tune -t -r 10 -L 3"
276277 --format)
277278 CHECK_FORMAT=" 1"
278279 ;;
280+ --symbols)
281+ CHECK_SYMBOLS=" 1"
282+ ;;
279283 --all)
280284 COMPILERS=" gcc clang"
281285 ARCHFLAGS=" -m64 -m32 -mx32"
@@ -309,6 +313,25 @@ then
309313 exit $?
310314fi
311315
316+ if [[ " $CHECK_SYMBOLS " == " 1" ]]
317+ then
318+ make -f makefile.shared
319+ cat << EOF
320+
321+
322+ The following list shows the discrepancy between
323+ the shared library and the Windows dynamic library.
324+ To fix this error, one of the following things
325+ has to be done:
326+ * the script which generates tommath.def has to be modified
327+ (function generate_def() in helper.pl).
328+ * The exported symbols are really different for some reason
329+ This has to be manually investigated.
330+
331+ EOF
332+ exit $( comm -3 <( nm -D --defined-only .libs/libtommath.so | cut -d' ' -f3 | grep -v ' ^_' | sort) <( tail -n+9 tommath.def | tr -d ' ' | sort) | tee /dev/tty | wc -l)
333+ fi
334+
312335if [[ " $CHECK_FORMAT " == " 1" ]]
313336then
314337 make astyle
You can’t perform that action at this time.
0 commit comments