emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r100238: Move LIB_GCC from cpp to con


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100238: Move LIB_GCC from cpp to configure.
Date: Tue, 11 May 2010 20:01:16 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100238
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2010-05-11 20:01:16 -0700
message:
  Move LIB_GCC from cpp to configure.
  
  * configure.in (LIB_GCC): New output variable.
  
  * src/Makefile.in (LIB_GCC): Set using configure, not cpp.
  (GNULIB_VAR) [!ORDINARY_LINK]: Always set to $LIB_GCC.
  * src/m/arm.h (LIB_GCC) [GNU_LINUX]:
  * src/s/cygwin.h (LIB_GCC):
  * src/s/freebsd.h (LIB_GCC):
  * src/s/gnu-linux.h (LIB_GCC):
  * src/s/msdos.h (LIB_GCC):
  * src/s/netbsd.h (LIB_GCC):
  Move to configure.
  
  * msdos/sed1v2.inp (LIB_GCC): Edit to -Lgcc.
modified:
  ChangeLog
  configure.in
  msdos/ChangeLog
  msdos/sed1v2.inp
  src/ChangeLog
  src/Makefile.in
  src/m/arm.h
  src/s/cygwin.h
  src/s/freebsd.h
  src/s/gnu-linux.h
  src/s/msdos.h
  src/s/netbsd.h
=== modified file 'ChangeLog'
--- a/ChangeLog 2010-05-11 21:02:32 +0000
+++ b/ChangeLog 2010-05-12 03:01:16 +0000
@@ -1,3 +1,7 @@
+2010-05-12  Glenn Morris  <address@hidden>
+
+       * configure.in (LIB_GCC): New output variable.
+
 2010-05-11  Glenn Morris  <address@hidden>
 
        * make-dist (msdos): No more mainmake.

=== modified file 'configure.in'
--- a/configure.in      2010-05-11 21:02:32 +0000
+++ b/configure.in      2010-05-12 03:01:16 +0000
@@ -3234,6 +3234,35 @@
 AC_SUBST(LD_SWITCH_SYSTEM_EXTRA)
 
 
+LIB_GCC=
+if test "x$GCC" = "xyes"; then
+
+  case "$opsys" in
+    ## cygwin: don't link against static libgcc.
+    cygwin|freebsd|netbsd|openbsd) LIB_GCC= ;;
+
+    gnu-*)
+      ## address@hidden reported that the lgcc_s flag is necessary to
+      ## build on ARM EABI under GNU/Linux.  (Bug#5518)
+      ## Note that m/arm.h never bothered to undefine LIB_GCC first.
+      if test "$machine" = "arm"; then
+        LIB_GCC="-lgcc_s"
+      else
+        ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
+        ## immediately undefine it again and redefine it to empty.
+        ## Was the C_SWITCH_X_SITE part really necessary?
+##      LIB_GCC=`$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`
+        LIB_GCC=
+      fi
+      ;;
+
+    ## Ask GCC where to find libgcc.a.
+    *) LIB_GCC=`$(CC) -print-libgcc-file-name 2> /dev/null` ;;
+  esac
+fi                              dnl if $GCC
+AC_SUBST(LIB_GCC)
+
+
 AH_TOP([/* GNU Emacs site configuration template file.
    Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005,
      2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.

=== modified file 'msdos/ChangeLog'
--- a/msdos/ChangeLog   2010-05-11 02:51:08 +0000
+++ b/msdos/ChangeLog   2010-05-12 03:01:16 +0000
@@ -1,3 +1,7 @@
+2010-05-12  Glenn Morris  <address@hidden>
+
+       * sed1v2.inp (LIB_GCC): Edit to -Lgcc.
+
 2010-05-11  Glenn Morris  <address@hidden>
 
        * sed1x.inp (LIBS_SYSTEM): Edit to -lxext -lsys.

=== modified file 'msdos/sed1v2.inp'
--- a/msdos/sed1v2.inp  2010-05-10 02:16:09 +0000
+++ b/msdos/sed1v2.inp  2010-05-12 03:01:16 +0000
@@ -51,6 +51,7 @@
 /^LD_SWITCH_SYSTEM *=/s/@LD_SWITCH_SYSTEM@//
 /^LD_SWITCH_SYSTEM_EXTRA *=/s/@LD_SWITCH_SYSTEM_EXTRA@//
 /^LIBS_SYSTEM *=/s/@LIBS_SYSTEM@//
+/^LIB_GCC *=/s/@LIB_GCC@/-Lgcc/
 /^LIBTIFF *=/s/@LIBTIFF@//
 /^LIBJPEG *=/s/@LIBJPEG@//
 /^LIBPNG *=/s/@LIBPNG@//

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-05-11 21:02:32 +0000
+++ b/src/ChangeLog     2010-05-12 03:01:16 +0000
@@ -1,3 +1,15 @@
+2010-05-12  Glenn Morris  <address@hidden>
+
+       * Makefile.in (LIB_GCC): Set using configure, not cpp.
+       (GNULIB_VAR) [!ORDINARY_LINK]: Always set to $LIB_GCC.
+       * m/arm.h (LIB_GCC) [GNU_LINUX]:
+       * s/cygwin.h (LIB_GCC):
+       * s/freebsd.h (LIB_GCC):
+       * s/gnu-linux.h (LIB_GCC):
+       * s/msdos.h (LIB_GCC):
+       * s/netbsd.h (LIB_GCC):
+       Move to configure.
+
 2010-05-11  Karel Klic  <address@hidden>
 
        * ftfont.c: Fix incorrect parentheses of #if condition for

=== modified file 'src/Makefile.in'
--- a/src/Makefile.in   2010-05-11 02:51:08 +0000
+++ b/src/Makefile.in   2010-05-12 03:01:16 +0000
@@ -91,6 +91,9 @@
 ## Some systems define this to request special libraries.
 address@hidden@
 
+## Where to find libgcc.a, if using gcc and necessary.
address@hidden@
+
 address@hidden@
 address@hidden@
 address@hidden@
@@ -258,6 +261,8 @@
 #endif /* not HAVE_X_WINDOWS */
 
 #ifndef ORDINARY_LINK
+GNULIB_VAR = $(LIB_GCC)
+
 /* Fix linking if compiled with GCC.  */
 #ifdef __GNUC__
 
@@ -278,13 +283,6 @@
 #define LINKER $(CC) -nostdlib
 #endif
 
-#ifndef LIB_GCC
-/* Ask GCC where to find libgcc.a.  */
-#define LIB_GCC `$(CC) -print-libgcc-file-name`
-#endif /* not LIB_GCC */
-
-GNULIB_VAR = LIB_GCC
-
 #ifndef LINKER_WAS_SPECIFIED
 /* GCC passes any argument prefixed with -Xlinker directly to the
    linker.  See prefix-args.c for an explanation of why we do not do
@@ -296,10 +294,6 @@
 #define YMF_PASS_LDFLAGS(flags) flags
 #endif
 
-#else /* not __GNUC__ */
-GNULIB_VAR =
-
-#endif /* not __GNUC__ */
 #endif /* not ORDINARY_LINK */
 
 #ifdef ORDINARY_LINK

=== modified file 'src/m/arm.h'
--- a/src/m/arm.h       2010-05-12 02:37:59 +0000
+++ b/src/m/arm.h       2010-05-12 03:01:16 +0000
@@ -24,11 +24,5 @@
 
 #define NO_REMAP
 
-/* address@hidden reported that the lgcc_s flag is necessary to
-   build on ARM EABI under GNU/Linux (Bug#5518).  */
-#ifdef GNU_LINUX
-#define LIB_GCC -lgcc_s
-#endif
-
 /* arch-tag: 07856f0c-f0c8-4bd8-99af-0b7fa1e5ee42
    (do not change this comment) */

=== modified file 'src/s/cygwin.h'
--- a/src/s/cygwin.h    2010-05-08 02:05:24 +0000
+++ b/src/s/cygwin.h    2010-05-12 03:01:16 +0000
@@ -127,9 +127,6 @@
    returns ENOSYS.  A workaround is to set G_SLICE=always-malloc. */
 #define G_SLICE_ALWAYS_MALLOC
 
-/* Don't link against static libgcc */
-#define LIB_GCC
-
 /* the end */
 
 /* arch-tag: 5ae7ba00-83b0-4ab3-806a-3e845779191b

=== modified file 'src/s/freebsd.h'
--- a/src/s/freebsd.h   2010-05-10 02:16:09 +0000
+++ b/src/s/freebsd.h   2010-05-12 03:01:16 +0000
@@ -30,9 +30,6 @@
 
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
 
-#undef LIB_GCC
-#define LIB_GCC
-
 #define HAVE_GETLOADAVG 1
 #define DECLARE_GETPWUID_WITH_UID_T
 

=== modified file 'src/s/gnu-linux.h'
--- a/src/s/gnu-linux.h 2010-05-10 00:07:47 +0000
+++ b/src/s/gnu-linux.h 2010-05-12 03:01:16 +0000
@@ -140,9 +140,6 @@
 #endif /* !_IO_STDIO_H && ! __UCLIBC__ */
 #endif /* emacs */
 
-/* Ask GCC where to find libgcc.a.  */
-#define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`
-
 #ifdef emacs
 #define INTERRUPT_INPUT
 #endif
@@ -151,9 +148,6 @@
 
 #define POSIX                 /* affects getpagesize.h and systty.h */
 
-#undef LIB_GCC
-#define LIB_GCC
-
 #define UNEXEC unexelf.o
 
 /* This is to work around mysterious gcc failures in some system versions.

=== modified file 'src/s/msdos.h'
--- a/src/s/msdos.h     2010-05-11 02:51:08 +0000
+++ b/src/s/msdos.h     2010-05-12 03:01:16 +0000
@@ -95,7 +95,6 @@
 #define ORDINARY_LINK
 
 /* command.com does not understand `...` so we define this.  */
-#define LIB_GCC -Lgcc
 #define SEPCHAR ';'
 
 #define NULL_DEVICE "nul"

=== modified file 'src/s/netbsd.h'
--- a/src/s/netbsd.h    2010-05-08 02:05:24 +0000
+++ b/src/s/netbsd.h    2010-05-12 03:01:16 +0000
@@ -26,9 +26,6 @@
 
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
 
-#undef LIB_GCC
-#define LIB_GCC
-
 #define AMPERSAND_FULL_NAME
 
 /* On post 1.3 releases of NetBSD, gcc -nostdlib also clears


reply via email to

[Prev in Thread] Current Thread [Next in Thread]