Skip to content

Commit 5449d44

Browse files
committed
scripts: prevent GCC optimising test symbols in test-symbol-check
1 parent 21438d5 commit 5449d44

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

contrib/devtools/test-symbol-check.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,21 @@ def test_ELF(self):
7373
(1, executable + ': NEEDED library libutil.so.1 is not allowed\n' +
7474
executable + ': failed LIBRARY_DEPENDENCIES'))
7575

76-
# finally, check a conforming file that simply uses a math function
76+
# finally, check a simple conforming binary
7777
source = 'test3.c'
7878
executable = 'test3'
7979
with open(source, 'w', encoding="utf8") as f:
8080
f.write('''
81-
#include <math.h>
81+
#include <stdio.h>
8282
8383
int main()
8484
{
85-
return (int)pow(2.0, 4.0);
85+
printf("42");
86+
return 0;
8687
}
8788
''')
8889

89-
self.assertEqual(call_symbol_check(cc, source, executable, ['-lm']),
90+
self.assertEqual(call_symbol_check(cc, source, executable, []),
9091
(0, ''))
9192

9293
def test_MACHO(self):

0 commit comments

Comments
 (0)