Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
9ddac715
Commit
9ddac715
authored
Jul 22, 2018
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace GCC's attribute optimize("Os") by the better supported and similar (cold).
Closes #2494.
parent
27f6c580
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
CHANGES.rst
CHANGES.rst
+4
-0
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+2
-3
No files found.
CHANGES.rst
View file @
9ddac715
...
@@ -57,6 +57,10 @@ Bugs fixed
...
@@ -57,6 +57,10 @@ Bugs fixed
exception
stack
traces
.
exception
stack
traces
.
Patch
by
Jeroen
Demeyer
.
(
Github
issue
#
2492
)
Patch
by
Jeroen
Demeyer
.
(
Github
issue
#
2492
)
*
The
discouraged
usage
of
GCC
's attribute ``optimize("Os")`` was replaced by the
similar attribute ``cold`` to reduce the code impact of the module init functions.
(Github issue #2494)
Other changes
Other changes
-------------
-------------
...
...
Cython/Utility/ModuleSetupCode.c
View file @
9ddac715
...
@@ -677,9 +677,8 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
...
@@ -677,9 +677,8 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
#ifndef CYTHON_SMALL_CODE
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
#if defined(__clang__)
#define CYTHON_SMALL_CODE
#define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (!(defined(__cplusplus)) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4)))
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
// At least g++ 4.4.7 can generate crashing code with this option. (GH #2235)
#define CYTHON_SMALL_CODE __attribute__((cold))
#define CYTHON_SMALL_CODE __attribute__((optimize("Os")))
#else
#else
#define CYTHON_SMALL_CODE
#define CYTHON_SMALL_CODE
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment