From 49d9e6b07bc34acf755ded0fc255e974a37f9189 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Wed, 7 Jul 2010 20:31:04 -0700 Subject: [PATCH] Remove src/prefix-args.c. * configure.in (PRE_EDIT_LDFLAGS, POST_EDIT_LDFLAGS): Remove. * msdos/sed1v2.inp: Remove reference to prefix-args. * prefix-args.c: Remove file. * src/autodeps.mk (ALLOBJS): Remove reference to prefix-args. * src/Makefile.in (temacs${EXEEXT}): Remove references to PRE_EDIT_LDFLAGS and POST_EDIT_LDFLAGS. (mostlyclean): Remove reference to prefix-args. (prefix-args): Remove. --- ChangeLog | 2 ++ configure | 14 -------- configure.in | 14 +------- msdos/ChangeLog | 4 +++ msdos/sed1v2.inp | 1 - src/ChangeLog | 8 +++++ src/Makefile.in | 16 ++------- src/autodeps.mk | 2 +- src/prefix-args.c | 82 ----------------------------------------------- 9 files changed, 19 insertions(+), 124 deletions(-) delete mode 100644 src/prefix-args.c diff --git a/ChangeLog b/ChangeLog index acf57413fb..4c3e71cd62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2010-07-08 Dan Nicolaescu + * configure.in (PRE_EDIT_LDFLAGS, POST_EDIT_LDFLAGS): Remove. + * configure.in (UNEXEC_OBJ): Add comment about values for MSDOS and MSWindows. diff --git a/configure b/configure index 13beb1f07a..41d0e6374c 100755 --- a/configure +++ b/configure @@ -600,8 +600,6 @@ TOOLTIP_SUPPORT MOUSE_SUPPORT LIB_GCC LINKER -POST_EDIT_LDFLAGS -PRE_EDIT_LDFLAGS LD_SWITCH_SYSTEM_TEMACS POST_ALLOC_OBJ PRE_ALLOC_OBJ @@ -14163,8 +14161,6 @@ case "$opsys" in esac -PRE_EDIT_LDFLAGS= -POST_EDIT_LDFLAGS= if test "x$ORDINARY_LINK" = "xyes"; then LINKER="\$(CC)" @@ -14185,18 +14181,8 @@ elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then ## searching for libraries in its internal directories, so we have to ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). LINKER="\$(CC) -nostdlib" - ## GCC passes any argument prefixed with -Xlinker directly to the linker. - ## See prefix-args.c for an explanation of why we do not do this with the - ## shell''s ``for'' construct. Note that sane people do not have '.' in - ## their paths, so we must use ./prefix-args. - ## TODO either make prefix-args check ORDINARY_LINK internally, - ## or remove it altogether (bug#6184), removing the need for this hack. - PRE_EDIT_LDFLAGS='`./prefix-args -Xlinker' - POST_EDIT_LDFLAGS='`' fi - - test "x$LINKER" = "x" && LINKER=ld ## FIXME? What setting of EDIT_LDFLAGS should this have? test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic" diff --git a/configure.in b/configure.in index 373cc799d0..a91d3c7b6a 100644 --- a/configure.in +++ b/configure.in @@ -3360,8 +3360,6 @@ case "$opsys" in esac -PRE_EDIT_LDFLAGS= -POST_EDIT_LDFLAGS= if test "x$ORDINARY_LINK" = "xyes"; then LINKER="\$(CC)" @@ -3380,17 +3378,7 @@ elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then ## searching for libraries in its internal directories, so we have to ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). LINKER="\$(CC) -nostdlib" - ## GCC passes any argument prefixed with -Xlinker directly to the linker. - ## See prefix-args.c for an explanation of why we do not do this with the - ## shell''s ``for'' construct. Note that sane people do not have '.' in - ## their paths, so we must use ./prefix-args. - ## TODO either make prefix-args check ORDINARY_LINK internally, - ## or remove it altogether (bug#6184), removing the need for this hack. - PRE_EDIT_LDFLAGS='`./prefix-args -Xlinker' - POST_EDIT_LDFLAGS='`' -fi -AC_SUBST(PRE_EDIT_LDFLAGS) -AC_SUBST(POST_EDIT_LDFLAGS) +fi test "x$LINKER" = "x" && LINKER=ld ## FIXME? What setting of EDIT_LDFLAGS should this have? diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 996c652765..048e8b48ef 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,3 +1,7 @@ +2010-07-08 Dan Nicolaescu + + * sed1v2.inp: Remove reference to prefix-args. + 2010-07-07 Andreas Schwab * sed2v2.inp (HAVE_MEMCPY, HAVE_MEMSET): Edit to 1. diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index 2124b52c42..3ccf8e774d 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -128,7 +128,6 @@ s/\.h\.in/.h-in/ /^[ ]*$/d /^ if test -f/,/^ fi$/c\ command.com /c if exist .gdbinit rm -f _gdbinit -/^temacs:/s/prefix-args// /^temacs:/s/stamp-oldxmenu// /^ if test "\${CANNOT_DUMP}" =/,/^ else /d /^ fi/d diff --git a/src/ChangeLog b/src/ChangeLog index b601fecf80..415211558a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2010-07-08 Dan Nicolaescu + Remove prefix-args.c + * prefix-args.c: Remove file. + * autodeps.mk (ALLOBJS): Remove reference to prefix-args. + * Makefile.in (temacs${EXEEXT}): Remove references to + PRE_EDIT_LDFLAGS and POST_EDIT_LDFLAGS. + (mostlyclean): Remove reference to prefix-args. + (prefix-args): Remove. + Simplify cstart_of_data, start_of_code and related code. * mem-limits.h: Remove !emacs and _LIBC conditional code. (start_of_data): Merge into start_of_data function. diff --git a/src/Makefile.in b/src/Makefile.in index 0f8294fd03..933ec98a8d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -628,20 +628,10 @@ buildobj.h: Makefile echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h -## We cannot define variables for PRE_EDIT and POST_EDIT. -## If !ORDINARY_LINK && !LINKER && GCC, they add a -## `./prefix-args -Xlinker ... ` wrapper, otherwise they are empty. -## One alternative to this approach would be to always call prefix-args, -## and have it DTRT in all cases, by testing the above defines. -temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT} - $(LD) @PRE_EDIT_LDFLAGS@ ${TEMACS_LDFLAGS} @POST_EDIT_LDFLAGS@ \ - ${TEMACS_LDFLAGS2} \ +temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} + $(LD) ${TEMACS_LDFLAGS} ${TEMACS_LDFLAGS2} \ -o temacs ${START_FILES} ${obj} ${otherobj} ${LIBES} -prefix-args${EXEEXT}: prefix-args.o $(config_h) - $(CC) $(LDFLAGS) prefix-args.o -o prefix-args - - ## The following oldxmenu-related rules are only (possibly) used if ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them ## (provided we take a little care that OLDXMENU is never empty). @@ -688,7 +678,7 @@ doc.o: buildobj.h mostlyclean: - rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a + rm -f temacs${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a rm -f ../etc/DOC rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} rm -f buildobj.h diff --git a/src/autodeps.mk b/src/autodeps.mk index c3cc91e22a..fb0e21366c 100644 --- a/src/autodeps.mk +++ b/src/autodeps.mk @@ -2,5 +2,5 @@ ## This is inserted in src/Makefile if AUTO_DEPEND=yes. -ALLOBJS=$(START_FILES) ${obj} ${otherobj} prefix-args.o +ALLOBJS=$(START_FILES) ${obj} ${otherobj} -include $(ALLOBJS:%.o=${DEPDIR}/%.d) diff --git a/src/prefix-args.c b/src/prefix-args.c deleted file mode 100644 index 84e47dabb9..0000000000 --- a/src/prefix-args.c +++ /dev/null @@ -1,82 +0,0 @@ -/* prefix-args.c - echo each argument, prefixed by a string. - Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, 2006, 2007, - 2008, 2009, 2010 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 . */ - -/* Jim Blandy - September 1992 - - When using GCC 2 as the linker in the build process, options - intended for the linker need to be prefixed with the "-Xlinker" - option. If an option takes an argument, we need to use -Xlinker - twice - once for the option and once for its argument. For - example, to run the linker with the options "-Bstatic" "-e" - "_start", you'd need to pass the following options to GCC: - - -Xlinker -Bstatic -Xlinker -e -Xlinker _start. - - The Emacs makefile used to use a Bourne Shell `for' loop to prefix - each linker option with "-Xlinker", but 1) the for loop was hairier - than one might hope because it had to work when there were no - arguments to pass to the linker - the shell barfs on a loop like - this: - - for arg in ; do echo -Xlinker "$arg"; done - - and 2) the whole compilation command containing this loop seems to - exit with a non-zero status and halt the build under Ultrix. - - If I can't write a completely portable program to do this in C, - I'm quitting and taking up gardening. */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#if STDC_HEADERS -# include /* for proper declaration of `exit' */ -#endif - -#include -#include - -int -main (int argc, char **argv) -{ - char *progname; - char *prefix; - - progname = argv[0]; - argc--, argv++; - - if (argc < 1) - { - fprintf (stderr, "Usage: %s PREFIX ARGS...\n\ -Echo each ARG preceded by PREFIX and a space.\n", progname); - exit (2); - } - - prefix = argv[0]; - argc--, argv++; - - for (; argc > 0; argc--, argv++) - printf ("%s %s%c", prefix, argv[0], (argc > 1) ? ' ' : '\n'); - - exit (0); -} - -/* arch-tag: 08136d70-e5c0-49c7-bcd8-b4850233977a - (do not change this comment) */ -- 2.20.1