newlib: separate out libg from libc
Make this a separate target from libc so that we can migrate libc over to automake more easily. Having it integrated into the libc target is difficult to handle when using automake rules which expect a one-to-one mapping between names & inputs.
This commit is contained in:
parent
c75bb30fc1
commit
f2b053f49e
|
@ -4,6 +4,7 @@ AUTOMAKE_OPTIONS = dejagnu
|
||||||
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
|
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
|
||||||
|
|
||||||
# Variables that will accumulate in subdirs.
|
# Variables that will accumulate in subdirs.
|
||||||
|
CLEANFILES =
|
||||||
PHONY =
|
PHONY =
|
||||||
SUFFIXES =
|
SUFFIXES =
|
||||||
info_TEXINFOS =
|
info_TEXINFOS =
|
||||||
|
@ -70,6 +71,7 @@ noinst_DATA += stmp-targ-include
|
||||||
|
|
||||||
toollib_LIBRARIES = libm.a \
|
toollib_LIBRARIES = libm.a \
|
||||||
libc.a
|
libc.a
|
||||||
|
noinst_DATA += libg.a
|
||||||
if HAVE_MULTISUBDIR
|
if HAVE_MULTISUBDIR
|
||||||
BUILD_MULTISUBDIR = $(builddir)$(MULTISUBDIR)
|
BUILD_MULTISUBDIR = $(builddir)$(MULTISUBDIR)
|
||||||
if HAVE_CRT0
|
if HAVE_CRT0
|
||||||
|
@ -80,6 +82,8 @@ endif
|
||||||
|
|
||||||
toollib_DATA = $(CRT0) $(CRT1)
|
toollib_DATA = $(CRT0) $(CRT1)
|
||||||
|
|
||||||
|
CLEANFILES += libg.a
|
||||||
|
|
||||||
# The functions ldexp, frexp and modf are traditionally supplied in
|
# The functions ldexp, frexp and modf are traditionally supplied in
|
||||||
# both libc.a and libm.a. We build them in libm.a and copy them over,
|
# both libc.a and libm.a. We build them in libm.a and copy them over,
|
||||||
# along with some required supporting routines.
|
# along with some required supporting routines.
|
||||||
|
@ -99,18 +103,20 @@ MATHOBJS_IN_LIBC = \
|
||||||
$(lpfx)s_copysign.o $(lpfx)sf_copysign.o
|
$(lpfx)s_copysign.o $(lpfx)sf_copysign.o
|
||||||
|
|
||||||
libc.a: libc/libc.a libm.a
|
libc.a: libc/libc.a libm.a
|
||||||
rm -rf libc.a libg.a tmp
|
rm -rf libc.a tmp
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
cd tmp; \
|
cd tmp; \
|
||||||
$(AR) x ../libm.a $(MATHOBJS_IN_LIBC) ; \
|
$(AR) x ../libm.a $(MATHOBJS_IN_LIBC) ; \
|
||||||
$(AR) x ../libc/libc.a ; \
|
$(AR) x ../libc/libc.a ; \
|
||||||
$(AR) $(AR_FLAGS) ../$@ *.o
|
$(AR) $(AR_FLAGS) ../$@ *.o
|
||||||
$(RANLIB) libc.a
|
$(RANLIB) libc.a
|
||||||
ln libc.a libg.a >/dev/null 2>/dev/null || cp libc.a libg.a
|
|
||||||
rm -rf tmp
|
rm -rf tmp
|
||||||
|
|
||||||
libc/libc.a: ; @true
|
libc/libc.a: ; @true
|
||||||
|
|
||||||
|
libg.a: libc.a
|
||||||
|
$(AM_V_GEN)ln libc.a libg.a >/dev/null 2>/dev/null || cp libc.a libg.a
|
||||||
|
|
||||||
libm.a: libm/libm.a
|
libm.a: libm/libm.a
|
||||||
rm -f $@
|
rm -f $@
|
||||||
ln $< $@ >/dev/null 2>/dev/null || cp $< $@
|
ln $< $@ >/dev/null 2>/dev/null || cp $< $@
|
||||||
|
@ -247,7 +253,7 @@ stmp-targ-include: config.status
|
||||||
$(MAKE) targ-include/newlib.h
|
$(MAKE) targ-include/newlib.h
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
CLEANFILES = stmp-targ-include
|
CLEANFILES += stmp-targ-include
|
||||||
|
|
||||||
## We hook install-multi because this Makefile doesn't have any exec targets,
|
## We hook install-multi because this Makefile doesn't have any exec targets,
|
||||||
## only data targets. If that ever changes, this should be removed and the
|
## only data targets. If that ever changes, this should be removed and the
|
||||||
|
|
|
@ -442,10 +442,16 @@ AUTOMAKE_OPTIONS = dejagnu
|
||||||
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
|
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
|
||||||
|
|
||||||
# Variables that will accumulate in subdirs.
|
# Variables that will accumulate in subdirs.
|
||||||
|
CLEANFILES = libg.a stmp-targ-include libc/targetdep.tex \
|
||||||
|
libc/targetdep.tex.stamp $(LIBC_CHEWOUT_FILES) \
|
||||||
|
$(LIBC_DOCBOOK_OUT_FILES) libc/*.xml libc/*.xml.stamp libc/*.3 \
|
||||||
|
libm/targetdep.tex libm/targetdep.tex.stamp \
|
||||||
|
$(LIBM_CHEWOUT_FILES) $(LIBM_DOCBOOK_OUT_FILES) libm/*.xml \
|
||||||
|
libm/*.xml.stamp libm/*.3
|
||||||
PHONY = $(am__append_4)
|
PHONY = $(am__append_4)
|
||||||
SUFFIXES = $(am__append_5)
|
SUFFIXES = $(am__append_5)
|
||||||
info_TEXINFOS = libc/libc.texi libm/libm.texi
|
info_TEXINFOS = libc/libc.texi libm/libm.texi
|
||||||
noinst_DATA = stmp-targ-include $(am__append_1) $(am__append_2) \
|
noinst_DATA = stmp-targ-include libg.a $(am__append_1) $(am__append_2) \
|
||||||
$(am__append_3)
|
$(am__append_3)
|
||||||
@NEWLIB_HW_FP_FALSE@MATHDIR = math
|
@NEWLIB_HW_FP_FALSE@MATHDIR = math
|
||||||
|
|
||||||
|
@ -522,12 +528,6 @@ MATHOBJS_IN_LIBC = \
|
||||||
$(lpfx)s_finite.o $(lpfx)sf_finite.o \
|
$(lpfx)s_finite.o $(lpfx)sf_finite.o \
|
||||||
$(lpfx)s_copysign.o $(lpfx)sf_copysign.o
|
$(lpfx)s_copysign.o $(lpfx)sf_copysign.o
|
||||||
|
|
||||||
CLEANFILES = stmp-targ-include libc/targetdep.tex \
|
|
||||||
libc/targetdep.tex.stamp $(LIBC_CHEWOUT_FILES) \
|
|
||||||
$(LIBC_DOCBOOK_OUT_FILES) libc/*.xml libc/*.xml.stamp libc/*.3 \
|
|
||||||
libm/targetdep.tex libm/targetdep.tex.stamp \
|
|
||||||
$(LIBM_CHEWOUT_FILES) $(LIBM_DOCBOOK_OUT_FILES) libm/*.xml \
|
|
||||||
libm/*.xml.stamp libm/*.3
|
|
||||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
||||||
MULTISRCTOP =
|
MULTISRCTOP =
|
||||||
MULTIBUILDTOP =
|
MULTIBUILDTOP =
|
||||||
|
@ -1396,18 +1396,20 @@ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
|
||||||
|
|
||||||
|
|
||||||
libc.a: libc/libc.a libm.a
|
libc.a: libc/libc.a libm.a
|
||||||
rm -rf libc.a libg.a tmp
|
rm -rf libc.a tmp
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
cd tmp; \
|
cd tmp; \
|
||||||
$(AR) x ../libm.a $(MATHOBJS_IN_LIBC) ; \
|
$(AR) x ../libm.a $(MATHOBJS_IN_LIBC) ; \
|
||||||
$(AR) x ../libc/libc.a ; \
|
$(AR) x ../libc/libc.a ; \
|
||||||
$(AR) $(AR_FLAGS) ../$@ *.o
|
$(AR) $(AR_FLAGS) ../$@ *.o
|
||||||
$(RANLIB) libc.a
|
$(RANLIB) libc.a
|
||||||
ln libc.a libg.a >/dev/null 2>/dev/null || cp libc.a libg.a
|
|
||||||
rm -rf tmp
|
rm -rf tmp
|
||||||
|
|
||||||
libc/libc.a: ; @true
|
libc/libc.a: ; @true
|
||||||
|
|
||||||
|
libg.a: libc.a
|
||||||
|
$(AM_V_GEN)ln libc.a libg.a >/dev/null 2>/dev/null || cp libc.a libg.a
|
||||||
|
|
||||||
libm.a: libm/libm.a
|
libm.a: libm/libm.a
|
||||||
rm -f $@
|
rm -f $@
|
||||||
ln $< $@ >/dev/null 2>/dev/null || cp $< $@
|
ln $< $@ >/dev/null 2>/dev/null || cp $< $@
|
||||||
|
|
Loading…
Reference in New Issue