aboutsummaryrefslogtreecommitdiff
path: root/newlib/Makefile.am
AgeCommit message (Collapse)AuthorFilesLines
2023-12-19Revert "Fix libgloss/newlib build to conditionally use top include dir"Mike Frysinger1-4/+0
This reverts commit 17ac400c11bab30ac2c0bef12cbf7788f0b6f954. The build failures were due to incorrectly using $(INCLUDES) when running $(AS). Let's roll this back and drop $(INCLUDES) from the $(AS) invocations.
2023-09-18newlib: Fix header installAlexey Lapshin1-1/+1
2023-08-29newlib: fix 'sed' for sys headers path prefixAlexey Lapshin1-2/+2
Precisely remove the prefix from the filepath.
2023-08-10Add wildcard support to recurse into sys include directoriesAlexey Lapshin1-19/+12
2023-02-22Fix libgloss/newlib build to conditionally use top include dirJeff Johnston1-0/+4
- conditionally use -idirafter option for arm
2023-01-11libgloss: arm: break newlib dependencyMike Frysinger1-1/+2
The libgloss port has been reaching back into newlib internals for a single header whose contents have been frozen for almost a decade. To break this backwards libgloss->newlib dependency, move the acle header to the srcroot include/ so everyone can use the same copy.
2022-05-04Silence xsltproc when writing manpagesJon Turney1-0/+3
Unless make is invoked with V=1, have xmlto pass the parameter 'man.output.quietly=1' to xsltproc to suppress "Note: Writing foo.N" output from the manpages stylesheet. (This doesn't quite do what it says: The output is not silenced if V has any value, including 0. You could consider that either a bug or a feature.)
2022-03-16newlib: libm: integrate tests subdirMike Frysinger1-0/+2
Integrate the old libm/test/ subdir into the main build. It hasn't been used in a long time causing the code to rot a bit. I've fixed some of those, but it still fails for many ports, so it's disabled by default. People who want to take a closer look can run: $ make libm/test/test
2022-03-16newlib: libc: merge build up a directoryMike Frysinger1-22/+30
Convert all the libc/ subdir makes into the top-level Makefile. This allows us to build all of libc 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 libc.a. The machine override logic is maintained though by way of Makefile include ordering, and source file accumulation in libc_a_SOURCES. There's a few dummy.c files that are no longer necessary since we aren't doing the lib.a accumulating, so punt them. The winsup code has been pulling the internal newlib ssp library out, but that doesn't exist anymore, so change that to pull the objects.
2022-03-09build: Avoid length() awk functionSebastian Huber1-2/+2
Some awk implementations such as old versions of mawk do not support the length() function. Use the return value of the POSIX split() function instead.
2022-02-28newlib: speed up targ-include setup & add error checkingMike Frysinger1-63/+21
The current targ-include setup runs `cp` every header file it installs, in serial. This can be a little noticeable on systems, so cleanup the logic to rely on cp's ability to copy multiple files to a directory in a single call. We still need a check for empty directories with no headers (i.e. the glob doesn't match anything), so add a helper variable to contain that logic to reduce the boiler plate a little.
2022-02-28newlib: simplify header setup rulesMike Frysinger1-21/+15
Since POSIX cp requires copying a file to a directory without having to specify the name explicitly, rely on that to avoid calling basename on every source file. We can also drop the stub `true` call if the -f test failed. The use of `if` already takes care of that in POSIX shell.
2022-02-24newlib: add silent rules support to top-level rulesMike Frysinger1-32/+32
2022-02-23newlib: fix multilib libg.a parallel buildsMike Frysinger1-3/+5
I split libg.a out into a sep target from libc.a for the main dir in commit f2b053f49ed2bd7b4da8cf4ed3a608dc2f425c2b ("newlib: separate out libg from libc"), but missed the multilib dirs. That leads to an uncommon parallel build failure: - libc.a rule runs & finishes - $(BUILD_MULTISUBDIR)/libc.a rule runs -> failure due to libg.a not yet existing - libg.a rule runs & finishes Split the multilib libg rule out from libc too so it can depend on the main libg directly and avoid this race.
2022-02-23newlib: libm: workaround ar duplicate member behaviorMike Frysinger1-0/+28
GNU ar has undocumented behavior where it doesn't dedupe its inputs if they're all on the same command line, so we have to dedupe ourselves.
2022-02-17newlib: libm: merge build up a directoryMike Frysinger1-19/+20
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-17newlib: separate out libg from libcMike Frysinger1-3/+9
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.
2022-02-16newlib: add missing mkdir to header installMike Frysinger1-0/+1
Make sure these subdirs exist before trying to install headers into them.
2022-02-15newlib: rename doc/local.mk to Makefile.incMike Frysinger1-1/+1
For consistency across the whole tree.
2022-02-09newlib: drop support for $oextMike Frysinger1-13/+13
This was needed only to support libtool in case objects ended in .lo instead of .o, but we dropped libtool, so drop this too.
2022-02-09newlib: drop libtool supportMike Frysinger1-60/+0
This was only ever used for i?86-pc-linux-gnu targets, but that's been broken for years, and has since been dropped. So clean this up too. This also deletes the funky objectlist logic since it only existed for the libtool libraries. Since it was the only thing left in the small Makefile.shared file, we can punt that too.
2022-02-09newlib: drop unused iconvdataMike Frysinger1-3/+0
This was only ever used for i?86-pc-linux-gnu targets, but that's been broken for years, and has since been dropped. So clean this up too.
2022-02-05newlib: move man page generation into top-level buildMike Frysinger1-16/+0
This allows building the libc & libm pages in parallel, and drops the duplication in the subdirs with the chew/chapter settings. The unused rules in Makefile.shared are left in place to minimize noise in the change.
2022-02-04newlib: libc: move manual into top-level buildMike Frysinger1-0/+1
This doesn't migrate all the docs, just the libc's manual (pdf/info). This is to show the basic form of migrating the chew files. For subdirs that didn't have any docs, I've stripped their settings for clarity. If someone wanted to suddenly add docs, they can add the corresponding Makefile.inc files easily.
2022-02-04newlib: libm: move manual into top-level buildMike Frysinger1-0/+9
This doesn't migrate all the docs, just the libm's manual (pdf/info). This is to show the basic form of migrating the chew files.
2022-01-27newlib: merge iconvdata into top-level MakefileMike Frysinger1-2/+5
Avoid a recursive make with this tiny subdir to speed things up a bit.
2022-01-26newlib: switch to multilib.amMike Frysinger1-31/+5
We use the common config-ml.in for configure, so switch the makefile over to the common multilib.am. It's almost exactly the same code, but there are two differences: * Common code hooks install-exec-local for install-multi, but newlib doesn't currently install any executables, so that doesn't fire. Newlib already has install-data-local that inlined install-multi, so switch that to the common install-multi. * Common code doesn't provide a check-multi at all. Keep ours for now. Some day common code might get it. Or not. Who knows.
2022-01-18newlib: enable automake subdir-objects in all dirsMike Frysinger1-1/+1
Currently this is only enabled in the top-level as that's the only place where it seemed to be used. But the libc/sys/phoenix/ dir also uses this functionality, but fails to explicitly enable it. Automake workedaround it, but generated warnings. Move the option to NEWLIB_CONFIGURE so all dirs get it automatically iff they end up using the option. If they don't use the option, there's no difference to the generated code.
2022-01-14require autoconf-2.69 exactlyMike Frysinger1-1/+1
The newlib & libgloss dirs are already generated using autoconf-2.69. To avoid merging new code and/or accidental regeneration using diff versions, leverage config/override.m4 to pin to 2.69 exactly. This matches what gcc/binutils/gdb are already doing. The README file already says to use autoconf-2.69. To accomplish this, it's just as simple as adding -I flags to the top-level config/ dir when running aclocal. This is because the override.m4 file overrides AC_INIT to first require the specific autoconf version before calling the real AC_INIT.
2021-12-29newlib: Remove automake option 'cygnus'Jon Turney1-1/+1
The 'cygnus' option was removed from automake 1.13 in 2012, so the presence of this option prevents that or a later version of automake being used. A check-list of the effects of '--cygnus' from the automake 1.12 documentation, and steps taken (where possible) to preserve those effects (See also this thread [1] for discussion on that): [1] https://lists.gnu.org/archive/html/bug-automake/2012-03/msg00048.html 1. The foreign strictness is implied. Already present in AM_INIT_AUTOMAKE in newlib/acinclude.m4 2. The options no-installinfo, no-dependencies and no-dist are implied. Already present in AM_INIT_AUTOMAKE in newlib/acinclude.m4 Future work: Remove no-dependencies and any explicit header dependencies, and use automatic dependency tracking instead. Are there explicit rules which are now redundant to removing no-installinfo and no-dist? 3. The macro AM_MAINTAINER_MODE is required. Already present in newlib/acinclude.m4 Note that maintainer-mode is still disabled by default. 4. Info files are always created in the build directory, and not in the source directory. This appears to be an error in the automake documentation describing '--cygnus' [2]. newlib's info files are generated in the source directory, and no special steps are needed to keep doing that. [2] https://lists.gnu.org/archive/html/bug-automake/2012-04/msg00028.html 5. texinfo.tex is not required if a Texinfo source file is specified. (The assumption is that the file will be supplied, but in a place that automake cannot find.) This effect is overriden by an explicit setting of the TEXINFO_TEX variable (the directory part of which is fed into texi2X via the TEXINPUTS environment variable). 6. Certain tools will be searched for in the build tree as well as in the user's PATH. These tools are runtest, expect, makeinfo and texi2dvi. For obscure automake reasons, this effect of '--cygnus' is not active for makeinfo in newlib's configury. However, there appears to be top-level configury which selects in-tree runtest, expect and makeinfo, if present. So, if that works as it appears, this effect is preserved. If not, this may cause problem if anyone is building those tools in-tree. This effect is not preserved for texi2dvi. This may cause problems if anyone is building texinfo in-tree. If needed, explicit checks for those tools looking in places relative to $(top_srcdir)/../ as well as in PATH could be added. 7. The check target doesn't depend on all. This effect is not preseved. The check target now depends on the all target. This concern seems somewhat academic given the current state of the testsuite. Also note that this doesn't touch libgloss.
2021-11-29stdio: Fix issue of printing "%La" format with large exp part.Takashi Yano1-1/+1
- Currently, printf("%La\n", 1e1000L) crashes with segv due to lack of frexpl() function. With this patch, frexpl() function has been implemented in libm to solve this issue. Addresses: https://sourceware.org/pipermail/newlib/2021/018718.html
2021-11-16Fix 'make man' after 67208d9eJon Turney1-1/+1
Remove a left over use of doc/Makefile after 67208d9e ('newlib: merge doc into top-level Makefile') to fix 'make man'.
2021-11-15newlib: merge doc into top-level MakefileMike Frysinger1-14/+15
Avoid a recursive make with this tiny subdir to speed things up a bit.
2021-07-06fix and amend scripts and makefile rules to generate Unicode dataThomas Wolff1-4/+0
2021-04-13Add build mechanism to share common header files between machinesCorinna Vinschen1-0/+36
So far the build mechanism in newlib only allowed to either define machine-specific headers, or headers shared between all machines. In some cases, architectures are sufficiently alike to share header files between them, but not with other architectures. A good example is ix86 vs. x86_64, which share certain traits with each other, but not with other architectures. Introduce a new configure variable called "shared_machine_dir". This dir can then be used for headers shared between architectures. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-03-12make target for explicit Unicode data tables generationThomas Wolff1-0/+9
Run 'make unidata' in newlib target directory to generate Unicode data tables for libc functions wcwidth, tow* and isw*.
2017-11-29ssp: add build infrastructureYaakov Selkowitz1-0/+4
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-04-18newlib: remove __infinity{f,ld} constantsCorinna Vinschen1-2/+1
previous commit 4c90db7bc89e7fa1077025fefdd58269dc71a6ac introduced a compile time error because libm/common/s_infconst.c used the remove __fmath, __dmath, and __ldmath union types. Since this is very old, and unused for a very long time, just drop the file and thus the __infinity constants entirely. Exception: Cygwin exports __infinity from the beginning. There's a very, VERY low probability that any existing executable or lib still uses this constant, but we just keep it in for backward compat, nevertheless. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-12-22This is an attempt to fix the problem described here:Jeff Johnston1-8/+31
https://sourceware.org/ml/newlib/2016/msg01139.html https://gcc.gnu.org/ml/gcc/2016-12/msg00010.html There is no change if libtool is used. Some run-time support libraries provided by GCC (e.g. libgomp) use configure checks to detect certain features, e.g. availability of thread-local storage. The configure script generates a test program and tries to compile and link it. It should use target libraries and startfiles of the build tree if available and not random ones from the installation prefix for this procedure. The search directories specified by -B are a bit special, see for_each_path() in gcc.c of the GCC sources. First a search is performed on all search paths with the multilib directory appended (if desired), then a second search is performed on demand with the base directory only. For each multilib there is a "newlib" subdirectory. This directory is specified by a -B option for the support libraries. In order to find the newlib artifacts (ctr0.o, libc.a, libg.a and libm.a) they must be located in a proper multilib subdirectory withing the build directory. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-12-06Fix 'make man' for parallel makeJon Turney1-0/+1
Ensure the Python Lex/Yacc (PLY) cache used by makedocbook is initialized before it is used by parallelizable rules to make the DocBook XML, as it appears that these can collide in cache generation, leading to errors. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2016-07-04Make newlib manpages (v3)Jon Turney1-0/+15
Add makedocbook, a tool to process makedoc markup and output DocBook XML refentries. Process all the source files which are processed with makedoc with makedocbook as well Add chapter-texi2docbook, a tool to automatically generate DocBook XML chapter files from the chapter .texi files. For generating man pages all we care about is the content of the refentries, so all this needs to do is convert the @include of the makedoc generated .def files to xi:include of the makedocbook generated .xml files. Add skeleton Docbook XML book files, lib[cm].in.xml which include these generated chapters, which in turn include the generated files containing refentries, which is processed with xsltproc to generate the lib[cm].xml Add new make targets to generate and install man pages from lib[cm].xml
2016-06-25Revert "Make newlib manpages via DocBook XML (v3)"Jon Turney1-15/+0
This reverts commit 041ea4106881a3434e63ca95a38c911515793f09.
2016-06-25Make newlib manpages via DocBook XML (v3)Jon Turney1-0/+15
Add makedocbook, a tool to process makedoc markup and output DocBook XML refentries. Process all the source files which are processed with makedoc with makedocbook as well Add chapter-texi2docbook, a tool to automatically generate DocBook XML chapter files from the chapter .texi files. For generating man pages all we care about is the content of the refentries, so all this needs to do is convert the @include of the makedoc generated .def files to xi:include of the makedocbook generated .xml files. Add skeleton Docbook XML book files, lib[cm].in.xml which include these generated chapters, which in turn include the generated files containing refentries, which is processed with xsltproc to generate the lib[cm].xml Add new make targets to generate and install man pages from lib[cm].xml
2016-02-25Fix _newlib_version.h logic to support building gcc with newlib.Jeff Johnston1-2/+2
2016-02-17Define the newlib version macros in one place: _newlib_version.h.Pieter du Preez1-4/+19
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>
2012-10-242012-10-24 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-0/+4
* configure.in: Comment out the --enable-newlib-fp-hw option as the mathfp library is inaccurate and should not be used. * Makefile.am: Add comment regarding the mathfp directory. * configure: Regenerated. * Makefile.in: Ditto. * libm/mathfp/README: New file that details why the mathfp directory is not used.
2011-05-19 * Makefile.am (install-data-local): Fix condition and rm call.Corinna Vinschen1-2/+2
* Makefile.in: Regenerate.
2011-01-122011-01-12 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-0/+5
* configure.host: Add noinclude variable to allow specification of header files to remove from installation. * acinclude.m4: Provide NO_INCLUDE_LIST variable based on noinclude variable in configure.host. * configure: Regenerated. * Makefile.am: Remove all header files in NO_INCLUDE_LIST. * Makefile.in: Regenerated.
2011-01-052011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>Jeff Johnston1-1/+4
* Makefile.am: Move cleaning targ-include to clean-local. * Makefile.in: Regenerate.
2010-12-162010-12-16 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-1/+3
* NEWS: Update with 1.19.0 info. * README: Ditto. * MAINTAINERS: Update. * acinclude.m4: Change version number to 1.19.0. * aclocal.m4: Regenerated. * configure: Ditto. * Makefile.am: Fix stmp-targ-include target. * Makefile.in: Regenerated. * doc/aclocal.m4: Ditto. * doc/configure: Ditto. * libc/*/aclocal.m4: Ditto. * libc/*/configure: Ditto. * libc/libc.texinfo: Ditto. * libm/*/aclocal.m4: Ditto. * libm/*/configure: Ditto. * libm/libm.texinfo: Ditto. * libc/sys/linux/shared.ld: Add VERS_1.19