]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert "Move native C code into shared library"
authorAndrea Corallo <andrea_corallo@yahoo.it>
Sun, 1 Sep 2019 09:06:27 +0000 (11:06 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:37:41 +0000 (11:37 +0100)
This reverts commit 613f4156880bc6c3d56ebe0297e59f805d2a69ab.

lib/Makefile.in
src/Makefile.in
src/emacs.c
src/main.c [deleted file]

index ed3123885d270d39964829d4d67b0bc569cc5cba..06d8e56421bffa8f14c4fb780616658d441bfd08 100644 (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 \
index 8e3712709e568a6daa972c48dd8565101636901b..5e0e36d8b4dd05188b8fc4ea2a388f6a36b26156 100644 (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.
index 1491ba5a479436753767166a3db67615e3a63745..c59a70988b75bfcf95eed7b76e42a0ef29dc83ba 100644 (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.  */
diff --git a/src/main.c b/src/main.c
deleted file mode 100644 (file)
index 41e3553..0000000
+++ /dev/null
@@ -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);
-}