67 lines
2.6 KiB
Plaintext
67 lines
2.6 KiB
Plaintext
remove -O3 and -march=native optimizations
|
|
fix man directory
|
|
disable wayland
|
|
|
|
Index: setup.py
|
|
--- setup.py.orig
|
|
+++ setup.py
|
|
@@ -318,7 +318,6 @@ def init_env(
|
|
df += ' -Og'
|
|
float_conversion = '-Wfloat-conversion'
|
|
fortify_source = '' if sanitize and is_macos else '-D_FORTIFY_SOURCE=2'
|
|
- optimize = df if debug or sanitize else '-O3'
|
|
sanitize_args = get_sanitize_args(cc, ccver) if sanitize else set()
|
|
cppflags_ = os.environ.get(
|
|
'OVERRIDE_CPPFLAGS', '-D{}DEBUG'.format('' if debug else 'N'),
|
|
@@ -332,12 +331,11 @@ def init_env(
|
|
werror = '' if ignore_compiler_warnings else '-pedantic-errors -Werror'
|
|
std = '' if is_openbsd else '-std=c11'
|
|
sanitize_flag = ' '.join(sanitize_args)
|
|
- march = '-march=native' if native_optimizations else ''
|
|
cflags_ = os.environ.get(
|
|
'OVERRIDE_CFLAGS', (
|
|
f'-Wextra {float_conversion} -Wno-missing-field-initializers -Wall -Wstrict-prototypes {std}'
|
|
- f' {werror} {optimize} {sanitize_flag} -fwrapv {stack_protector} {missing_braces}'
|
|
- f' -pipe {march} -fvisibility=hidden {fortify_source}'
|
|
+ f' {werror} {sanitize_flag} -fwrapv {stack_protector} {missing_braces}'
|
|
+ f' -pipe -fvisibility=hidden {fortify_source}'
|
|
)
|
|
)
|
|
cflags = shlex.split(cflags_) + shlex.split(
|
|
@@ -345,7 +343,7 @@ def init_env(
|
|
)
|
|
ldflags_ = os.environ.get(
|
|
'OVERRIDE_LDFLAGS',
|
|
- '-Wall ' + ' '.join(sanitize_args) + ('' if debug else ' -O3')
|
|
+ '-Wall ' + ' '.join(sanitize_args)
|
|
)
|
|
ldflags = shlex.split(ldflags_)
|
|
ldflags.append('-shared')
|
|
@@ -736,7 +734,7 @@ def find_c_files() -> Tuple[List[str], List[str]]:
|
|
|
|
|
|
def compile_glfw(compilation_database: CompilationDatabase) -> None:
|
|
- modules = 'cocoa' if is_macos else 'x11 wayland'
|
|
+ modules = 'cocoa' if is_macos else 'x11'
|
|
for module in modules.split():
|
|
try:
|
|
genv = glfw.init_env(env, pkg_config, pkg_version, at_least_version, test_compile, module)
|
|
@@ -846,8 +844,6 @@ def build_launcher(args: Options, launcher_dir: str =
|
|
cflags.append('-g')
|
|
if args.profile:
|
|
libs.append('-lprofiler')
|
|
- else:
|
|
- cflags.append('-O3')
|
|
if bundle_type.endswith('-freeze'):
|
|
cppflags.append('-DFOR_BUNDLE')
|
|
cppflags.append(f'-DPYVER="{sysconfig.get_python_version()}"')
|
|
@@ -889,7 +885,7 @@ def build_launcher(args: Options, launcher_dir: str =
|
|
|
|
|
|
def copy_man_pages(ddir: str) -> None:
|
|
- mandir = os.path.join(ddir, 'share', 'man')
|
|
+ mandir = os.path.join(ddir, 'man')
|
|
safe_makedirs(mandir)
|
|
man_levels = '15'
|
|
with suppress(FileNotFoundError):
|