python27: fix build with gcc15
- add " -std=gnu17" to `env.NIX_CFLAGS_COMPILE`
Fixes build failure with gcc15:
```
In file included from Include/Python-ast.h:3,
from Python/bltinmodule.c:4:
Include/asdl.h:9:15: error: cannot use keyword 'false' as enumeration constant
9 | typedef enum {false, true} bool;
| ^~~~~
Include/asdl.h:9:15: note: 'false' is a keyword with '-std=c23' onwards
Include/asdl.h:9:28: error: expected ';', identifier or '(' before 'bool'
9 | typedef enum {false, true} bool;
| ^~~~
Include/asdl.h:9:28: warning: useless type name in empty declaration
In file included from Include/Python-ast.h:3,
from Python/compile.c:26:
Include/asdl.h:9:15: error: cannot use keyword 'false' as enumeration constant
9 | typedef enum {false, true} bool;
| ^~~~~
Include/asdl.h:9:15: note: 'false' is a keyword with '-std=c23' onwards
Include/asdl.h:9:28: error: expected ';', identifier or '(' before 'bool'
9 | typedef enum {false, true} bool;
| ^~~~
```
This commit is contained in:
@@ -319,7 +319,8 @@ stdenv.mkDerivation (
|
||||
|
||||
env.NIX_CFLAGS_COMPILE =
|
||||
lib.optionalString (stdenv.targetPlatform.system == "x86_64-darwin") "-msse2"
|
||||
+ lib.optionalString stdenv.hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000";
|
||||
+ lib.optionalString stdenv.hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000"
|
||||
+ " -std=gnu17";
|
||||
DETERMINISTIC_BUILD = 1;
|
||||
|
||||
setupHook = python-setup-hook sitePackages;
|
||||
|
||||
Reference in New Issue
Block a user