1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00
Commit Graph

1193 Commits

Author SHA1 Message Date
Stefan Kangas
d193801f59 Bump Emacs version to 28.0.91
* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 28.0.91.
2022-01-08 13:09:29 +01:00
Glenn Morris
2684def348 ; Run set-copyright from admin.el 2022-01-01 09:52:06 -08:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Robert Pluim
b7d31d6192 Revert "Remove Motif support"
This reverts commit db237850ab.
2021-12-21 18:39:39 +01:00
Stefan Kangas
740ae2818f Bump Emacs version to 28.0.90
* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 28.0.90.
2021-12-01 17:49:32 +01:00
Philipp Stephani
cc4edea872 Use posix_spawn if possible.
posix_spawn is less error-prone than vfork + execve, and can make
better use of system-specific enhancements like 'clone' on Linux.  Use
it if we don't need to configure a pseudoterminal.

Backported from commit a60053f836.
Unlike that commit, only define USABLE_POSIX_SPAWN on macOS, because
there posix_spawn is much faster than vfork.

Don't merge to master.

* configure.ac (HAVE_SPAWN_H, HAVE_POSIX_SPAWN)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP)
(HAVE_POSIX_SPAWNATTR_SETFLAGS, HAVE_DECL_POSIX_SPAWN_SETSID): New
configuration variables.
* src/callproc.c (USABLE_POSIX_SPAWN): New configuration macro.
(emacs_posix_spawn_init_actions)
(emacs_posix_spawn_init_attributes, emacs_posix_spawn_init): New
helper functions.
(emacs_spawn): Use posix_spawn if possible.

(cherry picked from commit a60053f836)
2021-11-13 16:45:19 +01:00
Ken Brown
6ba4e3b78c Drop support for native compilation on 32-bit Cygwin
* configure.ac (cygwin32-native-compilation): New option.
[i686-pc-cygwin]: Don't allow native compilation unless that
option is specified.  (Bug#50666)
2021-10-31 19:30:25 -04:00
Paul Eggert
18308b739a Tweak recent 'configure' fix
* configure.ac (gt_TYPE_WINT_T): Omit obsolete and
now-overridden definition.
2021-10-05 09:09:22 -07:00
Eli Zaretskii
984eafeb98 Unbreak the build after Gnulib update
* lib/gnulib.mk.in (GNULIBHEADERS_OVERRIDE_WINT_T): Rename from
GNULIB_OVERRIDES_WINT_T.
* configure.ac (GNULIBHEADERS_OVERRIDE_WINT_T): Define.
(Bug#50985)
2021-10-05 15:55:18 +03:00
Eli Zaretskii
2750d97543 Cut the emacs-28 release branch
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 28.0.60.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Update the last released version of Emacs.
2021-09-30 20:05:09 +03:00
Dan Ports
5444f607a6 Use the newest gcc installed by Macports
* configure.ac: There may be more than one gcc version installed
in Macports (bug#50649).  Use the newest.

Copyright-paperwork-exempt: yes
2021-09-18 16:04:38 +02:00
Alan Third
443d37ff21 Fix libgccjit detection on macOS
* configure.ac: Combine the Homebrew and MacPorts detection so they
will not create nonsense flags if both are installed.
2021-09-14 10:08:11 +01:00
Stefan Kangas
0cabf8bc36 ; Fix typos 2021-09-03 13:05:32 +02:00
Lars Ingebrigtsen
31226b0341 Only look for the port command on MacOS
* configure.ac: Only look for the port command on MacOS (bug#50259).
2021-08-30 01:20:30 +02:00
Clément Pit-Claudel
9117a76b53 Change --with-nativecomp to --with-native-compilation in messages
* configure.ac:
* test/infra/Dockerfile.emba:
* test/infra/gitlab-ci.yml: Fix mentions of --with-nativecomp
(bug#50255).
2021-08-29 21:32:01 +02:00
Alan Third
5eab7c3f70 * configure.ac: Make homebrew check for libgccjit match macports. 2021-08-21 13:12:56 +01:00
Grégoire Jadi
23973a5898 Fix freeze on OpenBSD when reading the SECONDARY selection
* configure.ac (NSIG_MINIMUM): OpenBSD doesn't have a broken SIGIO
any more (bug#29170).  Backport fix from the current OpenBSD port
tree.
2021-08-09 14:25:36 +02:00
Lars Ingebrigtsen
8ce7a697ca Allow building on MacOS with MacPorts and libgccjit
* configure.ac: Check for the "port" command (MacPorts).
Add the required lib/include directories for nativecomp.

* src/Makefile.in (LIBGCCJIT_CFLAGS, LIBGCCJIT_LIBS): Split into
two parts to allow including -L/-I for MacPorts.
(LIBES): Adjust.
(EMACS_CFLAGS): Ditto.
2021-08-07 11:56:44 +02:00
Alan Third
a4d2c88cde Simplify macOS drawing code
Convert EmacsSurface into a CALayer subclass so we can use the
built-in relationships.  Also simplify the macOS versioning code.
This will result in more warnings on older versions of macOS but makes
reading the code easier.

* configure.ac: Add QuartzCore framework.
* src/nsterm.h (NS_DRAW_TO_BUFFER): Remove define and all references.
(EmacsSurface, EmacsLayer): Rename EmacsSurface to EmacsLayer and
modify the definition to fit the new function.
* src/nsterm.m (ns_update_begin):
(ns_update_end):
(ns_focus):
(ns_unfocus): Use the new overridden lockFocus and unlockFocus and
simplify the frame management.
([EmacsView dealloc]):
([EmacsView viewDidResize:]):Don't explicitly release surfaces.
([EmacsView initFrameFromEmacs:]): Move the layer code to after the
NSWindow has been created as creating the layer now relies on some of
it's properties.
([EmacsView makeBackingLayer]): New function.
([EmacsView lockFocus]):
([EmacsView focusOnDrawingBuffer]): Rename to lockFocus.
([EmacsView unlockFocus]):
([EmacsView unfocusDrawingBuffer]): Rename to unlockFocus.
([EmacsView windowDidChangeBackingProperties]): Don't explicitly
release surfaces but reset EmacsLayer properties.
([EmacsView layout]):
([EmacsView viewWillDraw]): Rename to layout.
([EmacsView wantsUpdateLayer]): Remove function and change all callers
to [EmacsView wantsLayer].
(EmacsSurface, EmacsLayer): Rename to EmacsLayer.
([EmacsSurface getSize]):
([EmacsSurface initWithSize:ColorSpace:Scale:]): Remove methods.
([EmacsSurface initWithColorSpace:]):
([EmacsLayer checkDimensions]):
([EmacsLayer releaseSurfaces]):
([EmacsLayer display]): New functions.
* src/nsterm.m ([EmacsLayer dealloc]): Use releaseSurfaces.
([EmacsSurface getContext]): Automatically detect frame property
changes and clear the cache if required.  Use built-in CALayer
properties where available.
([EmacsLayer copyContentsTo:]): Use [CALayer contents] as source.
2021-07-31 11:13:05 +01:00
Alan Third
1b88404acc Fix NS self contained eln location (bug#49271)
* Makefile.in:
* configure.ac: Change eln file install location to
Contents/Frameworks.
* src/comp.c (hash_native_abi): Replace dots with underscores in the
eln install location as the macOS code-signing tool won't sign the
files if the parent directories have dots.
2021-07-01 20:41:58 +01:00
Alan Third
995ab9d0a9 Fix NS native comp search path (bug#49270)
* configure.ac (NS_SELF_CONTAINED): We need to make lispdirrel the
same as lispdir when building a self contained app bundle as they're
both relative paths.
2021-07-01 20:41:57 +01:00
Alan Third
ecf7e8b20e Fix NS self-contained build configuration
* configure.ac: When rebuilding epaths.h for NS check that we're
actually doing an NS build first.
2021-06-26 12:48:15 +01:00
Alan Third
5dd2d50f3d Fix NS native compilation builds
* Makefile.in (ns_applibexecdir):
(ns_applibdir):
(ns_appdir): New variables.
(.PHONY): Include new rule.
(epaths-force-ns-self-contained): Remove the app bundle directory from
all paths.
* configure.ac (NS_SELF_CONTAINED): Set the default site-lisp
directory instead of hard-coding it in the ObjC code, and use the new
epaths generating make rule.
* src/callproc.c (init_callproc_1):
(init_callproc): Remove all the NS specific code as the special cases
are now handled by decode_env_path.
* src/emacs.c (load_pdump):
(decode_env_path): Use ns_relocate to find the correct directory after
relocation.
* src/lread.c (load_path_default): Remove all the NS specific code as
the special cases are now handled by decode_env_path.
* src/nsterm.h: Update function definitions.
* src/nsterm.m (ns_etc_directory):
(ns_exec_path):
(ns_load_path): Remove functions that are no longer needed.
(ns_relocate): New function to calculate paths within the NS app
bundle.
* nextstep/Makefile.in (ns_applibexecdir): New variable, and update
anything relying on the libexec location.
2021-06-26 10:34:59 +01:00
Peter Oliver
57ec4aadc6 Advertise support for Startup Notification when built with GTK
* etc/emacsclient.desktop, etc/emacsclient.desktop: Specify
StartupNotify=true.
* configure.ac (USE_STARTUP_NOTIFICATION): New variable, yes iff
HAVE_GTK.
* Makefile.in (install-etc): Remove StartupNotify=true from
etc/*.desktop unless USE_STARTUP_NOTIFICATION (bug#48783).
2021-06-22 15:17:28 +02:00
Eli Zaretskii
3272cfa8d4 ; Fix last change. 2021-06-03 10:49:09 +03:00
Eli Zaretskii
ed19ffc346 * configure.ac: Clarify "smoke test" error message. (Bug#48804) 2021-06-03 10:46:54 +03:00
Eli Zaretskii
6a152f898d * configure.ac: Improve error messages about libgccjit. 2021-06-03 09:55:00 +03:00
Eli Zaretskii
b2eed2ae56 Clean up the fix for unexec build on GNU/Linux
* src/conf_post.h [HYBRID_MALLOC || DARWIN_OS && HAVE_UNEXEC]:
Include <stdlib.h> here, before redirecting 'malloc' and friends
to their hybrid_* and unexec_* equivalents.  #undef malloc and
friends before redefining.  Provide prototypes for the
replacements.  Suggested by Paul Eggert <eggert@cs.ucla.edu>.
* src/gmalloc.c [HYBRID_MALLOC]: Remove declarations of 'malloc'
and friends, as they are now redundant: we include <stdlib.h> in
conf_post.h before redefining 'malloc' etc., and that provides
prototypes from system headers.

* configure.ac (HYBRID_MALLOC): Remove kludge to avoid replacement
of 'free' by Gnulib.  (Bug#36649)
2021-05-20 11:26:00 +03:00
Eli Zaretskii
5e1a8d5654 Fix the unexec build on GNU/Linux
The unexec build on GNU/Linux must use HYBRID_MALLOC (gmalloc.c) and
sheap.c.  This was inadvertently disabled because a configure-time
test for 'sbrk' was moved as side effect of an unrelated change.

* configure.ac: Test for 'sbrk' before using the result in the
decision about SYSTEM_MALLOC and HYBRID_MALLOC.
(HYBRID_MALLOC): Prevent Gnulib from redirecting 'free' to its
replacement 'rpl_free'.

* lib/Makefile.in (not_emacs_OBJECTS): Add mallooc/%.o and free.o.
2021-05-19 17:42:50 +03:00
Andrea Corallo
289000eee7 Merge branch 'feature/native-comp' into into trunk 2021-04-25 20:06:22 +02:00
Eli Zaretskii
9904aaebf7 ; * configure.ac (LD_SWITCH_SYSTEM_TEMACS) [mingw32]: Fix last change. 2021-04-22 22:11:08 +03:00
Eli Zaretskii
61828e55a8 Fix MS-Windows link switches for unexec
* configure.ac (LD_SWITCH_SYSTEM_TEMACS) [mingw32]: Disable ASLR
when linking for unexec.  Reported by Nikolay Kudryavtsev
<nikolay.kudryavtsev@gmail.com>.
2021-04-22 20:23:23 +03:00
Andrea Corallo
686259e65a * configure.ac: Revert prev commit and fix native-comp NetBSD build. 2021-04-14 23:58:54 +02:00
Andrea Corallo
bfaa6df492 * configure.ac: Fix native-comp FreeBSD build. 2021-04-14 20:03:17 +02:00
Andrea Corallo
b064ddd3f6 Merge remote-tracking branch 'savannah/master' into native-comp 2021-04-13 12:06:23 +02:00
Philipp Stephani
17d20bb3cb Generate Seccomp filters only if we have the necessary constants.
If we're missing SECCOMP_SET_MODE_FILTER, the seccomp-filter build
fails.  Reuse the existing HAVE_SECCOMP configuration variable, which
checks for these macros.

* configure.ac (HAVE_SECCOMP): Substitute in Makefile.in.
* lib-src/Makefile.in (HAVE_SECCOMP): New variable.
(SECCOMP_FILTER): Define only if HAVE_SECCOMP.
2021-04-12 09:15:59 +02:00
Andreas Schwab
751e801f90 Fix check for timer_getoverrun
* configure.ac (timer_getoverrun): Move check after gnulib checks
and use $LIB_TIMER_TIME during check.
2021-04-11 17:33:33 +02:00
Philipp Stephani
725fc96b70 Use pkg-config to check for libseccomp.
We need at list version 2.4.0 of libseccomp for seccomp-filter.c to
build cleanly.

* configure.ac: Use pkg-config to check for libseccomp.
* lib-src/Makefile.in (HAVE_LIBSECCOMP, LIBSECCOMP_LIBS)
(LIBSECCOMP_CFLAGS): New variables.
(SECCOMP_FILTER, seccomp-filter$(EXEEXT)): Use them.
2021-04-11 16:50:29 +02:00
Philipp Stephani
0334fa0532 Add another check for the required header <linux/filter.h>.
* configure.ac: Also check for <linux/filter.h>.
* src/emacs.c (SECCOMP_USABLE): Also check for <linux/filter.h>.
2021-04-11 12:26:13 +02:00
Philipp Stephani
25937821bc Also check for needed seccomp macros.
It looks like these are not available on some versions of GNU/Linux,
breaking the build.

* configure.ac: Also check for needed seccomp macros.
* src/emacs.c (SECCOMP_USABLE): New macro.
(usage_message, main, standard_args): Use it.
2021-04-11 12:01:53 +02:00
Philipp Stephani
1060289f51 Add a helper binary to create a basic Secure Computing filter.
The binary uses the 'seccomp' helper library.  The library isn't
needed to load the generated Secure Computing filter.

* configure.ac: Check for 'seccomp' header and library.

* lib-src/seccomp-filter.c: New helper binary to generate a generic
Secure Computing filter for GNU/Linux.

* lib-src/Makefile.in (DONT_INSTALL): Add 'seccomp-filter' helper
binary if possible.
(all): Add Secure Computing filter file if possible.
(seccomp-filter$(EXEEXT)): Compile helper binary.
(seccomp-filter.bpf seccomp-filter.pfc): Generate filter files.

* test/src/emacs-tests.el (emacs-tests/seccomp/allows-stdout)
(emacs-tests/seccomp/forbids-subprocess): New unit tests.

* test/Makefile.in (src/emacs-tests.log): Add dependency on the helper
binary.
2021-04-10 21:10:16 +02:00
Philipp Stephani
be8328acf9 Add support for --seccomp command-line option.
When passing this option on GNU/Linux, Emacs installs a Secure
Computing kernel system call filter.  See Bug#45198.

* configure.ac: Check for seccomp header.

* src/emacs.c (usage_message): Document --seccomp option.
(emacs_seccomp): New wrapper for 'seccomp' syscall.
(load_seccomp, maybe_load_seccomp): New helper functions.
(main): Potentially load seccomp filters during startup.
(standard_args): Add --seccomp option.

* lisp/startup.el (command-line): Detect and ignore --seccomp option.

* test/src/emacs-tests.el (emacs-tests/seccomp/absent-file)
(emacs-tests/seccomp/empty-file)
(emacs-tests/seccomp/file-too-large)
(emacs-tests/seccomp/invalid-file-size): New unit tests.
(emacs-tests--with-temp-file): New helper macro.

* etc/NEWS: Document new --seccomp option.
2021-04-10 18:47:26 +02:00
Alan Third
8ed46b7646 Remove hardcoded gcc version
* configure.ac: Use 'find' to find the brew installed libgccjit libs
instead of a hardcoded path.
2021-04-07 19:05:55 +01:00
Alan Third
c35a515a2f Fix install with NS app bundle
* configure.ac: Set up CFLAGS and LDFLAGS to find a Homebrew
installation of libgccjit.
* Makefile.in (ELN_DESTDIR): Set to the app bundle resource dir when
required.
(install-eln): macOS install doesn't support the -D flag, so make the
directories separately.
2021-04-07 09:06:00 +01:00
Andrea Corallo
6ca6c71cd0 Merge remote-tracking branch 'savannah/master' into native-comp 2021-03-19 15:28:00 +01:00
Lars Ingebrigtsen
2c3340909a Warn the user if we can't find pkg-config
* configure.ac (WITH_IFAVAILABLE): Warn the user if we can't find
a usable pkg-config (bug#47159).
2021-03-19 08:58:32 +01:00
Andrea Corallo
82bd6d57d5 Merge remote-tracking branch 'savannah/master' into native-comp 2021-03-12 16:42:51 +01:00
Andrea Corallo
43b0df62cd Merge commit '9cbdf20316' into native-comp 2021-03-09 10:03:47 +01:00
Glenn Morris
d632622b5a Simplify silent-rules build machinery
* src/verbose.mk.in: New file.
* configure.ac (AM_V, AM_DEFAULT_V): Remove output variables.
(src/verbose.mk): New output file.
* Makefile.in, admin/charsets/Makefile.in:
* admin/grammars/Makefile.in, admin/unidata/Makefile.in:
* doc/emacs/Makefile.in, doc/lispintro/Makefile.in:
* doc/lispref/Makefile.in, doc/misc/Makefile.in, leim/Makefile.in:
* lib-src/Makefile.in, lib/Makefile.in, lisp/Makefile.in:
* lwlib/Makefile.in, nt/Makefile.in, oldXMenu/Makefile.in:
* src/Makefile.in, src/verbose.mk.in, test/Makefile.in:
Include src/verbose.mk rather than repeatedly defining AM_V_at etc.
2021-03-06 16:28:46 -08:00
Glenn Morris
c3cf99f537 Remove the --without-makeinfo configure option (bug#46837)
* configure.ac (--without-makeinfo): Remove option.
(HAVE_MAKEINFO): Remove output variable.

* Makefile.in (HAVE_MAKEINFO): Remove.
(info_misc): Remove HAVE_MAKEINFO check.
(info-real): Remove target.
(info): Simplify.

; * etc/NEWS: Mention this.
2021-03-06 10:38:07 -08:00