Unverified Commit 0bb580ca authored by LIN, Jian's avatar LIN, Jian Committed by GitHub
Browse files

emacs: remove native-comp-….patch from Emacs<30 (#513062)

parents 1ffc4492 145e7552
Loading
Loading
Loading
Loading
+22 −30
Original line number Diff line number Diff line
@@ -166,14 +166,7 @@ stdenv.mkDerivation (finalAttrs: {
  patches =
    patches fetchpatch
    ++ lib.optionals withNativeCompilation [
      (replaceVars
        (
          if lib.versionOlder finalAttrs.version "30" then
            ./native-comp-driver-options.patch
          else
            ./native-comp-driver-options-30.patch
        )
        {
      (replaceVars ./native-comp-driver-options-30.patch {
        backendPath = (
          lib.concatStringsSep " " (
            map (x: ''"-B${x}"'') (
@@ -195,8 +188,7 @@ stdenv.mkDerivation (finalAttrs: {
            )
          )
        );
        }
      )
      })
    ];

  postPatch = lib.concatStringsSep "\n" [
+0 −19
Original line number Diff line number Diff line
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 2c9b79334b..50c6b5ac85 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -178,8 +178,9 @@ native-comp-compiler-options
   :type '(repeat string)
   :version "28.1")
 
-(defcustom native-comp-driver-options (when (eq system-type 'darwin)
-                                        '("-Wl,-w"))
+(defcustom native-comp-driver-options (append (when (eq system-type 'darwin)
+                                                '("-Wl,-w"))
+                                              '(@backendPath@))
   "Options passed verbatim to the native compiler's back-end driver.
 Note that not all options are meaningful; typically only the options
 affecting the assembler and linker are likely to be useful.
-- 
2.37.3