# FIXME:
# This project use clobber list to save and load registers, including the frame pointer register on the most architectures.
# But if the fp is used by compiler, you will get a compilation error like this:
#
# 	g++ -ggdb -fpermissive -fdeclone-ctor-dtor -pipe -Wno-error -fstack-protector-strong --param=ssp-buffer-size=4 -fexceptions -ggdb -fira-loop-pressure -fira-hoist-pressure -specs=/usr/lib/gcc/specs/hardened-cc1 -O2 -fno-omit-frame-pointer -flto=auto -mabi=lp64d -mno-strict-align -march=la64v1.0 -mtune=la664 -D_GLIBCXX_ASSERTIONS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -shared -Wl,-O1,--sort-common,--as-needed -Wl,-build-id=sha1 -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/gcc/specs/hardened-ld -flto -fuse-linker-plugin -ggdb -fpermissive -fdeclone-ctor-dtor -pipe -Wno-error -fstack-protector-strong --param=ssp-buffer-size=4 -fexceptions -ggdb -fira-loop-pressure -fira-hoist-pressure -specs=/usr/lib/gcc/specs/hardened-cc1 -O2 -fno-omit-frame-pointer -flto=auto -mabi=lp64d -mno-strict-align -march=la64v1.0 -mtune=la664 -D_GLIBCXX_ASSERTIONS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 build/temp.linux-loongarch64-cpython-310/src/greenlet/greenlet.o -L/usr/lib -o build/lib.linux-loongarch64-cpython-310/greenlet/_greenlet.cpython-310.so
# 	src/greenlet/platform/switch_loongarch64_linux.h: In function ‘slp_switch’:
# 	src/greenlet/platform/switch_loongarch64_linux.h:29:1: error: $r22 cannot be used in ‘asm’ here
# 	29 | }
# 	   | ^
# 	src/greenlet/platform/switch_loongarch64_linux.h:29:1: error: $r22 cannot be used in ‘asm’ here
# 	make: *** [/tmp/ccA6nAV4.mk:2: /tmp/ccIIos8L.ltrans0.ltrans.o] Error 1
#
# Add '-fomit-frame-pointer' flag so that the compiler may omit frame pointer in slp_switch() to fix this issue
# See https://github.com/python-greenlet/greenlet/pull/257 for further information.
export CXXFLAGS+=" -fomit-frame-pointer"
