From af716bbf8a0443191e3ccc69aa86feb2773bc0d6 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Mon, 26 Aug 2024 17:10:34 +0200 Subject: [PATCH] Remove meson patch It was just Sulong hacks --- .../patches/meson/meson-1.0.0.patch | 92 ------------------- .../patches/meson/metadata.toml | 6 -- 2 files changed, 98 deletions(-) delete mode 100644 graalpython/lib-graalpython/patches/meson/meson-1.0.0.patch diff --git a/graalpython/lib-graalpython/patches/meson/meson-1.0.0.patch b/graalpython/lib-graalpython/patches/meson/meson-1.0.0.patch deleted file mode 100644 index b4d263ece8..0000000000 --- a/graalpython/lib-graalpython/patches/meson/meson-1.0.0.patch +++ /dev/null @@ -1,92 +0,0 @@ -diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py -index 367bcf9..3c5faa3 100644 ---- a/mesonbuild/compilers/detect.py -+++ b/mesonbuild/compilers/detect.py -@@ -56,7 +56,7 @@ if is_windows(): - defaults['c'] = ['icl', 'cl', 'cc', 'gcc', 'clang', 'clang-cl', 'pgcc'] - # There is currently no pgc++ for Windows, only for Mac and Linux. - defaults['cpp'] = ['icl', 'cl', 'c++', 'g++', 'clang++', 'clang-cl'] -- defaults['fortran'] = ['ifort', 'gfortran', 'flang', 'pgfortran', 'g95'] -+ defaults['fortran'] = ['ifort', 'gfortran', 'flang-new', 'flang', 'pgfortran', 'g95'] - # Clang and clang++ are valid, but currently unsupported. - defaults['objc'] = ['cc', 'gcc'] - defaults['objcpp'] = ['c++', 'g++'] -@@ -72,7 +72,7 @@ else: - defaults['cpp'] = ['c++', 'g++', 'clang++', 'nvc++', 'pgc++', 'icpc', 'icpx'] - defaults['objc'] = ['cc', 'gcc', 'clang'] - defaults['objcpp'] = ['c++', 'g++', 'clang++'] -- defaults['fortran'] = ['gfortran', 'flang', 'nvfortran', 'pgfortran', 'ifort', 'ifx', 'g95'] -+ defaults['fortran'] = ['gfortran', 'flang-new', 'flang', 'nvfortran', 'pgfortran', 'ifort', 'ifx', 'g95'] - defaults['cs'] = ['mcs', 'csc'] - defaults['d'] = ['ldc2', 'ldc', 'gdc', 'dmd'] - defaults['java'] = ['javac'] -@@ -743,6 +743,14 @@ def detect_fortran_compiler(env: 'Environment', for_machine: MachineChoice) -> C - compiler, version, for_machine, is_cross, info, exe_wrap, - full_version=full_version, linker=linker) - -+ if 'flang-new' in out: -+ cls = fortran.FlangNewFortranCompiler -+ linker = guess_nix_linker(env, -+ compiler, cls, version, for_machine) -+ return cls( -+ compiler, version, for_machine, is_cross, info, -+ exe_wrap, full_version=full_version, linker=linker) -+ - if 'flang' in out or 'clang' in out: - cls = fortran.FlangFortranCompiler - linker = guess_nix_linker(env, -diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py -index 90ca010..1b01913 100644 ---- a/mesonbuild/compilers/fortran.py -+++ b/mesonbuild/compilers/fortran.py -@@ -544,3 +544,50 @@ class NAGFortranCompiler(FortranCompiler): - - def openmp_flags(self) -> T.List[str]: - return ['-openmp'] -+ -+ -+class FlangNewFortranCompiler(ClangCompiler, FortranCompiler): -+ -+ id = 'flang-new' -+ -+ def __init__(self, exelist: T.List[str], version: str, for_machine: MachineChoice, is_cross: bool, -+ info: 'MachineInfo', exe_wrapper: T.Optional['ExternalProgram'] = None, -+ linker: T.Optional['DynamicLinker'] = None, -+ full_version: T.Optional[str] = None): -+ FortranCompiler.__init__(self, exelist, version, for_machine, -+ is_cross, info, exe_wrapper, linker=linker, -+ full_version=full_version) -+ ClangCompiler.__init__(self, {}) -+ default_warn_args = ['-Wall'] -+ self.warn_args = {'0': [], -+ '1': default_warn_args, -+ '2': default_warn_args + ['-Wextra'], -+ '3': default_warn_args + ['-Wextra', '-pedantic', '-fimplicit-none'], -+ 'everything': default_warn_args + ['-Wextra', '-pedantic', '-fimplicit-none']} -+ -+ def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: -+ args = [] -+ key = OptionKey('std', machine=self.for_machine, lang=self.language) -+ std = options[key] -+ if std.value != 'none': -+ args.append('-std=' + std.value) -+ return args -+ -+ def get_module_outdir_args(self, path: str) -> T.List[str]: -+ return ['-module-dir', path] -+ -+ def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]: -+ # Disabled until this is fixed: -+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62162 -+ # return ['-cpp', '-MD', '-MQ', outtarget] -+ return [] -+ -+ def language_stdlib_only_link_flags(self, env: 'Environment') -> T.List[str]: -+ # We need to apply the search prefix here, as these link arguments may -+ # be passed to a different compiler with a different set of default -+ # search paths, such as when using Clang for C/C++ and gfortran for -+ # fortran, -+ search_dirs: T.List[str] = [] -+ for d in self.get_compiler_dirs(env, 'libraries'): -+ search_dirs.append(f'-L{d}') -+ return search_dirs + ['-lm'] diff --git a/graalpython/lib-graalpython/patches/meson/metadata.toml b/graalpython/lib-graalpython/patches/meson/metadata.toml index 4ab3818206..afdf080d80 100644 --- a/graalpython/lib-graalpython/patches/meson/metadata.toml +++ b/graalpython/lib-graalpython/patches/meson/metadata.toml @@ -1,8 +1,2 @@ [[rules]] -version = '== 1.0.0' -patch = 'meson-1.0.0.patch' -license = 'Apache-2.0' - -[[rules]] -install-priority = 10 version = '== 1.2.2'