Revert "Move native C code into shared library"

This reverts commit 613f4156880bc6c3d56ebe0297e59f805d2a69ab.
This commit is contained in:
Andrea Corallo 2019-09-01 11:06:27 +02:00 committed by Andrea Corallo
parent e3163f1d4c
commit 4c03c46946
4 changed files with 23 additions and 59 deletions

View file

@ -26,8 +26,6 @@ abs_top_srcdir = @abs_top_srcdir@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
CFLAGS = -fPIC @CFLAGS@
all:
.PHONY: all
@ -52,7 +50,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
ALL_CFLAGS= -fPIC \
ALL_CFLAGS= \
$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) $(DEPFLAGS) \
$(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) $(PROFILING_CFLAGS) $(CFLAGS) \
-I. -I../src -I$(srcdir) -I$(srcdir)/../src \

View file

@ -33,7 +33,7 @@ top_srcdir = @top_srcdir@
abs_top_srcdir=@abs_top_srcdir@
VPATH = $(srcdir)
CC = @CC@
CFLAGS = @CFLAGS@ -fPIC
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
EXEEXT = @EXEEXT@
@ -465,7 +465,7 @@ FIRSTFILE_OBJ=@FIRSTFILE_OBJ@
ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
# Must be first, before dep inclusion!
all: $(pdmp) $(OTHER_FILES)
all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES)
.PHONY: all
dmpstruct_headers=$(srcdir)/lisp.h $(srcdir)/buffer.h \
@ -644,33 +644,25 @@ else
MAKE_PDUMPER_FINGERPRINT =
endif
## FIXME: dumper support totally missing here
libemacs.so: $(LIBXMENU) $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \
$(charsets) $(charscript) $(MAKE_PDUMPER_FINGERPRINT) main.o
$(CC) --shared -o $@ $(ALLOBJS) -Wl,-Bstatic $(LIBEGNU_ARCHIVE) -Wl,-Bdynamic $(LIBES)
temacs$(EXEEXT): libemacs.so main.o
$(CC) -L. main.o -o $@ $(TEMACS_LDFLAGS) $(LDFLAGS) \
$(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES) -lemacs -Wl,-rpath -Wl,$(shell pwd)
# ## We have to create $(etc) here because init_cmdargs tests its
# ## existence when setting Vinstallation_directory (FIXME?).
# ## This goes on to affect various things, and the emacs binary fails
# ## to start if Vinstallation_directory has the wrong value.
# temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \
# $(charsets) $(charscript) $(MAKE_PDUMPER_FINGERPRINT)
# $(AM_V_CCLD)$(CC) -o $@.tmp \
# $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
# $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES)
# ifeq ($(HAVE_PDUMPER),yes)
# $(AM_V_at)$(MAKE_PDUMPER_FINGERPRINT) $@.tmp
# endif
# $(AM_V_at)mv $@.tmp $@
# $(MKDIR_P) $(etc)
# ifeq ($(DUMPING),unexec)
# ifneq ($(PAXCTL_notdumped),)
# $(PAXCTL_notdumped) $@
# endif
## We have to create $(etc) here because init_cmdargs tests its
## existence when setting Vinstallation_directory (FIXME?).
## This goes on to affect various things, and the emacs binary fails
## to start if Vinstallation_directory has the wrong value.
temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \
$(charsets) $(charscript) $(MAKE_PDUMPER_FINGERPRINT)
$(AM_V_CCLD)$(CC) -o $@.tmp \
$(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
$(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES)
ifeq ($(HAVE_PDUMPER),yes)
$(AM_V_at)$(MAKE_PDUMPER_FINGERPRINT) $@.tmp
endif
$(AM_V_at)mv $@.tmp $@
$(MKDIR_P) $(etc)
ifeq ($(DUMPING),unexec)
ifneq ($(PAXCTL_notdumped),)
$(PAXCTL_notdumped) $@
endif
endif
## The following oldxmenu-related rules are only (possibly) used if
## HAVE_X11 && !USE_GTK, but there is no harm in always defining them.

View file

@ -924,7 +924,7 @@ load_pdump (int argc, char **argv)
#endif /* HAVE_PDUMPER */
int
main1 (int argc, char **argv)
main (int argc, char **argv)
{
/* Variable near the bottom of the stack, and aligned appropriately
for pointers. */

View file

@ -1,26 +0,0 @@
/* Trampoline for GNU Emacs.
Copyright (C) 2019 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
extern int main1 (int argc, char **argv);
int
main (int argc, char **argv)
{
return main1(argc, argv);
}