Remove-unused-LLVM-and-Rust-build-dependencies.patch 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. Description: Remove unused LLVM and Rust build dependencies
  2. Since the Javascript engine is normally part of Firefox, its build
  3. system has dependencies on the LLVM and Rust toolchains. This limits
  4. the number of architectures which mozjs68 can be built on.
  5. .
  6. It turns out, however, that neither LLVM nor Rust are used when mozjs68
  7. is being built and these build dependencies are therefore not necessary.
  8. .
  9. This patch removes them and allows mozjs68 to be built on any architecture.
  10. .
  11. Author: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
  12. Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959144
  13. Forwarded: no
  14. Last-Update: 2020-04-30
  15. Index: mozjs68-68.6.0/js/moz.configure
  16. ===================================================================
  17. --- mozjs68-68.6.0.orig/js/moz.configure
  18. +++ mozjs68-68.6.0/js/moz.configure
  19. @@ -18,11 +18,6 @@ def building_js(build_project):
  20. option(env='JS_STANDALONE', default=building_js,
  21. help='Reserved for internal use')
  22. -include('../build/moz.configure/rust.configure',
  23. - when='--enable-compile-environment')
  24. -include('../build/moz.configure/bindgen.configure',
  25. - when='--enable-compile-environment')
  26. -
  27. @depends('JS_STANDALONE')
  28. def js_standalone(value):
  29. if value:
  30. Index: mozjs68-68.6.0/moz.configure
  31. ===================================================================
  32. --- mozjs68-68.6.0.orig/moz.configure
  33. +++ mozjs68-68.6.0/moz.configure
  34. @@ -598,36 +598,6 @@ set_config('MAKENSISU_FLAGS', nsis_flags
  35. check_prog('7Z', ('7z', '7za'), allow_missing=True, when=target_is_windows)
  36. -
  37. -@depends(host_c_compiler, c_compiler, bindgen_config_paths)
  38. -def llvm_objdump(host_c_compiler, c_compiler, bindgen_config_paths):
  39. - clang = None
  40. - for compiler in (host_c_compiler, c_compiler):
  41. - if compiler and compiler.type == 'clang':
  42. - clang = compiler.compiler
  43. - break
  44. - elif compiler and compiler.type == 'clang-cl':
  45. - clang = os.path.join(os.path.dirname(compiler.compiler), 'clang')
  46. - break
  47. -
  48. - if not clang and bindgen_config_paths:
  49. - clang = bindgen_config_paths.clang_path
  50. - llvm_objdump = 'llvm-objdump'
  51. - if clang:
  52. - out = check_cmd_output(clang, '--print-prog-name=llvm-objdump',
  53. - onerror=lambda: None)
  54. - if out:
  55. - llvm_objdump = out.rstrip()
  56. - return (llvm_objdump,)
  57. -
  58. -
  59. -llvm_objdump = check_prog('LLVM_OBJDUMP', llvm_objdump, what='llvm-objdump',
  60. - when='--enable-compile-environment',
  61. - paths=toolchain_search_path)
  62. -
  63. -add_old_configure_assignment('LLVM_OBJDUMP', llvm_objdump)
  64. -
  65. -
  66. # Please do not add configure checks from here on.
  67. # Fallthrough to autoconf-based configure