Ticket #60165: remove_-rpath_on_Tiger.patch
File remove_-rpath_on_Tiger.patch, 6.1 KB (added by ballapete (Peter "Pete" Dyballa), 4 years ago) |
---|
-
mesonbuild/modules/gnome.py
old new 277 277 if isinstance(lib, build.SharedLibrary): 278 278 libdir = os.path.join(state.environment.get_build_dir(), state.backend.get_target_dir(lib)) 279 279 link_command.append('-L' + libdir) 280 if include_rpath:281 link_command.append('-Wl,-rpath,' + libdir)282 280 depends.append(lib) 283 281 # Needed for the following binutils bug: 284 282 # https://github.com/mesonbuild/meson/issues/1911 … … 287 285 for d in state.backend.determine_rpath_dirs(lib): 288 286 d = os.path.join(state.environment.get_build_dir(), d) 289 287 link_command.append('-L' + d) 290 if include_rpath:291 link_command.append('-Wl,-rpath,' + d)292 288 if use_gir_args and self._gir_has_option('--extra-library'): 293 289 link_command.append('--extra-library=' + lib.name) 294 290 else: … … 345 341 getattr(dep, 'is_libtool', False)): 346 342 lib_dir = os.path.dirname(lib) 347 343 external_ldflags.update(["-L%s" % lib_dir]) 348 if include_rpath:349 external_ldflags.update(['-Wl,-rpath {}'.format(lib_dir)])350 344 libname = os.path.basename(lib) 351 345 if libname.startswith("lib"): 352 346 libname = libname[3:] -
mesonbuild/linkers.py
old new 678 678 is_shared_module: bool) -> T.List[str]: 679 679 if is_shared_module: 680 680 return [] 681 install_name = ['@ rpath/', prefix, shlib_name]681 install_name = ['@loader_path/', prefix, shlib_name] 682 682 if soversion is not None: 683 683 install_name.append('.' + soversion) 684 684 install_name.append('.dylib') … … 704 704 for rp in all_paths: 705 705 args.extend(self._apply_prefix('-rpath,' + rp)) 706 706 707 return (args, set())707 return [] 708 708 709 709 710 710 class GnuDynamicLinker(GnuLikeDynamicLinkerMixin, PosixDynamicLinkerMixin, DynamicLinker): -
mesonbuild/backend/ninjabackend.py
old new 1554 1554 # now have them. Once slashes are forbidden, remove this bit. 1555 1555 target_slashname_workaround_dir = os.path.join(os.path.dirname(target.name), 1556 1556 self.get_target_dir(target)) 1557 else:1558 target_slashname_workaround_dir = self.get_target_dir(target)1559 (rpath_args, target.rpath_dirs_to_remove) = \1560 rustc.build_rpath_args(self.environment,1561 self.environment.get_build_dir(),1562 target_slashname_workaround_dir,1563 self.determine_rpath_dirs(target),1564 target.build_rpath,1565 target.install_rpath)1566 # ... but then add rustc's sysroot to account for rustup1567 # installations1568 for rpath_arg in rpath_args:1569 args += ['-C', 'link-arg=' + rpath_arg + ':' + os.path.join(rustc.get_sysroot(), 'lib')]1557 # else: 1558 # target_slashname_workaround_dir = self.get_target_dir(target) 1559 # (rpath_args, target.rpath_dirs_to_remove) = \ 1560 # rustc.build_rpath_args(self.environment, 1561 # self.environment.get_build_dir(), 1562 # target_slashname_workaround_dir, 1563 # self.determine_rpath_dirs(target), 1564 # target.build_rpath, 1565 # target.install_rpath) 1566 # # ... but then add rustc's sysroot to account for rustup 1567 # # installations 1568 # for rpath_arg in rpath_args: 1569 # args += ['-C', 'link-arg=' + rpath_arg + ':' + os.path.join(rustc.get_sysroot(), 'lib')] 1570 1570 compiler_name = self.get_compiler_rule_name('rust', target.for_machine) 1571 1571 element = NinjaBuildElement(self.all_outputs, target_name, compiler_name, main_rust_file) 1572 1572 if len(orderdeps) > 0: … … 2776 2776 target_slashname_workaround_dir = os.path.join( 2777 2777 os.path.dirname(target.name), 2778 2778 self.get_target_dir(target)) 2779 else:2780 target_slashname_workaround_dir = self.get_target_dir(target)2781 (rpath_args, target.rpath_dirs_to_remove) = \2782 linker.build_rpath_args(self.environment,2783 self.environment.get_build_dir(),2784 target_slashname_workaround_dir,2785 self.determine_rpath_dirs(target),2786 target.build_rpath,2787 target.install_rpath)2788 commands += rpath_args2779 # else: 2780 # target_slashname_workaround_dir = self.get_target_dir(target) 2781 # (rpath_args, target.rpath_dirs_to_remove) = \ 2782 # linker.build_rpath_args(self.environment, 2783 # self.environment.get_build_dir(), 2784 # target_slashname_workaround_dir, 2785 # self.determine_rpath_dirs(target), 2786 # target.build_rpath, 2787 # target.install_rpath) 2788 # commands += rpath_args 2789 2789 # Add libraries generated by custom targets 2790 2790 custom_target_libraries = self.get_custom_target_provided_libraries(target) 2791 2791 commands += extra_args