Thanks for looking into this. On python3, can we make sure if we are looking into right output file?
From your pasted output on Python3, I do see, there is -O2 but I see from next command the query is against test.so file which seems incorrect. From the compilation output, the file name when python3 is used is test.cpython-38-aarch64-linux-gnu.so.
Thanks for looking into this. On python3, can we make sure if we are looking into right output file?
From your pasted output on Python3, I do see, there is -O2 but I see from next command the query is against test.so file which seems incorrect. From the compilation output, the file name when python3 is used is test.cpython- 38-aarch64- linux-gnu. so.
On my machine (Ubuntu 20.04) with Python3:- ip-172- 31-18-56: ~/test$ python3 setup.py build_ext --inplace linux-aarch64- 3.8 linux-gnu- gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack- protector- strong -Wformat -Werror= format- security -g -fwrapv -O2 -g -fstack- protector- strong -Wformat -Werror= format- security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/ include/ python3. 8 -c testmodule.c -o build/temp. linux-aarch64- 3.8/testmodule. o linux-aarch64- 3.8 linux-gnu- gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic- functions -Wl,-Bsymbolic- functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-Bsymbolic- functions -Wl,-z,relro -g -fwrapv -O2 -g -fstack- protector- strong -Wformat -Werror= format- security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp. linux-aarch64- 3.8/testmodule. o -o build/lib. linux-aarch64- 3.8/test. cpython- 38-aarch64- linux-gnu. so linux-aarch64- 3.8/test. cpython- 38-aarch64- linux-gnu. so -> ip-172- 31-18-56: ~/test$ strings test.cpython- 38-aarch64- linux-gnu. so | grep -- -O protector- strong -fwrapv -fstack- protector- strong -fPIC -fasynchronous- unwind- tables -fstack- protector- strong -fstack- clash-protectio n
ubuntu@
running build_ext
building 'test' extension
creating build
creating build/temp.
aarch64-
creating build/lib.
aarch64-
copying build/lib.
ubuntu@
GNU C17 9.4.0 -mlittle-endian -mabi=lp64 -g -g -g -g -O2 -O2 -fstack-