1a2e8d
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
1a2e8d
index 2aeabd2..8b285bb 100644
1a2e8d
--- a/Cython/Utility/ModuleSetupCode.c
1a2e8d
+++ b/Cython/Utility/ModuleSetupCode.c
1a2e8d
@@ -669,7 +669,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
1a2e8d
 #if defined(__clang__)
1a2e8d
     #define CYTHON_SMALL_CODE
1a2e8d
 #elif defined(__GNUC__)
1a2e8d
-    #define CYTHON_SMALL_CODE __attribute__((optimize("Os")))
1a2e8d
+    #define CYTHON_SMALL_CODE __attribute__((cold))
1a2e8d
 #else
1a2e8d
     #define CYTHON_SMALL_CODE
1a2e8d
 #endif