remove -O3 and -march=native optimizations fix man directory disable wayland, libcrypto Index: setup.py --- setup.py.orig +++ setup.py @@ -355,7 +355,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'), @@ -369,12 +368,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( @@ -382,7 +380,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') @@ -761,7 +759,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) @@ -892,8 +890,6 @@ def build_launcher(args: Options, launcher_dir: str = cflags.append('-g') if args.profile: libs.append('-lprofiler') - else: - cflags.append('-g3' if args.debug else '-O3') if bundle_type.endswith('-freeze'): cppflags.append('-DFOR_BUNDLE') cppflags.append(f'-DPYVER="{sysconfig.get_python_version()}"') @@ -940,7 +936,7 @@ def build_launcher(args: Options, launcher_dir: str = # Packaging {{{ 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):