Commit Graph

23 Commits

Author SHA1 Message Date
Mike Frysinger d5a20f0b70 libgloss: merge epiphany & libnosys & or1k configure scripts up a level
These subdirs have unique configure scripts to do some compiler tests.
The checks should work for all targets, so hoist them up to the top
libgloss dir.  This should allow us to delete these subdir configure
scripts.

It means the top-level gains autoheader support, but that's fine.
It wasn't exporting any defines previously (i.e. -D into CPPFLAGS),
and all of the defines it now exports are only used by code in the
libnosys subdir which was expecting to have a config.h.
2022-02-01 21:53:22 -05:00
Mike Frysinger 502cf4b7b5 libgloss: fix more missing dir with parallel install
Depending on the processing order of rules when installing in parallel,
these install rules might be processed before some other rule happens
to create the respective dirs.  Make sure each one creates the needed
dirs before installing into them.
2022-01-29 01:33:49 -05:00
Jeff Law 063d67faf0 Finish this commit by prefixing HAVE_INITFINI_ARRAY and HAVE_INIT_FINI references in libgloss in the same way.
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Mon Jan 17 22:20:20 2022 -0500

    newlib: internalize HAVE_INITFINI_ARRAY

    This define is only used by newlib internally, so stop exporting it
    as HAVE_INITFINI_ARRAY since this can conflict with defines packages
    use themselves.

    We don't really need to add _ to HAVE_INIT_FINI too since it isn't
    exported in newlib.h, but might as well be consistent here.

    We can't (easily) add this to newlib_cflags like HAVE_INIT_FINI is
    because this is based on a compile-time test in the top configure,
    not on plain shell code in configure.host.  We'd have to replicate
    the test in every subdir in order to have it passed down.
2022-01-28 21:39:14 -07:00
Mike Frysinger 754f8def0d libgloss: merge stub arch configure scripts up a level
For about half the ports, we don't need a subdir configure script.
They're using the config/default.m[ht] rules, and they aren't doing
any unique configure tests, so they exist just to pass top-level
settings down to create the arch Makefile.  We can just as easily
do that from the top-level Mkaefile directly and skip configure.

Most of the remaining configure scripts could be migrated up to
the top-level too, but that would require care in each subdir.
So let's be lazy and put that off to another day.
2022-01-26 04:32:54 -05:00
Mike Frysinger 7c02fc3075 libgloss: clean up redundant shared lib warnings
Use standard AC_MSG_WARN macro in the top-level configure, and delete
the message from all the subdirs.  There's no need to issue this more
than once per libgloss build.
2022-01-17 04:30:37 -05:00
Mike Frysinger a100e80fc9 require autoconf-2.69 exactly
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.
2022-01-14 15:24:33 -05:00
Mike Frysinger 7f8fa1de4f libgloss: hardcode AC_CONFIG_AUX_DIR path
In order to transition to automake, we have to use hardcoded paths in
the AC_CONFIG_AUX_DIR macro call (since automake evaluates the path
itself, and doesn't expand vars), so simplify all the calls here.
2022-01-10 19:50:35 -05:00
Mike Frysinger 873da400e0 libgloss: regenerate aclocal.m4 & configure w/newer versions
Regenerate the files using automake-1.15 & autoconf-2.69 to match the
binutils/gdb/gcc projects.  Ran:

libgloss $ find -name configure.ac -printf '%h\n' | while read d; do
  (cd $d; export WANT_AUTOCONF=2.69 WANT_AUTOMAKE=1.15;
   aclocal-1.15 -I.. && autoconf-2.69); done
2021-11-06 14:14:50 -04:00
Mike Frysinger 920617998e libgloss/newlib: rename configure.in to configure.ac
The .in name has been deprecated for a long time in favor of .ac.
2021-09-13 10:14:37 -04:00
Jeff Johnston b99887c428 Revert previous change to sys/stat.h and fix cris libgloss
- revert previous fix which altered sys/stat.h
- fix libgloss/cris/gensyscalls to undef st_atime, st_mtime,
  and st_ctime macros which cannot be used with new_stat structure
2019-08-19 18:01:45 -04:00
Hans-Peter Nilsson a6837ca34f Committed, CRIS port: fix fallout from time_t defaulting to 64 bits, part 1
It's been a while...  I see the CRIS port broke with the
time_t-default-to-64-bit change, observable by a few test-cases in the
gcc fortran(!) tests failing, regressing when trying a recent newlib.

This is a two-part belt-and-suspenders change: adjust the CRIS port
gettimeofday syscall (the only one in newlib/CRIS passing a time_t or
struct timeval) to handle a userspace 64-bit time_t and secondly default
time_t to 32-bit long anyway.  I considered making the local
"kernel_timeval" copy in _gettimeofday conditional on (userspace) time_t
being 64 bits, but thought it not worth bothering with the few move insns.
The effect of a 64-bit time_t is however observable as longer simulation
time when running the gcc testsuite and as bigger binaries without any
actual upside from the larger time_t size, so I thought better make the
default for this port go back to being a "long" again.

Tested by running the gcc testsuite over the three combinations of two
parts of the patch and observing the expected changes.  Committed.

libgloss:
	Adjust for syscall and userspace having different time_t or timeval.
	* cris/linunistd.h (kernel_time_t, kernel_suseconds_t, kernel_timeval):
	New types.
	(gettimeofday): Change the type of the first argument to be a
	pointer to a struct kernel_timeval.
	* cris/gensyscalls (_gettimeofday): Use an intermediate struct
	kernel_timeval for the syscall and initialize the result from
	that.

Signed-off-by: Hans-Peter Nilsson <hp@axis.com>
2018-09-13 17:57:11 +02:00
Hans-Peter Nilsson cd5e7e2d82 Committed, libgloss: hook up cris-elf to the initfini-array support.
After a binutils change "a while ago" (2015-12) to default to
--enable-initfini-array, i.e. to merge .ctors and .dtors into
.init_array and .fini_array, this is needed for cdtors to run at all.

Based on what goes on in arm/ and aarch64/.  Tested for cris-elf by
running the gcc testsuite.

By the way, the configure test doesn't detect this change, so the
HAVE_INITFINI_ARRAY ifdeffery is somewhat redundant.  Still, the
change is tested to be safe with older binutils too.

libgloss/
	* cris/crt0.S, cris/lcrt0.c: Include newlib.h.
	[HAVE_INITFINI_ARRAY] (_init): Define to __libc_init_array.
	[HAVE_INITFINI_ARRAY] (_fini): Ditto __libc_fini_array.
2017-01-29 21:23:32 +01:00
Michael Frysinger cff00a2038 libgloss: cris: respect DESTDIR when installing 2012-03-24 03:38:28 +00:00
DJ Delorie 6f810581fb [newlib]
* libm/machine/spu/configure: Regenerate with autoconf 2.61.
	* libc/sys/configure: Regenerate with autoconf 2.61.
	* libc/machine/configure: Regenerate with autoconf 2.61.
[libgloss]
	* hp74x/configure: Regenerate with autoconf 2.61.
	* fr30/configure: Regenerate with autoconf 2.61.
	* mips/configure: Regenerate with autoconf 2.61.
	* xstormy16/configure: Regenerate with autoconf 2.61.
	* rs6000/configure: Regenerate with autoconf 2.61.
	* d30v/configure: Regenerate with autoconf 2.61.
	* i386/configure: Regenerate with autoconf 2.61.
	* configure: Regenerate with autoconf 2.61.
	* wince/configure: Regenerate with autoconf 2.61.
	* pa/configure: Regenerate with autoconf 2.61.
	* m32r/configure: Regenerate with autoconf 2.61.
	* mn10200/configure: Regenerate with autoconf 2.61.
	* iq2000/configure: Regenerate with autoconf 2.61.
	* cris/configure: Regenerate with autoconf 2.61.
	* m68k/configure: Regenerate with autoconf 2.61.
	* spu/configure: Regenerate with autoconf 2.61.
	* m32c/configure: Regenerate with autoconf 2.61.
	* mn10300/configure: Regenerate with autoconf 2.61.
	* i960/configure: Regenerate with autoconf 2.61.
	* arm/configure: Regenerate with autoconf 2.61.
	* libnosys/configure: Regenerate with autoconf 2.61.
	* m68hc11/configure: Regenerate with autoconf 2.61.
	* bfin/configure: Regenerate with autoconf 2.61.
	* crx/configure: Regenerate with autoconf 2.61.
	* mt/configure: Regenerate with autoconf 2.61.
	* sparc/configure: Regenerate with autoconf 2.61.
	* sparc/libsys/configure: Regenerate with autoconf 2.61.
	* mcore/configure: Regenerate with autoconf 2.61.
	* mep/configure: Regenerate with autoconf 2.61.
	* frv/configure: Regenerate with autoconf 2.61.
	* doc/configure: Regenerate with autoconf 2.61.
2008-04-04 21:52:01 +00:00
Jeff Johnston 277723722f 2008-01-03 Jeff Johnston <jjohnstn@redhat.com>
* arm/redboot-syscalls.c: Consistently supply _isatty if syscalls
        dir is used in newlib.
        * bfin/syscalls.c: Ditto.
        * cris/gensyscalls: Ditto.
        * fr30/syscalls.c: Ditto.
        * frv/isatty.c: Ditto.
        * iq2000/isatty.c: Ditto.
        * libnosys/isatty.c: Ditto.
        * m32r/isatty.c: Ditto.
        * mn10200/isatty.c: Ditto.
        * mn10300/isatty.c: Ditto.
        * xstormy16/isatty.c: New file with _isatty function.
2008-01-03 22:38:31 +00:00
Hans-Peter Nilsson 911cc0c9f6 * cris/Makefile.in (crt0.o): Add CFLAGS when compiling crt0.S. 2007-12-01 13:14:07 +00:00
Jeff Johnston de229adb1a 2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
* arm/syscalls.c (gettimeofday): Change to POSIX signature
        where second argument is passed as void *.
        * bfin/syscalls.c (gettimeofday): Ditto.
        * cris/gensyscalls (gettimeofday): Ditto.
        * cris/linunistd.h (gettimeofday): Ditto.
        * crx/time.c (gettimeofday): Ditto.
        * frv/sim-time.c (gettimeofday): Ditto.
        * i386/cygmon-salib.c (gettimeofday): Ditto.
        * libnosys/gettod.c (gettimeofday): Ditto.
        * m68k/io-gettimeofday.c (gettimeofday): Ditto.
        * sparc/cygmon-salib.c (gettimeofday): Ditto.
        * spu/gettimeofday.c (gettimeofday): Ditto.
2007-07-06 17:00:13 +00:00
Hans-Peter Nilsson 0bb4152b76 * cris/crt0.S: Use jump, not ba, to skip the interrupt table. Use
"setf", not "nop", for common_v10_v32 compatibility.
	Move out interrupt table to irqtable.S.  Include here for non-ELF.
	* cris/irqtable.S: Extracted from cris/crt0.S.  Provide per-entry
	weak default stub definitions.
	* cris/crtn.c: Use "setf", not "nop", for common_v10_v32
	compatibility.
	* cris/setup.S [__arch_common_v10_v32]: Return.
	* cris/Makefile.in (BSP_OBJS): Add irqtable.o.
2007-02-21 14:08:26 +00:00
Jeff Johnston 00a4b31ad0 2006-05-10 Jeff Johnston <jjohnstn@redhat.com>
* Makefile.in: Pass some additional flags in FLAGS_TO_PASS.
        * configure.in: Add additional flags when creating Makefile.
        * configure: Regenerated.
        * arm/configure
        * arm/configure.in: Set with_multisubdir when creating Makefile.
        * cris/configure.in: Ditto.
        * d30v/configure.in: Ditto.
        * frv/configure.in: Ditto.
        * i386/configure.in: Ditto.
        * iq2000/configure.in: Ditto.
        * libnosys/configure.in: Ditto.
        * m32c/configure.in: Ditto.
        * m32r/configure.in: Ditto.
        * m68hc11/configure.in: Ditto.
        * m68k/configure.in: Ditto.
        * mcore/configure.in: Ditto.
        * mips/configure.in: Ditto.
        * mn10200/configure.in: Ditto.
        * mn10300/configure.in: Ditto.
        * mt/configure.in: Ditto.
        * pa/configure.in: Ditto.
        * rs6000/configure.in: Ditto.
        * sparc/configure.in: Ditto.
        * cris/configure: Regenerated.
        * d30v/configure: Ditto.
        * frv/configure: Ditto.
        * i386/configure: Ditto.
        * iq2000/configure: Ditto.
        * libnosys/configure: Ditto.
        * m32c/configure: Ditto.
        * m32r/configure: Ditto.
        * m68hc11/configure: Ditto.
        * m68k/configure: Ditto.
        * mcore/configure: Ditto.
        * mips/configure: Ditto.
        * mn10200/configure: Ditto.
        * mn10300/configure: Ditto.
        * mt/configure: Ditto.
        * pa/configure: Ditto.
        * rs6000/configure: Ditto.
        * sparc/configure: Ditto.
2006-05-10 20:51:41 +00:00
Jeff Johnston 4e71dc1e3a 2006-04-19 Jeff Johnston <jjohnstn@redhat.com>
* configure.in: Modified to support autoconf 2.59.
        * */configure.in: Ditto.
        * configure: Regenerated.
        * */configure: Ditto.
        * wince/aclocal.m4: Ditto.
        * acinclude.m4: New file.
        * aclocal.m4: Ditto.
        * arm/aclocal.m4: Ditto.
        * cris/aclocal.m4: Ditto.
        * crx/aclocal.m4: Ditto.
        * d30v/aclocal.m4: Ditto.
        * fr30/aclocal.m4: Ditto.
        * frv/aclocal.m4: Ditto.
        * hp74x/aclocal.m4: Ditto.
        * i386/aclocal.m4: Ditto.
        * i960/aclocal.m4: Ditto.
        * iq2000/aclocal.m4: Ditto.
        * libnosys/aclocal.m4: Ditto.
        * m32c/aclocal.m4: Ditto.
        * m32r/aclocal.m4: Ditto.
        * m68hc11/aclocal.m4: Ditto.
        * m68k/aclocal.m4: Ditto.
        * mcore/aclocal.m4: Ditto.
        * mips/aclocal.m4: Ditto.
        * mn10200/aclocal.m4: Ditto.
        * mn10300/aclocal.m4: Ditto.
        * mt/aclocal.m4: Ditto.
        * pa/aclocal.m4: Ditto.
        * rs6000/aclocal.m4: Ditto.
        * sparc/aclocal.m4: Ditto.
        * sparc/libsys/aclocal.m4: Ditto.
        * xstormy16/aclocal.m4: Ditto.
2006-04-19 19:44:05 +00:00
Hans-Peter Nilsson d55950ba3a * cris/linunistd.h: Don't redefine errno as extern int. 2005-11-17 12:01:44 +00:00
Hans-Peter Nilsson a79f7ee058 * cris/Makefile.in (ALL_INSTALL_FILES): New macro.
(ALL_INSTALL_FILES_NEWLIB_COPY): New macro.
	(all): Use ALL_INSTALL_FILES instead of its contents.  Add
	ALL_INSTALL_FILES_NEWLIB_COPY.
	($(objroot)/newlib/%, $(objroot)/newlib/libnosys.a): New rules
2005-02-01 21:22:33 +00:00
Jeff Johnston 3a26703803 2005-01-27 Hans-Peter Nilsson <hp@axis.com>
* configure.in: Support cris-*-* and crisv32-*-*.
        * libnosys/configure.in: Ditto.
        * configure, libnosys/configure: Regenerate.
        * cris: New directory.
        * cris/crt0.S, cris/crtn.c, cris/gensyscalls, cris/linunistd.h,
        cris/outbyte.c, cris/configure.in, cris/crti.c, cris/lcrt0.c,
        cris/Makefile.in, cris/setup.S, cris/configure: New files.
2005-01-27 22:57:32 +00:00