There are no guarantees that the break going to be located exactly
at the _end, but brk(0) is guaranteed to return its current value.
QEMU ELF loader moves the initial break up to the next page boundary,
disabling sbrk-based malloc for any allocations smaller than
the adjustment made. And ASLR may do even worse.
This also adds a submodule pointer to the RISC-V DejaGnu port, which is
required to run the GCC test suite. The DejaGnu port only supports the
GDB simulator. A bunch of tests fail right now, but that's expected.
It's difficult to debug on Travis when there's no information in the
log. We can't print the whole log because it exceeds Travis's maximum
log size, so this instead shows the output of a second "make". Assuming
the makefiles are sane, this will produce just the failing output, but
there's an "exit 1" in there just to be sure we don't hide any parallel
make bugs.
As we prepare binutils for upstreaming we want to start closely tracking
upstream changes. There's a riscv-binutils-gdb repository that contains
the binutils port, and I want to centralize all the development there.
This commit uses that repository instead of the patches that used to
live here, so we're less likely to lose patches.
Augment the handling of --with-arch such that it can properly set XLEN,
atomics flags, and floating point flags. The original
--enable-atomics/float flags are still respected, but if --with-arch is
provided then it supersedes other options.
- with -DREENTRANT_SYSCALLS_PROVIDED (before this commit)
There is no point that application could provide reent syscall
implementation.
(libc.a) (application/non-reent)
fxxx(reent) ---> xxx() ; standalone
- without -DREENTRANT_SYSCALLS_PROVIDED (this commit)
There is a point that application could provide reent syscall
implementation.
(libc.a) (libg.a) (libgloss.a)
fxxx(reent) ---> _xxx_r(reent) ---> xxx() ; pk based
(libc.a) (application/reent)
fxxx(reent) ---> _xxx_r(reent) ; standalone
In addition to some small changes, here's the bigger ones:
* gen_rtx_SET no longer takes a VOIDmode, apparently that was the only
valid argument in that position so it's been dropped.
* GEN_CALL is now gen_call.
* The #defines in riscv.h need to be defined to 1, not just defined,
since they're now used in "if ()" statements.
* glibc is passed "--disable-werror", since the new GCC throws a bunch
of pointless errors like "misleading indentation". This is all in
upstream glibc code.
The arch-specific file needs to provide this, according to
"linux/bits/fcntl-linux.h". "linux/generic/bits/fcntl.h" used to provide this
for RISC-V.
Another way to achieve the same result might be to include
"linux/generic/bits/fcntl.h" from RISC-V's own "bits/fcntl.h", but 'flock' is
defined a bit differently (it will possibly be even more different in the
128-bit implementation) and it's not guarded by "ifndef" in
"linux/generic/bits/fcntl.h".
This file provides an implementation similar to other 64-bit architectures, so
F_GETLK64, F_SETLK64 and F_SETLKW64 are the same as the non-64 counterparts and
__O_LARGEFILE is defined correctly.