Skip to content

Commit

Permalink
Get monotonic.h to build on older linux distros
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Nov 27, 2019
1 parent e106dcc commit 804f72b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,14 @@ def init_env(
cppflags = shlex.split(cppflags)
for el in extra_logging:
cppflags.append('-DDEBUG_{}'.format(el.upper().replace('-', '_')))
# gnu11 is needed to get monotonic.h to build on older Linux distros
std = 'c' if is_macos or ccver[0] >= 5 else 'gnu'
cflags = os.environ.get(
'OVERRIDE_CFLAGS', (
'-Wextra {} -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11'
'-Wextra {} -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std={}11'
' -pedantic-errors -Werror {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden'
).format(
float_conversion,
float_conversion, std,
optimize,
' '.join(sanitize_args),
stack_protector,
Expand Down

0 comments on commit 804f72b

Please sign in to comment.