2000-02-18 03:39:52 +08:00
|
|
|
## Process this file with automake to generate Makefile.in
|
|
|
|
|
2022-01-18 02:56:48 +08:00
|
|
|
AUTOMAKE_OPTIONS = dejagnu
|
2021-12-31 02:29:02 +08:00
|
|
|
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2021-11-11 10:04:31 +08:00
|
|
|
# Variables that will accumulate in subdirs.
|
2022-02-13 16:03:12 +08:00
|
|
|
CLEANFILES =
|
2022-02-13 16:11:01 +08:00
|
|
|
EXTRA_DIST =
|
2022-03-14 10:28:25 +08:00
|
|
|
EXTRA_PROGRAMS =
|
2021-11-11 10:04:31 +08:00
|
|
|
PHONY =
|
2022-01-21 15:12:26 +08:00
|
|
|
SUFFIXES =
|
2022-03-14 10:28:25 +08:00
|
|
|
check_PROGRAMS =
|
2022-01-21 15:12:26 +08:00
|
|
|
info_TEXINFOS =
|
2021-11-11 10:04:31 +08:00
|
|
|
noinst_DATA =
|
2022-02-13 16:11:01 +08:00
|
|
|
INSTALL_DATA_LOCAL =
|
2001-12-14 07:50:11 +08:00
|
|
|
|
2012-10-25 05:01:39 +08:00
|
|
|
# The newlib hardware floating-point routines have been disabled due to
|
|
|
|
# inaccuracy. If you wish to work on them, you will need to edit the
|
|
|
|
# configure.in file to re-enable the configuration option. By default,
|
|
|
|
# the NEWLIB_HW_FP variable will always be false.
|
2001-12-14 07:50:11 +08:00
|
|
|
if NEWLIB_HW_FP
|
|
|
|
MATHDIR = mathfp
|
|
|
|
else
|
|
|
|
MATHDIR = math
|
|
|
|
endif
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
# Work around what appears to be a GNU make bug handling MAKEFLAGS
|
|
|
|
# values defined in terms of make variables, as is the case for CC and
|
|
|
|
# friends when we are called from the top level Makefile.
|
|
|
|
AM_MAKEFLAGS = \
|
|
|
|
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
|
|
|
|
"CFLAGS=$(CFLAGS)" \
|
2006-06-06 01:42:57 +08:00
|
|
|
"CCASFLAGS=$(CCASFLAGS)" \
|
2000-02-18 03:39:52 +08:00
|
|
|
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
|
|
|
|
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
|
2006-01-12 07:50:33 +08:00
|
|
|
"INSTALL=$(INSTALL)" \
|
2000-02-18 03:39:52 +08:00
|
|
|
"LDFLAGS=$(LDFLAGS)" \
|
|
|
|
"LIBCFLAGS=$(LIBCFLAGS)" \
|
|
|
|
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
|
|
|
|
"MAKE=$(MAKE)" \
|
|
|
|
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
|
|
|
|
"PICFLAG=$(PICFLAG)" \
|
|
|
|
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
|
|
|
|
"SHELL=$(SHELL)" \
|
|
|
|
"EXPECT=$(EXPECT)" \
|
|
|
|
"RUNTEST=$(RUNTEST)" \
|
|
|
|
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
|
|
|
|
"exec_prefix=$(exec_prefix)" \
|
|
|
|
"infodir=$(infodir)" \
|
|
|
|
"libdir=$(libdir)" \
|
|
|
|
"prefix=$(prefix)" \
|
|
|
|
"tooldir=$(tooldir)" \
|
2002-05-23 02:25:12 +08:00
|
|
|
"top_toollibdir=$(toollibdir)" \
|
2000-02-18 03:39:52 +08:00
|
|
|
"AR=$(AR)" \
|
|
|
|
"AS=$(AS)" \
|
2002-04-27 04:18:52 +08:00
|
|
|
"CC=$(CC_FOR_NEWLIB)" \
|
2000-02-18 03:39:52 +08:00
|
|
|
"LD=$(LD)" \
|
|
|
|
"LIBCFLAGS=$(LIBCFLAGS)" \
|
|
|
|
"NM=$(NM)" \
|
|
|
|
"PICFLAG=$(PICFLAG)" \
|
|
|
|
"RANLIB=$(RANLIB)" \
|
|
|
|
"DESTDIR=$(DESTDIR)"
|
|
|
|
|
2000-12-09 05:31:08 +08:00
|
|
|
FLAGS_TO_PASS=$(AM_MAKEFLAGS)
|
|
|
|
|
2022-12-14 16:20:32 +08:00
|
|
|
srcroot = $(top_srcdir)/..
|
2000-02-18 03:39:52 +08:00
|
|
|
tooldir = $(exec_prefix)/$(host_alias)
|
|
|
|
toollibdir = $(tooldir)/lib$(MULTISUBDIR)
|
|
|
|
|
2022-02-13 16:11:01 +08:00
|
|
|
# These are useful for standalone object files like crt0.o.
|
|
|
|
AM_CFLAGS = $(AM_CFLAGS_$(subst /,_,$(@D))) $(AM_CFLAGS_$(subst /,_,$(@D)_$(<F)))
|
|
|
|
AM_CCASFLAGS = $(AM_CCASFLAGS_$(subst /,_,$(@D))) $(AM_CCASFLAGS_$(subst /,_,$(@D)_$(<F)))
|
2023-02-10 05:59:31 +08:00
|
|
|
if HAVE_LIBC_MACHINE_ARM
|
2022-12-14 16:20:32 +08:00
|
|
|
AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(TARGET_CFLAGS) $(AM_CPPFLAGS_$(subst /,_,$(@D))) $(AM_CPPFLAGS_$(subst /,_,$(@D)_$(<F))) -idirafter $(srcroot)/include
|
2023-02-10 05:59:31 +08:00
|
|
|
else
|
|
|
|
AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(TARGET_CFLAGS) $(AM_CPPFLAGS_$(subst /,_,$(@D))) $(AM_CPPFLAGS_$(subst /,_,$(@D)_$(<F)))
|
|
|
|
endif
|
2016-12-23 03:50:00 +08:00
|
|
|
|
2002-04-04 06:46:21 +08:00
|
|
|
toollib_LIBRARIES = libm.a \
|
|
|
|
libc.a
|
2022-02-13 16:03:12 +08:00
|
|
|
noinst_DATA += libg.a
|
2016-12-23 03:50:00 +08:00
|
|
|
if HAVE_MULTISUBDIR
|
|
|
|
BUILD_MULTISUBDIR = $(builddir)$(MULTISUBDIR)
|
|
|
|
if HAVE_CRT0
|
|
|
|
noinst_DATA += $(BUILD_MULTISUBDIR)/$(CRT0)
|
|
|
|
endif
|
|
|
|
noinst_DATA += $(BUILD_MULTISUBDIR)/libc.a $(BUILD_MULTISUBDIR)/libm.a
|
|
|
|
endif
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2002-04-05 06:41:11 +08:00
|
|
|
toollib_DATA = $(CRT0) $(CRT1)
|
2001-12-14 07:50:11 +08:00
|
|
|
|
2022-02-13 16:03:12 +08:00
|
|
|
CLEANFILES += libg.a
|
|
|
|
|
2022-02-22 04:42:18 +08:00
|
|
|
## GNU ar has undocumented behavior when specifying the same name multiple times
|
|
|
|
## in a single invocation, so we have to dedupe ourselves. The algorithm here:
|
|
|
|
## - Generates the set of unique objects based on the basename.
|
|
|
|
## - Favors objects later in the list (since machine objects come last).
|
|
|
|
## - Outputs object list in same order as input for reproducibility.
|
|
|
|
## https://sourceware.org/PR28917
|
|
|
|
AWK_UNIQUE_OBJS = $(AWK) '{ \
|
|
|
|
for (i = NF; i > 0; --i) { \
|
2022-03-09 14:46:13 +08:00
|
|
|
count = split($$i, parts, "/"); \
|
|
|
|
name = parts[count]; \
|
2022-02-22 04:42:18 +08:00
|
|
|
if (!(name in seen)) { \
|
|
|
|
objs[i] = $$i; \
|
|
|
|
seen[name] = 1; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
for (i in objs) \
|
|
|
|
print objs[i]; \
|
|
|
|
}'
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
# 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,
|
|
|
|
# along with some required supporting routines.
|
|
|
|
MATHOBJS_IN_LIBC = \
|
newlib: libm: merge build up a directory
Convert all the libm/ subdir makes into the top-level Makefile. This
allows us to build all of libm from the top Makefile without using any
recursive make calls. This is faster and avoids the funky lib.a logic
where we unpack subdir archives to repack into a single libm.a. The
machine override logic is maintained though by way of Makefile include
ordering, and source file accumulation in libm_a_SOURCES.
One thing to note is that this will require GNU Make because of:
libm_a_CFLAGS = ... $(libm_a_CFLAGS_$(subst /,_,$(@D)))
This was the only way I could find to supporting per-dir compiler
settings, and I couldn't find a POSIX compatible way of transforming
the variable content. I don't think this is a big deal as other
Makefiles in the tree are using GNU Make-specific syntax, but I call
this out as it's the only one so far in the new automake code that
I've been writing.
Automake doesn't provide precise control over the output object names
(by design). This is fine by default as we get consistent names in all
the subdirs: libm_a-<source>.o. But this relies on using the same set
of compiler flags for all objects. We currently compile libm/common/
with different optimizations than the rest.
If we want to compile objects differently, we can create an intermediate
archive with the subset of objects with unique flags, and then add those
objects to the main archive. But Automake will use a different prefix
for the objects, and thus we can't rely on ordering to override.
But if we leverage $@, we can turn Automake's CFLAGS into a multiplex
on a per-dir (and even per-file if we wanted) basis. Unfortunately,
since $@ contains /, Automake complains it's an invalid name. While
GNU Make supports this, it's a POSIX extension, so Automake flags it.
Using $(subst) avoids the Automake warning to get a POSIX compliant
name, albeit with a GNU Make extension.
2022-02-10 13:50:36 +08:00
|
|
|
libm_a-s_fpclassify.o libm_a-sf_fpclassify.o \
|
|
|
|
libm_a-s_isinf.o libm_a-sf_isinf.o \
|
|
|
|
libm_a-s_isnan.o libm_a-sf_isnan.o \
|
|
|
|
libm_a-s_isinfd.o libm_a-sf_isinff.o \
|
|
|
|
libm_a-s_isnand.o libm_a-sf_isnanf.o \
|
|
|
|
libm_a-s_nan.o libm_a-sf_nan.o \
|
|
|
|
libm_a-s_ldexp.o libm_a-sf_ldexp.o \
|
|
|
|
libm_a-s_frexp.o libm_a-sf_frexp.o libm_a-frexpl.o \
|
|
|
|
libm_a-s_modf.o \
|
|
|
|
libm_a-sf_modf.o libm_a-s_scalbn.o \
|
|
|
|
libm_a-sf_scalbn.o \
|
|
|
|
libm_a-s_finite.o libm_a-sf_finite.o \
|
|
|
|
libm_a-s_copysign.o libm_a-sf_copysign.o
|
2001-12-14 07:50:11 +08:00
|
|
|
|
2022-02-13 16:11:01 +08:00
|
|
|
## Place the libm_a objects in libc/ to keep the top dir tidy.
|
|
|
|
stamp-libc-math-objects: libm.a
|
|
|
|
$(AM_V_GEN)cd libc && $(AR) x ../$< $(MATHOBJS_IN_LIBC)
|
|
|
|
$(AM_V_at)touch $@
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2022-02-13 16:11:01 +08:00
|
|
|
CLEANFILES += $(MATHOBJS_IN_LIBC)
|
|
|
|
|
|
|
|
libc_a_SOURCES =
|
|
|
|
libc_a_CFLAGS = $(AM_CFLAGS) $(libc_a_CFLAGS_$(subst /,_,$(@D))) $(libc_a_CFLAGS_$(subst /,_,$(@D)_$(<F)))
|
|
|
|
libc_a_CCASFLAGS = $(AM_CCASFLAGS) $(libc_a_CCASFLAGS_$(subst /,_,$(@D))) $(libc_a_CCASFLAGS_$(subst /,_,$(@D)_$(<F)))
|
|
|
|
libc_a_CPPFLAGS = $(AM_CPPFLAGS) $(libc_a_CPPFLAGS_$(subst /,_,$(@D))) $(libc_a_CPPFLAGS_$(subst /,_,$(@D)_$(<F)))
|
|
|
|
libc_a_DEPENDENCIES = stamp-libc-math-objects
|
|
|
|
## Best to avoid libc_a_LIBADD entirely to avoid having 2 independent lists
|
|
|
|
## with separate overriding behavior (libc_a_OBJECTS is the other). See the
|
|
|
|
## AWK_UNIQUE_OBJS comment aove for more details.
|
|
|
|
$(libc_a_OBJECTS) $(libc_a_LIBADD): stmp-targ-include
|
|
|
|
|
|
|
|
libc.a: $(libc_a_OBJECTS) $(libc_a_DEPENDENCIES)
|
|
|
|
$(AM_V_at)rm -f $@
|
|
|
|
$(AM_V_AR)objs=`echo $(libc_a_OBJECTS) | $(AWK_UNIQUE_OBJS)` || exit $$?; \
|
|
|
|
$(AR) $(ARFLAGS) $@ $$objs $(MATHOBJS_IN_LIBC:%=libc/%)
|
|
|
|
$(AM_V_at)$(RANLIB) $@
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2022-02-13 16:03:12 +08:00
|
|
|
libg.a: libc.a
|
|
|
|
$(AM_V_GEN)ln libc.a libg.a >/dev/null 2>/dev/null || cp libc.a libg.a
|
|
|
|
|
newlib: libm: merge build up a directory
Convert all the libm/ subdir makes into the top-level Makefile. This
allows us to build all of libm from the top Makefile without using any
recursive make calls. This is faster and avoids the funky lib.a logic
where we unpack subdir archives to repack into a single libm.a. The
machine override logic is maintained though by way of Makefile include
ordering, and source file accumulation in libm_a_SOURCES.
One thing to note is that this will require GNU Make because of:
libm_a_CFLAGS = ... $(libm_a_CFLAGS_$(subst /,_,$(@D)))
This was the only way I could find to supporting per-dir compiler
settings, and I couldn't find a POSIX compatible way of transforming
the variable content. I don't think this is a big deal as other
Makefiles in the tree are using GNU Make-specific syntax, but I call
this out as it's the only one so far in the new automake code that
I've been writing.
Automake doesn't provide precise control over the output object names
(by design). This is fine by default as we get consistent names in all
the subdirs: libm_a-<source>.o. But this relies on using the same set
of compiler flags for all objects. We currently compile libm/common/
with different optimizations than the rest.
If we want to compile objects differently, we can create an intermediate
archive with the subset of objects with unique flags, and then add those
objects to the main archive. But Automake will use a different prefix
for the objects, and thus we can't rely on ordering to override.
But if we leverage $@, we can turn Automake's CFLAGS into a multiplex
on a per-dir (and even per-file if we wanted) basis. Unfortunately,
since $@ contains /, Automake complains it's an invalid name. While
GNU Make supports this, it's a POSIX extension, so Automake flags it.
Using $(subst) avoids the Automake warning to get a POSIX compliant
name, albeit with a GNU Make extension.
2022-02-10 13:50:36 +08:00
|
|
|
libm_a_SOURCES =
|
|
|
|
libm_a_CFLAGS = $(AM_CFLAGS) $(libm_a_CFLAGS_$(subst /,_,$(@D))) $(libm_a_CFLAGS_$(subst /,_,$(@D)_$(<F)))
|
|
|
|
libm_a_CCASFLAGS = $(AM_CCASFLAGS) $(libm_a_CCASFLAGS_$(subst /,_,$(@D))) $(libm_a_CCASFLAGS_$(subst /,_,$(@D)_$(<F)))
|
|
|
|
libm_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/libm/common $(libm_a_CPPFLAGS_$(subst /,_,$(@D))) $(libm_a_CPPFLAGS_$(subst /,_,$(@D)_$(<F)))
|
2022-02-22 04:42:18 +08:00
|
|
|
## Best to avoid libm_a_LIBADD entirely to avoid having 2 independent lists
|
|
|
|
## with separate overriding behavior (libm_a_OBJECTS is the other). See the
|
|
|
|
## AWK_UNIQUE_OBJS comment aove for more details.
|
newlib: libm: merge build up a directory
Convert all the libm/ subdir makes into the top-level Makefile. This
allows us to build all of libm from the top Makefile without using any
recursive make calls. This is faster and avoids the funky lib.a logic
where we unpack subdir archives to repack into a single libm.a. The
machine override logic is maintained though by way of Makefile include
ordering, and source file accumulation in libm_a_SOURCES.
One thing to note is that this will require GNU Make because of:
libm_a_CFLAGS = ... $(libm_a_CFLAGS_$(subst /,_,$(@D)))
This was the only way I could find to supporting per-dir compiler
settings, and I couldn't find a POSIX compatible way of transforming
the variable content. I don't think this is a big deal as other
Makefiles in the tree are using GNU Make-specific syntax, but I call
this out as it's the only one so far in the new automake code that
I've been writing.
Automake doesn't provide precise control over the output object names
(by design). This is fine by default as we get consistent names in all
the subdirs: libm_a-<source>.o. But this relies on using the same set
of compiler flags for all objects. We currently compile libm/common/
with different optimizations than the rest.
If we want to compile objects differently, we can create an intermediate
archive with the subset of objects with unique flags, and then add those
objects to the main archive. But Automake will use a different prefix
for the objects, and thus we can't rely on ordering to override.
But if we leverage $@, we can turn Automake's CFLAGS into a multiplex
on a per-dir (and even per-file if we wanted) basis. Unfortunately,
since $@ contains /, Automake complains it's an invalid name. While
GNU Make supports this, it's a POSIX extension, so Automake flags it.
Using $(subst) avoids the Automake warning to get a POSIX compliant
name, albeit with a GNU Make extension.
2022-02-10 13:50:36 +08:00
|
|
|
$(libm_a_OBJECTS): stmp-targ-include
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2022-02-22 04:42:18 +08:00
|
|
|
libm.a: $(libm_a_OBJECTS) $(libm_a_DEPENDENCIES)
|
|
|
|
$(AM_V_at)rm -f $@
|
|
|
|
$(AM_V_AR)objs=`echo $(libm_a_OBJECTS) | $(AWK_UNIQUE_OBJS)` || exit $$?; \
|
|
|
|
$(AR) $(ARFLAGS) $@ $$objs
|
|
|
|
$(AM_V_at)$(RANLIB) $@
|
|
|
|
|
2016-12-23 03:50:00 +08:00
|
|
|
if HAVE_MULTISUBDIR
|
|
|
|
$(BUILD_MULTISUBDIR):
|
2022-02-19 13:08:32 +08:00
|
|
|
$(AM_V_at)$(MKDIR_P) $@
|
2016-12-23 03:50:00 +08:00
|
|
|
|
|
|
|
$(BUILD_MULTISUBDIR)/crt0.o: $(CRT0_DIR)$(CRT0) $(BUILD_MULTISUBDIR)
|
2022-02-19 13:08:32 +08:00
|
|
|
$(AM_V_at)rm -f $@
|
|
|
|
$(AM_V_GEN)ln $< $@ >/dev/null 2>/dev/null || cp $< $@
|
2016-12-23 03:50:00 +08:00
|
|
|
|
|
|
|
$(BUILD_MULTISUBDIR)/libc.a: libc.a $(BUILD_MULTISUBDIR)
|
2022-02-19 13:08:32 +08:00
|
|
|
$(AM_V_at)rm -f $@
|
|
|
|
$(AM_V_GEN)ln $< $@ >/dev/null 2>/dev/null || cp $< $@
|
2022-02-24 11:01:05 +08:00
|
|
|
|
|
|
|
$(BUILD_MULTISUBDIR)/libg.a: libg.a ${BUILD_MULTISUBDIR}
|
2022-02-19 13:08:32 +08:00
|
|
|
$(AM_V_at)rm -f $@
|
|
|
|
$(AM_V_GEN)ln $< $@ >/dev/null 2>/dev/null || cp $< $@
|
2016-12-23 03:50:00 +08:00
|
|
|
|
|
|
|
$(BUILD_MULTISUBDIR)/libm.a: libm.a $(BUILD_MULTISUBDIR)
|
2022-02-19 13:08:32 +08:00
|
|
|
$(AM_V_at)rm -f $@
|
|
|
|
$(AM_V_GEN)ln $< $@ >/dev/null 2>/dev/null || cp $< $@
|
2016-12-23 03:50:00 +08:00
|
|
|
endif
|
|
|
|
|
2002-04-18 03:13:11 +08:00
|
|
|
crt0.o: $(CRT0_DIR)$(CRT0)
|
2022-02-19 13:08:32 +08:00
|
|
|
$(AM_V_at)rm -f $@
|
|
|
|
$(AM_V_GEN)ln $< $@ >/dev/null 2>/dev/null || cp $< $@
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2022-02-13 16:11:01 +08:00
|
|
|
$(CRT0_DIR)$(CRT0): stmp-targ-include
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2002-04-18 03:13:11 +08:00
|
|
|
crt1.o: $(CRT1_DIR)$(CRT1)
|
2022-02-19 13:08:32 +08:00
|
|
|
$(AM_V_at)rm -f $@
|
|
|
|
$(AM_V_GEN)ln $< $@ >/dev/null 2>/dev/null || cp $< $@
|
2002-04-05 06:41:11 +08:00
|
|
|
|
2022-02-13 16:11:01 +08:00
|
|
|
$(CRT1_DIR)$(CRT1): stmp-targ-include
|
2002-04-05 06:41:11 +08:00
|
|
|
|
Define the newlib version macros in one place: _newlib_version.h.
Currently, the newlib version information needs to be updated in two places:
- newlib/acinclude.m4
- newlib/libc/include/sys/features.h
The goal of this patch is to:
- supply a single location for defining the newlib version
information: newlib/acinclude.m4
- define __NEWLIB__, __NEWLIB_MINOR__ and __NEWLIB_PATCHLEVEL__
This is in line with what gcc does for its version macros. See:
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
This patch moves the definition of the _NEWLIB_VERSION, __NEWLIB__
and __NEWLIB_MINOR__ macros from newlib/libc/include/sys/features.h,
to the newly generated newlib/_newlib_version.h file. Additionally,
the __NEWLIB_PATCHLEVEL__ macro was created, for completeness.
In order to stay backwards compatible, newlib/_newlib_version.h gets
included by newlib/newlib.h and newlib/libc/include/sys/features.h.
Note: This patch does _not_ include the modifications to the following
files, as these should all be generated any way.
*Makefile.in,
*aclocal.m4,
*configure
stamp-* files
Signed-off-by: Pieter du Preez <pdupreez@gmail.com>
2016-02-14 18:12:06 +08:00
|
|
|
targ-include:
|
2022-02-19 13:08:32 +08:00
|
|
|
$(AM_V_GEN)$(MKDIR_P) $@
|
Define the newlib version macros in one place: _newlib_version.h.
Currently, the newlib version information needs to be updated in two places:
- newlib/acinclude.m4
- newlib/libc/include/sys/features.h
The goal of this patch is to:
- supply a single location for defining the newlib version
information: newlib/acinclude.m4
- define __NEWLIB__, __NEWLIB_MINOR__ and __NEWLIB_PATCHLEVEL__
This is in line with what gcc does for its version macros. See:
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
This patch moves the definition of the _NEWLIB_VERSION, __NEWLIB__
and __NEWLIB_MINOR__ macros from newlib/libc/include/sys/features.h,
to the newly generated newlib/_newlib_version.h file. Additionally,
the __NEWLIB_PATCHLEVEL__ macro was created, for completeness.
In order to stay backwards compatible, newlib/_newlib_version.h gets
included by newlib/newlib.h and newlib/libc/include/sys/features.h.
Note: This patch does _not_ include the modifications to the following
files, as these should all be generated any way.
*Makefile.in,
*aclocal.m4,
*configure
stamp-* files
Signed-off-by: Pieter du Preez <pdupreez@gmail.com>
2016-02-14 18:12:06 +08:00
|
|
|
|
|
|
|
targ-include/newlib.h: targ-include/_newlib_version.h
|
|
|
|
|
|
|
|
targ-include/sys targ-include/machine targ-include/bits: targ-include/_newlib_version.h targ-include/newlib.h
|
2022-02-19 13:08:32 +08:00
|
|
|
$(AM_V_GEN)$(MKDIR_P) $@
|
Define the newlib version macros in one place: _newlib_version.h.
Currently, the newlib version information needs to be updated in two places:
- newlib/acinclude.m4
- newlib/libc/include/sys/features.h
The goal of this patch is to:
- supply a single location for defining the newlib version
information: newlib/acinclude.m4
- define __NEWLIB__, __NEWLIB_MINOR__ and __NEWLIB_PATCHLEVEL__
This is in line with what gcc does for its version macros. See:
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
This patch moves the definition of the _NEWLIB_VERSION, __NEWLIB__
and __NEWLIB_MINOR__ macros from newlib/libc/include/sys/features.h,
to the newly generated newlib/_newlib_version.h file. Additionally,
the __NEWLIB_PATCHLEVEL__ macro was created, for completeness.
In order to stay backwards compatible, newlib/_newlib_version.h gets
included by newlib/newlib.h and newlib/libc/include/sys/features.h.
Note: This patch does _not_ include the modifications to the following
files, as these should all be generated any way.
*Makefile.in,
*aclocal.m4,
*configure
stamp-* files
Signed-off-by: Pieter du Preez <pdupreez@gmail.com>
2016-02-14 18:12:06 +08:00
|
|
|
|
|
|
|
targ-include/newlib.h: newlib.h targ-include
|
2022-02-19 13:08:32 +08:00
|
|
|
$(AM_V_GEN)cp newlib.h $@
|
Define the newlib version macros in one place: _newlib_version.h.
Currently, the newlib version information needs to be updated in two places:
- newlib/acinclude.m4
- newlib/libc/include/sys/features.h
The goal of this patch is to:
- supply a single location for defining the newlib version
information: newlib/acinclude.m4
- define __NEWLIB__, __NEWLIB_MINOR__ and __NEWLIB_PATCHLEVEL__
This is in line with what gcc does for its version macros. See:
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
This patch moves the definition of the _NEWLIB_VERSION, __NEWLIB__
and __NEWLIB_MINOR__ macros from newlib/libc/include/sys/features.h,
to the newly generated newlib/_newlib_version.h file. Additionally,
the __NEWLIB_PATCHLEVEL__ macro was created, for completeness.
In order to stay backwards compatible, newlib/_newlib_version.h gets
included by newlib/newlib.h and newlib/libc/include/sys/features.h.
Note: This patch does _not_ include the modifications to the following
files, as these should all be generated any way.
*Makefile.in,
*aclocal.m4,
*configure
stamp-* files
Signed-off-by: Pieter du Preez <pdupreez@gmail.com>
2016-02-14 18:12:06 +08:00
|
|
|
|
|
|
|
targ-include/_newlib_version.h: _newlib_version.h targ-include
|
2022-02-19 13:08:32 +08:00
|
|
|
$(AM_V_GEN)cp _newlib_version.h $@
|
2002-04-05 06:41:11 +08:00
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
# The targ-include directory just holds the includes files for the
|
|
|
|
# particular system and machine we have been configured for. It is
|
|
|
|
# used while building.
|
2022-02-19 13:54:20 +08:00
|
|
|
TARG_INCLUDE_CP_DIR = \
|
|
|
|
; srcdir="$(srcdir)/libc/$$s"; dstdir="targ-include/$$d"; \
|
|
|
|
if (cd $$srcdir 2>/dev/null && [ "`echo *.h`" != "*.h" ]); then cp $$srcdir/*.h $$dstdir/; fi
|
2000-02-18 03:39:52 +08:00
|
|
|
stmp-targ-include: config.status
|
2022-02-19 13:08:32 +08:00
|
|
|
$(AM_V_GEN)rm -rf targ-include stmp-targ-include
|
|
|
|
$(AM_V_at)$(MAKE) targ-include/sys \
|
Define the newlib version macros in one place: _newlib_version.h.
Currently, the newlib version information needs to be updated in two places:
- newlib/acinclude.m4
- newlib/libc/include/sys/features.h
The goal of this patch is to:
- supply a single location for defining the newlib version
information: newlib/acinclude.m4
- define __NEWLIB__, __NEWLIB_MINOR__ and __NEWLIB_PATCHLEVEL__
This is in line with what gcc does for its version macros. See:
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
This patch moves the definition of the _NEWLIB_VERSION, __NEWLIB__
and __NEWLIB_MINOR__ macros from newlib/libc/include/sys/features.h,
to the newly generated newlib/_newlib_version.h file. Additionally,
the __NEWLIB_PATCHLEVEL__ macro was created, for completeness.
In order to stay backwards compatible, newlib/_newlib_version.h gets
included by newlib/newlib.h and newlib/libc/include/sys/features.h.
Note: This patch does _not_ include the modifications to the following
files, as these should all be generated any way.
*Makefile.in,
*aclocal.m4,
*configure
stamp-* files
Signed-off-by: Pieter du Preez <pdupreez@gmail.com>
2016-02-14 18:12:06 +08:00
|
|
|
targ-include/machine \
|
2016-02-26 04:04:19 +08:00
|
|
|
targ-include/bits
|
2022-02-19 13:54:20 +08:00
|
|
|
$(AM_V_at)if [ -n "$(shared_machine_dir)" ]; then \
|
|
|
|
s=machine/$(shared_machine_dir)/machine d=machine $(TARG_INCLUDE_CP_DIR) || exit $$?; \
|
|
|
|
s=machine/$(shared_machine_dir)/sys d=sys $(TARG_INCLUDE_CP_DIR) || exit $$?; \
|
|
|
|
s=machine/$(shared_machine_dir)/include d= $(TARG_INCLUDE_CP_DIR) || exit $$?; \
|
2021-03-24 17:32:50 +08:00
|
|
|
fi
|
2022-02-19 13:54:20 +08:00
|
|
|
$(AM_V_at)s=machine/$(machine_dir)/machine d=machine $(TARG_INCLUDE_CP_DIR)
|
|
|
|
$(AM_V_at)s=machine/$(machine_dir)/sys d=sys $(TARG_INCLUDE_CP_DIR)
|
|
|
|
$(AM_V_at)s=machine/$(machine_dir)/include d= $(TARG_INCLUDE_CP_DIR)
|
|
|
|
$(AM_V_at)s=sys/$(sys_dir)/include d= $(TARG_INCLUDE_CP_DIR)
|
|
|
|
$(AM_V_at)for i in $(srcdir)/libc/sys/$(sys_dir)/include/*/; do \
|
2010-12-15 06:35:27 +08:00
|
|
|
if [ -d $$i ]; then \
|
2022-02-19 13:54:20 +08:00
|
|
|
d=`basename $$i`; \
|
|
|
|
$(MKDIR_P) targ-include/$$d; \
|
|
|
|
s=sys/${sys_dir}/include/$$d $(TARG_INCLUDE_CP_DIR) || exit $$?; \
|
|
|
|
fi \
|
2002-05-17 Jeff Johnston <jjohnstn@redhat.com>
* Makefile.am: Copy and install headers from sys/machine/include
directory. Also pass $toollibdir to lower-level directories.
* Makefile.in: Regenerated.
* libc/include/stdio.h[!_REENT_ONLY]: Change stdin, stdout, and
stderr to use _REENT macro instead of _impure_ptr directly.
* libc/include/sys/config.h[__i386__][__linux__]: Define
__DYNAMIC_REENT__.
* libc/include/sys/reent.h[!_REENT_ONLY]: Change _REENT macro to be
call to __getreent() function if !__SINGLE_THREAD__ and
__DYNAMIC_REENT__ is set.
* libc/reent/Makefile.am: Add support for getreent.c.
* libc/reent/Makefile.in: Regenerated.
* libc/string/strerror.c: Add check if EOPNOTSUPP and ENOTSUP are same.
* libc/sys/linux/Makefile.am: Add support for new files.
* libc/sys/linux/configure.in: Add $EXTRA_DIRS variable.
* libc/sys/linux/Makefile.in: Regenerated.
* libc/sys/linux/configure: Ditto.
* libc/sys/linux/io.c: Add poll syscall. Also weak-alias
__close, __read, __write, __poll, __open, __lseek, __fcntl from
their __libc_ counterparts.
* libc/sys/linux/io64.c: Add __libc_ prefix to lseek64 and open64
and weak-alias to regular names.
* libc/sys/linux/pread64.c: Rename to __libc_pread64 and weak-alias
to pread64 and __pread64.
* libc/sys/linux/process.c: Weak_alias __libc_getpid to __getpid.
* libc/sys/linux/pwrite64.c: Rename to __libc_pwrite64 and
weak-alias to pwrite64.
* libc/sys/linux/sched.c: Weak-alias __libc_sched_getparam,
__libc_sched_getscheduler, __libc_sched_get_priority_max,
__libc_sched_get_priority_min, and __libc_sched_setschedule to
name with __ instead of __libc_.
* libc/sys/linux/siglongjmp.c: Include <machine/weakalias.h>.
Rename siglongjmp to __libc_siglongjmp and weak-alias to siglongjmp.
Call __libc_longjmp instead of longjmp, from __libc_siglongjmp.
* libc/sys/linux/signal.c: Rename raise to __libc_raise and weak-alias
to raise.
* libc/sys/linux/socket.c: Weak-alias __libc_connect to __connect and
__libc_send to __send.
* libc/sys/linux/time.c: Weak-alias __libc_gettimeofday to
__gettimeofday.
* libc/sys/linux/wait.c: Rename wait to __libc_wait and weak-alias
it to wait. Rename wait3 to __libc_wait3 and weak-alias it to wait3.
* libc/sys/linux/include/setjmp.h: Use __jmp_buf in sigjmp_buf
type and typedef __jmp_buf to jmp_buf.
* libc/sys/linux/machine/i386/Makefile.am: Add syscalls.c and
setjmp.S.
* libc/sys/linux/machine/i386/Makefile.in: Regenerated.
* libc/sys/linux/machine/i386/crt0.c: Add support to clear .bss
section.
* libc/sys/linux/machine/i386/socketcall.h: Change to use __libc_
prefix for function macros and then use weak_alias() to regular names.
* libc/sys/linux/machine/i386/syscall.h: Ditto.
* libc/sys/linux/sys/errno.h: Define EOPNOTSUP to be ENOTSUP.
* libc/sys/linux/sys/stdio.h: Define _flockfile and _funlockfile
to be flockfile() and funlockfile() respectively.
* libc/sys/linux/sys/types.h
* libc/reent/getreent.c: New file.
* libc/sys/linux/flockfile.c: Ditto.
* libc/sys/linux/funlockfile.c: Ditto.
* libc/sys/linux/getreent.c: Ditto.
* libc/sys/linux/pread.c: Ditto.
* libc/sys/linux/pwrite.c: Ditto.
* libc/sys/linux/raise.c: Ditto.
* libc/sys/linux/system.c: Ditto.
* libc/sys/linux/tcdrain.c: Ditto.
* libc/sys/linux/machine/i386/i386mach.h: Ditto.
* libc/sys/linux/machine/i386/setjmp.S: Ditto.
* libc/sys/linux/machine/i386/syscalls.c: Ditto.
* libc/sys/linux/machine/i386/weakalias.h: Ditto.
* libc/sys/linux/machine/i386/include/setjmp.h: Ditto.
2002-05-18 07:39:39 +08:00
|
|
|
done
|
2022-02-19 13:54:20 +08:00
|
|
|
$(AM_V_at)s=sys/$(sys_dir)/sys d=sys $(TARG_INCLUDE_CP_DIR)
|
|
|
|
$(AM_V_at)s=sys/$(sys_dir)/bits d=bits $(TARG_INCLUDE_CP_DIR)
|
|
|
|
$(AM_V_at)s=sys/$(sys_dir)/machine d=machine $(TARG_INCLUDE_CP_DIR)
|
|
|
|
$(AM_V_at)s=sys/$(sys_dir)/machine/$(machine_dir) d=machine $(TARG_INCLUDE_CP_DIR)
|
|
|
|
$(AM_V_at)s=sys/$(sys_dir)/machine/$(machine_dir)/include d=machine $(TARG_INCLUDE_CP_DIR)
|
2022-02-19 13:08:32 +08:00
|
|
|
$(AM_V_at)$(MAKE) targ-include/newlib.h
|
|
|
|
$(AM_V_at)touch $@
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2022-02-13 16:03:12 +08:00
|
|
|
CLEANFILES += stmp-targ-include
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2022-01-24 09:04:59 +08:00
|
|
|
## 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
|
|
|
|
## install-exec-local in ../multilib.am will kick in.
|
2022-02-13 16:11:01 +08:00
|
|
|
install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
|
2000-09-07 04:46:27 +08:00
|
|
|
rm -f $(DESTDIR)$(toollibdir)/libg.a
|
2001-08-30 03:55:20 +08:00
|
|
|
ln $(DESTDIR)$(toollibdir)/libc.a $(DESTDIR)$(toollibdir)/libg.a >/dev/null 2>/dev/null || cp $(DESTDIR)$(toollibdir)/libc.a $(DESTDIR)$(toollibdir)/libg.a
|
2000-02-18 03:39:52 +08:00
|
|
|
-if [ -z "$(MULTISUBDIR)" ]; then \
|
2000-12-14 03:32:45 +08:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include; \
|
2000-02-18 03:39:52 +08:00
|
|
|
for i in $(srcdir)/libc/include/*.h; do \
|
2000-09-07 04:46:27 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/`basename $$i`; \
|
2000-02-18 03:39:52 +08:00
|
|
|
done; \
|
2002-08-29 08:22:10 +08:00
|
|
|
$(INSTALL_DATA) newlib.h $(DESTDIR)$(tooldir)/include/newlib.h; \
|
Define the newlib version macros in one place: _newlib_version.h.
Currently, the newlib version information needs to be updated in two places:
- newlib/acinclude.m4
- newlib/libc/include/sys/features.h
The goal of this patch is to:
- supply a single location for defining the newlib version
information: newlib/acinclude.m4
- define __NEWLIB__, __NEWLIB_MINOR__ and __NEWLIB_PATCHLEVEL__
This is in line with what gcc does for its version macros. See:
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
This patch moves the definition of the _NEWLIB_VERSION, __NEWLIB__
and __NEWLIB_MINOR__ macros from newlib/libc/include/sys/features.h,
to the newly generated newlib/_newlib_version.h file. Additionally,
the __NEWLIB_PATCHLEVEL__ macro was created, for completeness.
In order to stay backwards compatible, newlib/_newlib_version.h gets
included by newlib/newlib.h and newlib/libc/include/sys/features.h.
Note: This patch does _not_ include the modifications to the following
files, as these should all be generated any way.
*Makefile.in,
*aclocal.m4,
*configure
stamp-* files
Signed-off-by: Pieter du Preez <pdupreez@gmail.com>
2016-02-14 18:12:06 +08:00
|
|
|
$(INSTALL_DATA) _newlib_version.h $(DESTDIR)$(tooldir)/include/_newlib_version.h; \
|
2000-12-14 03:32:45 +08:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/machine; \
|
2000-02-18 03:39:52 +08:00
|
|
|
for i in $(srcdir)/libc/include/machine/*.h; do \
|
2000-09-07 04:46:27 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
|
2000-02-18 03:39:52 +08:00
|
|
|
done; \
|
2021-03-24 17:32:50 +08:00
|
|
|
if [ -n "$(shared_machine_dir)" ]; then \
|
|
|
|
for i in $(srcdir)/libc/machine/$(shared_machine_dir)/machine/*.h; do \
|
|
|
|
if [ -f $$i ]; then \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
|
|
|
|
else true; fi ; \
|
|
|
|
done; \
|
|
|
|
fi ; \
|
2000-02-18 03:39:52 +08:00
|
|
|
for i in $(srcdir)/libc/machine/$(machine_dir)/machine/*.h; do \
|
|
|
|
if [ -f $$i ]; then \
|
2000-09-07 04:46:27 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
|
2000-02-18 03:39:52 +08:00
|
|
|
else true; fi ; \
|
|
|
|
done; \
|
2010-03-02 20:05:18 +08:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/rpc; \
|
|
|
|
for i in $(srcdir)/libc/include/rpc/*.h; do \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/rpc/`basename $$i`; \
|
|
|
|
done; \
|
2017-11-28 13:54:09 +08:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/ssp; \
|
|
|
|
for i in $(srcdir)/libc/include/ssp/*.h; do \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/ssp/`basename $$i`; \
|
|
|
|
done; \
|
2000-12-14 03:32:45 +08:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sys; \
|
2000-02-18 03:39:52 +08:00
|
|
|
for i in $(srcdir)/libc/include/sys/*.h; do \
|
2000-09-07 04:46:27 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
|
2000-02-18 03:39:52 +08:00
|
|
|
done; \
|
2021-03-24 17:32:50 +08:00
|
|
|
if [ -n "$(shared_machine_dir)" ]; then \
|
|
|
|
for i in $(srcdir)/libc/machine/$(shared_machine_dir)/sys/*.h; do \
|
|
|
|
if [ -f $$i ]; then \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
|
|
|
|
else true; fi ; \
|
|
|
|
done ; \
|
|
|
|
for i in $(srcdir)/libc/machine/$(shared_machine_dir)/include/*.h; do \
|
|
|
|
if [ -f $$i ]; then \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/`basename $$i`; \
|
|
|
|
else true; fi ; \
|
|
|
|
done ; \
|
|
|
|
fi ; \
|
2004-10-06 03:34:25 +08:00
|
|
|
for i in $(srcdir)/libc/machine/$(machine_dir)/sys/*.h; do \
|
|
|
|
if [ -f $$i ]; then \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
|
|
|
|
else true; fi ; \
|
|
|
|
done ; \
|
2005-01-28 03:13:54 +08:00
|
|
|
for i in $(srcdir)/libc/machine/$(machine_dir)/include/*.h; do \
|
|
|
|
if [ -f $$i ]; then \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/`basename $$i`; \
|
|
|
|
else true; fi ; \
|
|
|
|
done ; \
|
2000-02-18 03:39:52 +08:00
|
|
|
for i in $(srcdir)/libc/sys/$(sys_dir)/sys/*.h; do \
|
|
|
|
if [ -f $$i ]; then \
|
2000-09-07 04:46:27 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
|
2000-02-18 03:39:52 +08:00
|
|
|
else true; fi ; \
|
|
|
|
done ; \
|
2005-09-09 06:45:53 +08:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/bits; \
|
2005-07-05 08:11:50 +08:00
|
|
|
for i in $(srcdir)/libc/sys/$(sys_dir)/bits/*.h; do \
|
|
|
|
if [ -f $$i ]; then \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/bits/`basename $$i`; \
|
|
|
|
else true; fi ; \
|
|
|
|
done ; \
|
2002-11-08 03:27:36 +08:00
|
|
|
for i in $(srcdir)/libc/sys/$(sys_dir)/machine/*.h; do \
|
|
|
|
if [ -f $$i ]; then \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
|
|
|
|
else true; fi ; \
|
|
|
|
done ; \
|
2000-02-18 03:39:52 +08:00
|
|
|
for i in $(srcdir)/libc/sys/$(sys_dir)/include/*.h; do \
|
|
|
|
if [ -f $$i ]; then \
|
2000-09-07 04:46:27 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/`basename $$i`; \
|
2000-02-18 03:39:52 +08:00
|
|
|
else true; fi ; \
|
|
|
|
done ; \
|
2010-12-15 06:35:27 +08:00
|
|
|
for i in $(srcdir)/libc/sys/$(sys_dir)/include/*; do \
|
|
|
|
if [ -d $$i ]; then \
|
2022-02-16 10:07:27 +08:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(tooldir)/include/`basename $$i`; \
|
2010-12-15 06:35:27 +08:00
|
|
|
for j in $$i/*.h; do \
|
|
|
|
$(INSTALL_DATA) $$j $(DESTDIR)$(tooldir)/include/`basename $$i`/`basename $$j`; \
|
|
|
|
done ; \
|
|
|
|
else true; fi ; \
|
|
|
|
done ; \
|
2002-05-17 Jeff Johnston <jjohnstn@redhat.com>
* Makefile.am: Copy and install headers from sys/machine/include
directory. Also pass $toollibdir to lower-level directories.
* Makefile.in: Regenerated.
* libc/include/stdio.h[!_REENT_ONLY]: Change stdin, stdout, and
stderr to use _REENT macro instead of _impure_ptr directly.
* libc/include/sys/config.h[__i386__][__linux__]: Define
__DYNAMIC_REENT__.
* libc/include/sys/reent.h[!_REENT_ONLY]: Change _REENT macro to be
call to __getreent() function if !__SINGLE_THREAD__ and
__DYNAMIC_REENT__ is set.
* libc/reent/Makefile.am: Add support for getreent.c.
* libc/reent/Makefile.in: Regenerated.
* libc/string/strerror.c: Add check if EOPNOTSUPP and ENOTSUP are same.
* libc/sys/linux/Makefile.am: Add support for new files.
* libc/sys/linux/configure.in: Add $EXTRA_DIRS variable.
* libc/sys/linux/Makefile.in: Regenerated.
* libc/sys/linux/configure: Ditto.
* libc/sys/linux/io.c: Add poll syscall. Also weak-alias
__close, __read, __write, __poll, __open, __lseek, __fcntl from
their __libc_ counterparts.
* libc/sys/linux/io64.c: Add __libc_ prefix to lseek64 and open64
and weak-alias to regular names.
* libc/sys/linux/pread64.c: Rename to __libc_pread64 and weak-alias
to pread64 and __pread64.
* libc/sys/linux/process.c: Weak_alias __libc_getpid to __getpid.
* libc/sys/linux/pwrite64.c: Rename to __libc_pwrite64 and
weak-alias to pwrite64.
* libc/sys/linux/sched.c: Weak-alias __libc_sched_getparam,
__libc_sched_getscheduler, __libc_sched_get_priority_max,
__libc_sched_get_priority_min, and __libc_sched_setschedule to
name with __ instead of __libc_.
* libc/sys/linux/siglongjmp.c: Include <machine/weakalias.h>.
Rename siglongjmp to __libc_siglongjmp and weak-alias to siglongjmp.
Call __libc_longjmp instead of longjmp, from __libc_siglongjmp.
* libc/sys/linux/signal.c: Rename raise to __libc_raise and weak-alias
to raise.
* libc/sys/linux/socket.c: Weak-alias __libc_connect to __connect and
__libc_send to __send.
* libc/sys/linux/time.c: Weak-alias __libc_gettimeofday to
__gettimeofday.
* libc/sys/linux/wait.c: Rename wait to __libc_wait and weak-alias
it to wait. Rename wait3 to __libc_wait3 and weak-alias it to wait3.
* libc/sys/linux/include/setjmp.h: Use __jmp_buf in sigjmp_buf
type and typedef __jmp_buf to jmp_buf.
* libc/sys/linux/machine/i386/Makefile.am: Add syscalls.c and
setjmp.S.
* libc/sys/linux/machine/i386/Makefile.in: Regenerated.
* libc/sys/linux/machine/i386/crt0.c: Add support to clear .bss
section.
* libc/sys/linux/machine/i386/socketcall.h: Change to use __libc_
prefix for function macros and then use weak_alias() to regular names.
* libc/sys/linux/machine/i386/syscall.h: Ditto.
* libc/sys/linux/sys/errno.h: Define EOPNOTSUP to be ENOTSUP.
* libc/sys/linux/sys/stdio.h: Define _flockfile and _funlockfile
to be flockfile() and funlockfile() respectively.
* libc/sys/linux/sys/types.h
* libc/reent/getreent.c: New file.
* libc/sys/linux/flockfile.c: Ditto.
* libc/sys/linux/funlockfile.c: Ditto.
* libc/sys/linux/getreent.c: Ditto.
* libc/sys/linux/pread.c: Ditto.
* libc/sys/linux/pwrite.c: Ditto.
* libc/sys/linux/raise.c: Ditto.
* libc/sys/linux/system.c: Ditto.
* libc/sys/linux/tcdrain.c: Ditto.
* libc/sys/linux/machine/i386/i386mach.h: Ditto.
* libc/sys/linux/machine/i386/setjmp.S: Ditto.
* libc/sys/linux/machine/i386/syscalls.c: Ditto.
* libc/sys/linux/machine/i386/weakalias.h: Ditto.
* libc/sys/linux/machine/i386/include/setjmp.h: Ditto.
2002-05-18 07:39:39 +08:00
|
|
|
for i in $(srcdir)/libc/sys/$(sys_dir)/machine/$(machine_dir)/include/*.h; do \
|
|
|
|
if [ -f $$i ]; then \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
|
|
|
|
else true; fi ; \
|
|
|
|
done ; \
|
2011-01-13 06:24:06 +08:00
|
|
|
for i in $(NO_INCLUDE_LIST); do \
|
2011-05-19 14:04:59 +08:00
|
|
|
if [ -f $(DESTDIR)$(tooldir)/include/$$i ]; then \
|
|
|
|
rm $(DESTDIR)$(tooldir)/include/$$i; \
|
2011-01-13 06:24:06 +08:00
|
|
|
else true; fi ; \
|
|
|
|
done ; \
|
2000-02-18 03:39:52 +08:00
|
|
|
else true; fi
|
|
|
|
|
2018-03-08 07:08:29 +08:00
|
|
|
# Generate Unicode data tables for libc/string/wcwidth and libc/ctype/??w*
|
|
|
|
unidata:
|
|
|
|
cd $(srcdir)/libc/string; ./mkunidata -u
|
|
|
|
cd $(srcdir)/libc/ctype; ./mkunidata -u
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
# Force makedoc to be built before building info files.
|
2021-11-11 10:04:31 +08:00
|
|
|
info-recursive dvi-recursive: doc/makedoc$(EXEEXT_FOR_BUILD)
|
2000-02-18 03:39:52 +08:00
|
|
|
|
|
|
|
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
|
|
|
|
2022-01-24 09:04:59 +08:00
|
|
|
include ../multilib.am
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2002-05-02 04:26:05 +08:00
|
|
|
check-multi:
|
2003-10-16 01:33:32 +08:00
|
|
|
$(MULTIDO) $(AM_MAKEFLAGS) DO=check multi-do # $(MAKE)
|
2000-02-18 03:39:52 +08:00
|
|
|
|
|
|
|
MAKEOVERRIDES=
|
2002-04-25 04:53:30 +08:00
|
|
|
|
|
|
|
# dejagnu support
|
|
|
|
|
|
|
|
RUNTESTFLAGS=
|
|
|
|
|
|
|
|
site.exp: Makefile
|
|
|
|
@echo 'Making a new site.exp file...'
|
|
|
|
@test ! -f site.bak || rm -f site.bak
|
|
|
|
@echo '## these variables are automatically generated by make ##' > $@-t
|
|
|
|
@echo '# Do not edit here. If you wish to override these values' >> $@-t
|
|
|
|
@echo '# edit the last section' >> $@-t
|
|
|
|
@echo 'set tool $(DEJATOOL)' >> $@-t
|
|
|
|
@echo 'set tool_version $(VERSION)' >> $@-t
|
|
|
|
@echo 'set srcdir $(srcdir)/testsuite' >> $@-t
|
|
|
|
@echo 'set objdir' `pwd` >> $@-t
|
2005-07-05 08:11:50 +08:00
|
|
|
@echo 'set tmpdir' `pwd`/testsuite >> $@-t
|
2002-05-02 01:05:44 +08:00
|
|
|
@echo 'set multibuildtop ./$(MULTIBUILDTOP)' >> $@-t
|
2002-05-01 06:38:07 +08:00
|
|
|
@echo 'set host_alias $(build_alias)' >> $@-t
|
|
|
|
@echo 'set host_triplet $(build_triplet)' >> $@-t
|
2002-04-25 04:53:30 +08:00
|
|
|
@echo 'set target_alias $(host_alias)' >> $@-t
|
|
|
|
@echo 'set target_triplet $(host_triplet)' >> $@-t
|
|
|
|
@echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
|
|
|
|
@test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
|
|
|
|
@test ! -f site.exp || mv site.exp site.bak
|
|
|
|
@mv $@-t site.exp
|
|
|
|
|
|
|
|
check-DEJAGNU: site.exp
|
|
|
|
@if [ -d testsuite ] ; then \
|
|
|
|
true ; \
|
|
|
|
else \
|
|
|
|
mkdir testsuite ; \
|
|
|
|
fi
|
|
|
|
@rm -f testsuite/site.exp
|
|
|
|
@cp site.exp testsuite/site.exp
|
|
|
|
@rootme=`pwd` ; \
|
|
|
|
export rootme ; \
|
|
|
|
srcdir=`cd ${srcdir}; pwd` ; \
|
|
|
|
export srcdir ; \
|
|
|
|
EXPECT=`if [ -f $${rootme}/${MULTIBUILDTOP}../../expect/expect ] ; then \
|
|
|
|
echo $${rootme}/${MULTIBUILDTOP}../../expect/expect ; \
|
|
|
|
else \
|
|
|
|
echo expect ; \
|
|
|
|
fi` ; \
|
|
|
|
export EXPECT ; \
|
|
|
|
echo "Found expect: $${EXPECT}" ; \
|
|
|
|
if [ -f $(top_builddir)/$(MULTIBUILDTOP)../../expect/expect ] ; then \
|
|
|
|
TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd` ; \
|
|
|
|
export TCL_LIBRARY ; \
|
|
|
|
echo "Found TCL library directory: $${TCL_LIBRARY}" ; \
|
|
|
|
fi ; \
|
|
|
|
RUNTEST=`if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
|
|
|
|
echo $${srcdir}/../dejagnu/runtest ; \
|
|
|
|
else \
|
|
|
|
echo runtest ; \
|
|
|
|
fi` ; \
|
|
|
|
export RUNTEST ; \
|
|
|
|
echo "Found runtest: $${RUNTEST}" ; \
|
|
|
|
cd testsuite ; \
|
|
|
|
if $(SHELL) -c "$$RUNTEST --version" > /dev/null 2>&1 ; then \
|
2002-05-02 04:26:05 +08:00
|
|
|
$$RUNTEST --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite $(RUNTESTFLAGS) ; \
|
|
|
|
: ; \
|
2002-04-25 04:53:30 +08:00
|
|
|
else \
|
|
|
|
echo "WARNING: could not find \`runtest'" 1>&2 ; \
|
|
|
|
fi
|
2011-01-06 06:48:56 +08:00
|
|
|
|
|
|
|
clean-local:
|
Define the newlib version macros in one place: _newlib_version.h.
Currently, the newlib version information needs to be updated in two places:
- newlib/acinclude.m4
- newlib/libc/include/sys/features.h
The goal of this patch is to:
- supply a single location for defining the newlib version
information: newlib/acinclude.m4
- define __NEWLIB__, __NEWLIB_MINOR__ and __NEWLIB_PATCHLEVEL__
This is in line with what gcc does for its version macros. See:
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
This patch moves the definition of the _NEWLIB_VERSION, __NEWLIB__
and __NEWLIB_MINOR__ macros from newlib/libc/include/sys/features.h,
to the newly generated newlib/_newlib_version.h file. Additionally,
the __NEWLIB_PATCHLEVEL__ macro was created, for completeness.
In order to stay backwards compatible, newlib/_newlib_version.h gets
included by newlib/newlib.h and newlib/libc/include/sys/features.h.
Note: This patch does _not_ include the modifications to the following
files, as these should all be generated any way.
*Makefile.in,
*aclocal.m4,
*configure
stamp-* files
Signed-off-by: Pieter du Preez <pdupreez@gmail.com>
2016-02-14 18:12:06 +08:00
|
|
|
-rm -rf targ-include newlib.h _newlib_version.h stamp-*
|
2021-11-11 10:04:31 +08:00
|
|
|
|
2022-01-21 15:12:26 +08:00
|
|
|
# Workaround bad automake/texinfo interactions.
|
|
|
|
# https://bugs.gnu.org/23599
|
|
|
|
TEXI2DVI = texi2dvi -E
|
|
|
|
|
|
|
|
TEXINFO_TEX = ../texinfo/texinfo.tex
|
|
|
|
|
2022-05-02 20:55:15 +08:00
|
|
|
XMLTO_MAN_QUIET_=--stringparam man.output.quietly=1
|
|
|
|
XMLTO_MAN_QUIET=$(XMLTO_MAN_QUIET_$(V))
|
|
|
|
|
2021-11-11 10:04:31 +08:00
|
|
|
if HAVE_DOC
|
2022-02-14 12:17:48 +08:00
|
|
|
include doc/Makefile.inc
|
2021-11-11 10:04:31 +08:00
|
|
|
endif
|
2022-01-22 10:50:20 +08:00
|
|
|
include libc/Makefile.inc
|
2022-01-21 15:12:26 +08:00
|
|
|
include libm/Makefile.inc
|
2021-11-11 10:04:31 +08:00
|
|
|
|
|
|
|
.PHONY: $(PHONY)
|