1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-20 10:23:57 +00:00
Commit Graph

1174 Commits

Author SHA1 Message Date
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
Andrea Corallo
42fc752a14 * Change native compiler configure flag into '--with-native-compilation'
* configure.ac: Rename configure nativecomp flags into
	--with-native-compilation.
2021-02-26 20:11:31 +01:00
Andrea Corallo
cadb902aa8 Revert "* configure.ac: Rename configure nativecomp flags..."
This reverts commit f6c5f0dd5c.

Reason for this is that I overlooked few other suggestions and this
change has to be discussed before a final decision is taken.
2021-02-22 21:01:44 +01:00
Andrea Corallo
f6c5f0dd5c * configure.ac: Rename configure nativecomp flags into --with-native-comp.
Configure now with '--with-native-comp'!
2021-02-22 20:49:00 +01:00
Andrea Corallo
f92bb788a0 Merge remote-tracking branch 'savannah/master' into native-comp 2021-02-17 22:26:28 +01:00
Glenn Morris
26fcd82890 * configure.ac: Replace obsolete AC_CHECK_HEADER usage. (Bug#46578) 2021-02-16 21:25:18 -08:00
Glenn Morris
5f078928bb * configure.ac: Replace obsolete AC_TRY_LINK with AC_LINK_IFELSE. 2021-02-16 20:55:13 -08:00
Glenn Morris
45e964755b Remove TIME_WITH_SYS_TIME, unused for a long time
* configure.ac (AC_HEADER_TIME): Remove.  (Bug#46578)
2021-02-16 20:55:13 -08:00
Robert Pluim
db237850ab Remove Motif support
* configure.ac: Remove support for configuring --with-x-toolkit=motif

* etc/NEWS: Mention removal of Motif support.
2021-02-12 14:47:13 +01:00
Andrea Corallo
b8d3ae78c5 Merge remote-tracking branch 'savannah/master' into native-comp 2021-01-24 21:05:33 +01:00
Paul Eggert
9143eba0c6 Prepare for update from Gnulib
* configure.ac: Also create lib/malloc and lib/deps/malloc
if the dynarray module is in use, as Gnulib regex will
start needing it due to recent glibc changes.
2021-01-22 12:02:54 -08:00
Andrea Corallo
0a7ac0b550 Merge remote-tracking branch 'savannah/master' into native-comp 2021-01-16 13:26:10 +01:00
Omar Polo
79b9a262ff * configure.ac: Fix native-comp OpenBSD build. 2021-01-12 21:29:29 +01:00
Robert Pluim
ef55cc07ba * configure.ac: Alphabetize emacs_config_features 2021-01-11 13:20:04 +01:00
Robert Pluim
62e3750af3 Ensure HAVE_GMP is reflected in emacs_config_features
* configure.ac: Move HAVE_GMP setting before emacs_config_features
setting (Bug#45771).
2021-01-11 13:11:51 +01:00
Andrea Corallo
400f620f24 Merge remote-tracking branch 'savannah/master' into HEAD 2021-01-08 21:40:45 +01:00
Paul Eggert
fa574e68de Fix broken build on AIX 7.2
Without this fix, the build on AIX 7.2 with xlc fails in the ‘CCLD
temacs’ step with the diagnostic ‘ld: 0711-317 ERROR: Undefined
symbol: BC’.  This is because -lcurses does not define BC etc.
* configure.ac: When building terminfo.o, define
TERMINFO_DEFINES_BC if the library defines BC etc.
* src/terminfo.c (UP, BC, PC): Define depending on
TERMINFO_DEFINES_BC, not on TERMINFO.

(cherry picked from commit 632917461a)
2021-01-04 09:02:40 -08:00
Glenn Morris
1395fb8ff7 Merge from origin/emacs-27
2e09efdb68 Revert previous patch which was installed into wrong branch.
2021-01-04 07:50:25 -08:00
Paul Eggert
632917461a Fix broken build on AIX 7.2
Without this fix, the build on AIX 7.2 with xlc fails in the ‘CCLD
temacs’ step with the diagnostic ‘ld: 0711-317 ERROR: Undefined
symbol: BC’.  This is because -lcurses does not define BC etc.
* configure.ac: When building terminfo.o, define
TERMINFO_DEFINES_BC if the library defines BC etc.
* src/terminfo.c (UP, BC, PC): Define depending on
TERMINFO_DEFINES_BC, not on TERMINFO.
2021-01-03 11:59:50 -08:00
Paul Eggert
2e09efdb68 Revert previous patch which was installed into wrong branch. 2021-01-03 11:58:34 -08:00