src/newlib/libc/machine/i386 f_atan2.S f_atan2 ...

Corinna Vinschen vinschen@redhat.com
Mon Feb 12 04:54:00 GMT 2001


On Wed, Dec 19, 2001 at 03:11:05AM -0000, fitzsim@sources.redhat.com wrote:
> CVSROOT:	/cvs/src
> Module name:	src
> Branch: 	newlib-1_10_0
> Changes by:	fitzsim@sources.redhat.com	2001-12-18 19:11:05
> 
> Removed files:
> 	newlib/libc/machine/i386: f_atan2.S f_atan2f.S f_exp.c f_expf.c 
> 	                          f_frexp.S f_frexpf.S f_ldexp.S 
> 	                          f_ldexpf.S f_log.S f_log10.S 
> 	                          f_log10f.S f_logf.S f_math.h f_pow.c 
> 	                          f_powf.c f_tan.S f_tanf.S 
> 
> Log message:
> 	* f_*: Moved to libm/machine/i386

This step breaks linking Cygwin.  The symbols f_* aren't defined
anymore.  The cause are the Makefile.am rules in the libm/machine
dir which creates a lib.a by calling `ar cu i386/lib.a' accidentally.
I've applied the below patch according to libc/machine/Makefile.am
to solve that problem.

Corinna

ChangeLog:

2001-12-19  Corinna Vinschen  <corinna@vinschen.de>

	* libm/machine/Makefile.am: Change rules to create correct lib.a.
	* libm/machine/Makefile.in: Regenerated through automake.


Index: Makefile.am
===================================================================
RCS file: /cvs/src/src/newlib/libm/machine/Makefile.am,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile.am
--- Makefile.am	2001/12/19 03:03:40	1.2
+++ Makefile.am	2001/12/19 09:18:29
@@ -7,11 +7,16 @@ SUBDIRS = $(libm_machine_dir) .
 if USE_LIBTOOL
 else
 noinst_LIBRARIES = lib.a
-lib_a_SOURCES =
-lib_a_LIBADD = $(machlib)
+
+lib.a: $(libm_machine_dir)/lib.a
+	rm -f $@
+	ln $(libm_machine_dir)/lib.a $@ >/dev/null 2>/dev/null || \
+	 cp $(libm_machine_dir)/lib.a $@
 endif # USE_LIBTOOL
 
 ACLOCAL_AMFLAGS = -I ../..
 CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+
+$(libm_machine_dir)/lib.a:
 
 doc:  
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/newlib/libm/machine/Makefile.in,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile.in
--- Makefile.in	2001/12/19 03:03:40	1.2
+++ Makefile.in	2001/12/19 09:18:29
@@ -87,9 +87,7 @@ AUTOMAKE_OPTIONS = cygnus
 
 SUBDIRS = $(libm_machine_dir) .
 
-@USE_LIBTOOL_FALSE@noinst_LIBRARIES = @USE_LIBTOOL_FALSE@lib.a
-@USE_LIBTOOL_FALSE@lib_a_SOURCES = 
-@USE_LIBTOOL_FALSE@lib_a_LIBADD = @USE_LIBTOOL_FALSE@$(machlib)
+@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
 
 ACLOCAL_AMFLAGS = -I ../..
 CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
@@ -102,8 +100,14 @@ LIBRARIES =  $(noinst_LIBRARIES)
 DEFS = @DEFS@ -I. -I$(srcdir) 
 CPPFLAGS = @CPPFLAGS@
 LIBS = @LIBS@
-@USE_LIBTOOL_FALSE@lib_a_DEPENDENCIES = 
-@USE_LIBTOOL_FALSE@lib_a_OBJECTS = 
+lib_a_LIBADD = 
+lib_a_SOURCES = lib.a.c
+lib_a_OBJECTS =  lib.a.o
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
 DIST_COMMON =  Makefile.am Makefile.in aclocal.m4 configure configure.in
 
 
@@ -111,8 +115,8 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(
 
 TAR = gtar
 GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
+SOURCES = lib.a.c
+OBJECTS = lib.a.o
 
 all: all-redirect
 .SUFFIXES:
@@ -180,11 +184,6 @@ distclean-libtool:
 
 maintainer-clean-libtool:
 
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
-	-rm -f lib.a
-	$(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
-	$(RANLIB) lib.a
-
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
 # To change the values of `make' variables: instead of editing Makefiles,
@@ -417,6 +416,13 @@ installdirs-am installdirs mostlyclean-g
 clean-generic maintainer-clean-generic clean mostlyclean distclean \
 maintainer-clean
 
+
+@USE_LIBTOOL_FALSE@lib.a: $(libm_machine_dir)/lib.a
+@USE_LIBTOOL_FALSE@	rm -f $@
+@USE_LIBTOOL_FALSE@	ln $(libm_machine_dir)/lib.a $@ >/dev/null 2>/dev/null || \
+@USE_LIBTOOL_FALSE@	 cp $(libm_machine_dir)/lib.a $@
+
+$(libm_machine_dir)/lib.a:
 
 doc:  
 
-- 
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen@redhat.com



More information about the Newlib mailing list