aboutsummaryrefslogtreecommitdiff
path: root/libgloss
AgeCommit message (Collapse)AuthorFilesLines
2022-04-27libgloss: pru: Fix _open syscal argumentsDimitar Dimitrov1-1/+17
The _open() C function is declared as having variable arguments in newlib, so second and third arguments are passed on stack. Add code to move them into registers, since that's where the PRU simulator expects them. Issue was exposed by the GCC test gcc.c-torture/execute/fprintf-2.c, which relies on tmpnam implementation to pass correct flags to _open. Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2022-03-20Revert accidental change to v850/sim.ldJeff Law1-1/+1
2022-03-19Avoid using common symbols in v850 libglossJeff Law26-26/+26
I've had this lying around for probably a year or two at this point. It just changes all the instance of "errno" from a common symbol to an extern. I can't offhand recall where the actual definition is, but it certainly exists in the generic code.
2022-03-04libgloss: add new Build System Internals node to the menuMike Frysinger1-1/+2
Seems that some versions of texinfo require the @menu to have all entries at the top level, so add the new build one to it.
2022-03-01libgloss: merge lm32 into top-level MakefileMike Frysinger6-126/+82
Avoid a recursive make to speed things up a bit. This drops the header install logic because the lm32/ subdir doesn't actually have any header files to install.
2022-03-01libgloss: use m4_foreach_w to simplify the logic a bitMike Frysinger2-22/+24
It's functionally the same, but the configure.ac code is simpler and less boiler plate duplicated.
2022-02-28libgloss: add a little build system generation documentationMike Frysinger1-1/+49
This is a bit of an abbreviated form of what's in the Newlib subdir, but with emphasis on Libgloss-specific parts, and anything unique to it. I haven't put too much effort in.
2022-02-25libgloss: iq2000: fix prototypeMike Frysinger1-1/+1
2022-02-25libgloss: switch to AM_PROG_ARMike Frysinger10-15/+776
Now that we require Automake 1.15, we can use this macro rather than set the tool up ourselves. The current code doesn't properly search for a prefixed ar tool as-is.
2022-02-24libgloss: document & localize custom multi-do ruleMike Frysinger3-9/+14
The multi-build.in file in libgloss duplicates common multilib logic in the root source tree. Document it a bit, and rename the rule so it doesn't clash with the common multi-do rule. This will let us use them in the same makefile so we can merge aarch64/ & arm/ up (as the only targets that use this local multi-build.in atm).
2022-02-24libgloss: finish migration to AM_PROG_ASMike Frysinger11-179/+1633
When merging iq2000 up a level, it included a partial conversion to AM_PROG_AS in the common directory. Finish it for all directories to kill off the custom LIB_AM_PROG_AS which we no longer need since we require Automake 1.15 now.
2022-02-24libgloss: switch to standard AC_PROG_CCMike Frysinger9-2032/+1584
Now that we use AC_NO_EXECUTABLES, and we require a recent version of autoconf, we don't need to define our own copies of these macros. So switch to the standard AC_PROG_CC.
2022-02-23libgloss: merge sparc configure script up a levelMike Frysinger9-4407/+38
Move the minor sparc-specific logic to a dedicated variable so we can merge its configure logic up a level.
2022-02-22libgloss: enable maintainer mode supportMike Frysinger4-4/+76
Use AM_MAINTAINER_MODE so devs have to opt-in to automatic rebuilds of autotools. This matches what newlib (and most every other GNU toolchain package) does with automake.
2022-02-22Make __sdidinit unusedMatt Joyce2-2/+2
Remove dependency on __sdidinit member of struct _reent to check object initialization. Like __sdidinit, the __cleanup member of struct _reent is initialized in the __sinit() function. Checking initialization against __cleanup serves the same purpose and will reduce overhead in the __sfp() function in a follow up patch.
2022-02-17libgloss: have README point to the manualMike Frysinger2-16/+16
The README has such little info in it, so point people to the much more extensive porting manual.
2022-02-17libgloss: merge mips configure script up a levelMike Frysinger8-4499/+132
Move the minor mips-specific logic to a dedicated file & namespace them so we can merge its configure logic up a level.
2022-02-17libgloss: merge wince configure script up a levelMike Frysinger11-6315/+151
Move the minor wince-specific logic to a dedicated file & namespace them so we can merge its configure logic up a level. The makefile is a bit tricky, but maybe it still works.
2022-02-16libgloss: build with -nostdincMike Frysinger2-0/+31
We don't want libgloss building against C library headers that happened to be installed with the toolchain, so add -nostdinc to the build. We still need access to the compiler internal headers, so probe those and include them via -isystem. This uses a similar probing style as glibc, which has used it for over a decade, so it should be safe & stable. This should prevent any latent bugs due to testing with a toolchain that is fully configured & installed already.
2022-02-16libgloss: sparc: merge libsys/ up a levelMike Frysinger6-4305/+9
The libsys/configure script isn't doing anything useful, so merge the logic up to the parent dir.
2022-02-16libgloss: aarch64: merge cpu-init/ up a levelMike Frysinger6-4501/+14
The cpu-init/configure script isn't doing anything useful, so merge the logic up to the parent dir. This is how the arm/ tree integrates its cpu-init/ subdir too.
2022-02-16libgloss: merge mn10300 configure script up a levelMike Frysinger8-4421/+57
Move the minor mn10300-specific logic to a dedicated file & namespace them so we can merge its configure logic up a level. part_specific_obj wasn't used anywhere (looks like copy & paste left over from mips), so drop it entirely.
2022-02-16libgloss: merge mn10200 configure script up a levelMike Frysinger7-4399/+20
The mn10200-specific logic (setting up part_specific_obj) isn't used by the build anywhere -- looks like copy & paste left overs from mips. So punt that & merge the target_makefile_frag_path up to the top-level.
2022-02-16libgloss: merge m68k configure script up a levelMike Frysinger8-5506/+87
Move the minor m68k-specific logic to a dedicated file & namespace them so we can merge its configure logic up a level.
2022-02-16libgloss: m68k: switch to AC_NO_EXECUTABLESMike Frysinger2-11/+81
Use this macro rather than hacking up the LDFLAGS settings. This will make it easier to merge the logic into the top-level which is already using AC_NO_EXECUTABLES.
2022-02-16libgloss: merge mcore configure script up a levelMike Frysinger8-4382/+41
Move the minor mcore-specific logic to a dedicated file & namespace them so we can merge its configure logic up a level.
2022-02-16libgloss: merge moxie configure script up a levelMike Frysinger8-4393/+49
Move the minor moxie-specific logic to a dedicated file & namespace them so we can merge its configure logic up a level.
2022-02-16libgloss: merge i386 configure script up a levelMike Frysinger8-4391/+37
Move the minor i386-specific logic to a dedicated variable so we can merge its configure logic up a level.
2022-02-16libgloss: i386: simplify target flagsMike Frysinger3-15/+11
Collapse these 3 settings into one variable to make it easier to merge into the top-level.
2022-02-15newlib/libgloss: drop unused $(CROSS_CFLAGS)Mike Frysinger4-7/+4
This is used in a bunch of places, but nowhere is it ever set, and nowhere can I find any documentation, nor can I find any other project using it. So delete the flags to simplify.
2022-02-12libgloss: bfin: fix various warningsMike Frysinger1-2/+3
No functional changes here, just fix warnings the compiler noticed. bfin/syscalls.c:156:13: warning: conflicting types for built-in function ‘memset’ bfin/syscalls.c: In function ‘_unlink’: bfin/syscalls.c:193:3: warning: passing argument 2 of ‘do_syscall’ discards qualifiers from pointer target type bfin/syscalls.c:33:1: note: expected ‘void *’ but argument is of type ‘const char *’ bfin/syscalls.c: In function ‘_exit’: bfin/syscalls.c:104:1: warning: ‘noreturn’ function does return
2022-02-12libgloss: bfin: fix local header usage after automake moveMike Frysinger2-20/+23
Compiling the basiccrt .S files missed an include to the local bfin/ headers causing the build to break when installing anew. Reported-by: Jeff Law <jeffreyalaw@gmail.com>
2022-02-11libgloss: merge csky configure script up a levelMike Frysinger7-4385/+20
Now that the csky-specific logic ($DO) has been deleted, we can fold it up a level easily enough.
2022-02-11libgloss: merge bfin into top-level MakefileMike Frysinger6-261/+406
Avoid a recursive make to speed things up a bit.
2022-02-11libgloss: merge iq2000 into top-level MakefileMike Frysinger7-192/+368
Avoid a recursive make to speed things up a bit.
2022-02-11libgloss: merge libnosys into top-level MakefileMike Frysinger6-179/+383
Avoid a recursive make to speed things up a bit.
2022-02-11libgloss: csky: clean up unused m68k logicMike Frysinger3-1058/+2
It looks like csky was created by copying & pasting the m68k port, but m68k-specific stuff was left over related to target selection. The makefile doesn't do anything with it, so punt it all to make the file much simpler.
2022-02-09libgloss: merge doc into top-level MakefileMike Frysinger6-227/+388
Avoid a recursive make with this tiny subdir to speed things up a bit.
2022-02-09libgloss: convert top level to automakeMike Frysinger5-170/+755
The top level dir isn't doing anything interesting, just recursing into subdirs. So this change isn't terribly exciting. But it sets us up for doing more fun stuff in follow up commits. [TODO] Check test targets
2022-02-09libgloss: m68k: rename $DO to $TARGETMike Frysinger3-14/+14
The common $DO variable is used by the multilib logic to control which target to multiplex. But the m68k subdir is also using $DO to control which target (m68k or fido) to build. As we flatten things to automake, this conflict shows up and breaks the m68k build. Just rename the m68k variable to something unique to avoid it.
2022-02-04libgloss: restore multilib settings in subdir makefilesMike Frysinger4-2/+32
Commit 754f8def0dfeeb43afa5a96ad1971fd0ef02c419 ("libgloss: merge stub arch configure scripts up a level") had an unintended side-effect: the MULTI* variables in the Makefiles no longer get rewritten at configure time in the subdirs. Only the top-level Makefile still is. This is because the configure integration of multilib (both the way libgloss did it manually and the way AM_ENABLE_MULTILIB does it) only rewrites "Makefile". We could try propagating the MULTI* variables from libgloss/Makefile down via FLAGS_TO_PASS, but this runs into a limitation: the multilib logic uses this variable to switch from libgloss/ to each multilib libgloss/, and libgloss uses this variable to enter subdirectories. The latter we want, but the former ends up overridding the Makefile environment. We could side-step that with some GNU Make directives, but it feels like we're getting a bit too deep down the rabbit hole. Instead, let's call config-ml.in ourselves for each subdir Makefile that the top-level configure generates. This restores the previous behavior and should be less risky in general. This logic should be unnecessary when/if we switch libgloss over to a non-recursive Automake build (since all build+install settings are in the single libgloss/Makefile), but it'll be a while before we can land that rework, so let's fix this up now.
2022-02-01libgloss: move to ../config/multi.m4 for multilib logicMike Frysinger39-247/+868
The current libgloss multilib logic is almost exactly the same as the config/multi.m4, and the differences should be minor, so switch over to that to delete custom logic on ourside. The insertions here look larger and that's because none of the scripts were declaring --enable-multilib explicitly even though they checked the flag and changed behavior.
2022-02-01libgloss: merge subdirs that have unique makefile_frags up a levelMike Frysinger15-12954/+35
Merge the subdir configure scripts up that only existed to set unique values for their target/host makefile_frags.
2022-02-01libgloss: merge epiphany & libnosys & or1k configure scripts up a levelMike Frysinger21-13752/+1864
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-01-29libgloss: fix more missing dir with parallel installMike Frysinger33-2/+131
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-29libgloss: update Makefile regen rules for merged archesMike Frysinger6-30/+12
For arches that had their configure merged into the top-level, make sure they don't still depend on a subdir configure script that no longer exists. I had cleaned this up for some of the subdirs, but these got lost in the shuffle.
2022-01-28Finish this commit by prefixing HAVE_INITFINI_ARRAY and HAVE_INIT_FINI ↵Jeff Law5-6/+6
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-28libgloss: aarch64/sparc: fix missing dir with parallel installMike Frysinger3-1/+14
Depending on the processing order of rules when installing in parallel, install-board might run first and the target dirs don't yet exist.
2022-01-28libgloss: bfin: fix missing dir with parallel installMike Frysinger1-0/+1
Depending on the processing order of rules when installing in parallel, install-board might run first and the target dirs don't yet exist.
2022-01-27libgloss: Fix PRU & Blackfin mkinstalldirs pathDimitar Dimitrov2-4/+2
With the move of configure scripts out of target directories, relative paths to top_srcdir got broken: /bin/sh: .../newlib/libgloss/../../mkinstalldirs: No such file or directory Fix the PRU build by switching to srcroot relative path, as rest of targets do. Fix the Blackfin build in the same way. Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>