This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: newlib 1.10.0 doesn't build setjmp.o -- Patch included


Eric Norum wrote:
> 
> When using newlib 1.10.0 on my i386-rtems target I found that setjmp.o
> was not being added to the library.  The problem is that the
> newlib/libc/machine/i386/Makefile.in adds setjmp.S to the list of
> sources, but does not add setjmp.o to the list of objects.  Here's how I
> fixed this.

Eric,

  You should not change Makefile.in as it is a generated file.  I have checked
in a fix to the current sources Makefile.am and Makefile.in.  The patch is
attached
to this note.

2002-02-07  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/machine/i386/Makefile.am: (mach_add_src): Remove.
        (mach_add_obj): Conditionally set to setjmp.o or nothing.
        (LIB_SOURCES): Remove $(mach_add_src).
        (lib_a_LIBADD, lib_a_DEPENDENCIES): Add and set to $(mach_add_src).
        (lib_la_LIBADD, lib_la_DEPENDENCIES): Ditto.
        * libc/machine/i386/Makefile.in: Regenerate.


-- Jeff J.
Index: libc/machine/i386/Makefile.am
===================================================================
RCS file: /cvs/src/src/newlib/libc/machine/i386/Makefile.am,v
retrieving revision 1.4
diff -u -r1.4 Makefile.am
--- libc/machine/i386/Makefile.am	2001/12/19 03:03:33	1.4
+++ libc/machine/i386/Makefile.am	2002/02/07 19:09:59
@@ -5,24 +5,30 @@
 INCLUDES = -I $(newlib_basedir)/libm/common $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
 
 if MACH_ADD_SETJMP
-mach_add_src=setjmp.S
+mach_add_obj=setjmp.o
 else
-mach_add_src=
+mach_add_obj=
 endif
 
 LIB_SOURCES = \
 	memchr.S memcmp.S memcpy.S memset.S strchr.S \
-	memmove.S strlen.S $(mach_add_src) i386mach.h
+	memmove.S strlen.S i386mach.h
 
 libi386_la_LDFLAGS = -Xcompiler -nostdlib
 
 if USE_LIBTOOL
 noinst_LTLIBRARIES = libi386.la
 libi386_la_SOURCES = $(LIB_SOURCES)
+EXTRA_libi386_la_SOURCES = setjmp.S
+libi386_la_LIBADD = $(mach_add_obj)
+libi386_la_DEPENDENCIES = $(mach_add_obj)
 noinst_DATA = objectlist.awk.in
 else
 noinst_LIBRARIES = lib.a
 lib_a_SOURCES = $(LIB_SOURCES)
+lib_a_LIBADD = $(mach_add_obj)
+lib_a_DEPENDENCIES = $(mach_add_obj)
+EXTRA_lib_a_SOURCES = setjmp.S
 noinst_DATA =
 endif # USE_LIBTOOL
 
Index: libc/machine/i386/Makefile.in
===================================================================
RCS file: /cvs/src/src/newlib/libc/machine/i386/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- libc/machine/i386/Makefile.in	2001/12/19 03:03:33	1.4
+++ libc/machine/i386/Makefile.in	2002/02/07 19:09:59
@@ -86,22 +86,28 @@
 AUTOMAKE_OPTIONS = cygnus
 
 INCLUDES = -I $(newlib_basedir)/libm/common $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-@MACH_ADD_SETJMP_TRUE@mach_add_src = @MACH_ADD_SETJMP_TRUE@setjmp.S
-@MACH_ADD_SETJMP_FALSE@mach_add_src = 
+@MACH_ADD_SETJMP_TRUE@mach_add_obj = @MACH_ADD_SETJMP_TRUE@setjmp.o
+@MACH_ADD_SETJMP_FALSE@mach_add_obj = 
 
 LIB_SOURCES = \
 	memchr.S memcmp.S memcpy.S memset.S strchr.S \
-	memmove.S strlen.S $(mach_add_src) i386mach.h
+	memmove.S strlen.S i386mach.h
 
 
 libi386_la_LDFLAGS = -Xcompiler -nostdlib
 
 @USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = @USE_LIBTOOL_TRUE@libi386.la
 @USE_LIBTOOL_TRUE@libi386_la_SOURCES = @USE_LIBTOOL_TRUE@$(LIB_SOURCES)
+@USE_LIBTOOL_TRUE@EXTRA_libi386_la_SOURCES = @USE_LIBTOOL_TRUE@setjmp.S
+@USE_LIBTOOL_TRUE@libi386_la_LIBADD = @USE_LIBTOOL_TRUE@$(mach_add_obj)
+@USE_LIBTOOL_TRUE@libi386_la_DEPENDENCIES = @USE_LIBTOOL_TRUE@$(mach_add_obj)
 @USE_LIBTOOL_TRUE@noinst_DATA = @USE_LIBTOOL_TRUE@objectlist.awk.in
 @USE_LIBTOOL_FALSE@noinst_DATA = 
 @USE_LIBTOOL_FALSE@noinst_LIBRARIES = @USE_LIBTOOL_FALSE@lib.a
 @USE_LIBTOOL_FALSE@lib_a_SOURCES = @USE_LIBTOOL_FALSE@$(LIB_SOURCES)
+@USE_LIBTOOL_FALSE@lib_a_LIBADD = @USE_LIBTOOL_FALSE@$(mach_add_obj)
+@USE_LIBTOOL_FALSE@lib_a_DEPENDENCIES = @USE_LIBTOOL_FALSE@$(mach_add_obj)
+@USE_LIBTOOL_FALSE@EXTRA_lib_a_SOURCES = @USE_LIBTOOL_FALSE@setjmp.S
 
 ACLOCAL_AMFLAGS = -I ../../..
 CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
@@ -114,12 +120,10 @@
 DEFS = @DEFS@ -I. -I$(srcdir) 
 CPPFLAGS = @CPPFLAGS@
 LIBS = @LIBS@
-lib_a_LIBADD = 
 @USE_LIBTOOL_FALSE@lib_a_OBJECTS =  memchr.o memcmp.o memcpy.o memset.o \
 @USE_LIBTOOL_FALSE@strchr.o memmove.o strlen.o
 LTLIBRARIES =  $(noinst_LTLIBRARIES)
 
-libi386_la_LIBADD = 
 @USE_LIBTOOL_TRUE@libi386_la_OBJECTS =  memchr.lo memcmp.lo memcpy.lo \
 @USE_LIBTOOL_TRUE@memset.lo strchr.lo memmove.lo strlen.lo
 CFLAGS = @CFLAGS@
@@ -136,7 +140,7 @@
 
 TAR = gtar
 GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES) $(libi386_la_SOURCES)
+SOURCES = $(lib_a_SOURCES) $(EXTRA_lib_a_SOURCES) $(libi386_la_SOURCES) $(EXTRA_libi386_la_SOURCES)
 OBJECTS = $(lib_a_OBJECTS) $(libi386_la_OBJECTS)
 
 all: all-redirect

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]