Since no other port uses this custom libgloss multi-build.in logic,
and it's making things difficult to unify, drop it all. The set of
installed objects and their content should be the same.
There is a difference in the builds: currently we compile all the
objects in this subdir twice, but only a subset of them use a diff
set of flags, and are actually installed (the librdimon.a and its
objects). So this change speeds things up by removing the duplicate
compilation.
There is a short term cost in having to duplicate the compile rules
for the files that are different, but this is minor when compared to
being able to delete the unused multi-build logic (which we'll do in
a sep commit), and we'll be able to clean this up when we move the
code to unified automake.
None of this should be confused with the common multilib logic.
This is *multi-build* which is processed in parallel.
This logic looks like it was copied from the arm port, but it isn't
actually used here. Since no other port uses this custom libgloss
multi-build.in logic, and it's making things difficult to unify,
and aarch64 isn't even using it, drop it all. The set of installed
objects and their content should be the same.
Once we move this to unified automake, if we want to readd support
for subdir multi-builds, it'll be a lot easier as we can just add
another set of objects with custom flags.
None of this should be confused with the common multilib logic.
This *multi-build* which is processed in parallel.
A recent change to the Makefile.in for riscv resulted in the
machine/syscall.h header not being installed. This updates the file
to install this file again.
Signed-off-by: Simon Cook <simon.cook@embecosm.com>
PR 29515 points out our documentation builds are broken, let's just move
over to the new non-recursive builds.
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
For the exit processing only members of _GLOBAL_REENT were used by default. If
the _REENT_GLOBAL_ATEXIT option was enabled, then the data structures were
provided through dedicated global objects. Make this option the default.
Remove the option. Rename struct _reent members _atexit and _atexit0 to
_reserved_6 and _reserved_7, respectively. Provide them only if
_REENT_BACKWARD_BINARY_COMPAT is defined.
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>
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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>
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.
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
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.