Commit graph

6526 commits

Author SHA1 Message Date
Elliott Hughes
e65055af11 Merge "Stop asking GCC to cause trouble." 2014-02-20 22:49:42 +00:00
Elliott Hughes
b8dc9bbd90 Stop asking GCC to cause trouble.
Why do we see so many bogus strict-aliasing warnings? Because we asked GCC to
cause trouble on arm and mips.

Change-Id: I25d7fd036b6afff7ccfa799abe0dc1579ead2847
2014-02-20 14:35:20 -08:00
Elliott Hughes
26172fa401 Merge "Move the upstream-netbsd libc files into the correct directory." 2014-02-20 22:23:21 +00:00
Elliott Hughes
677b6e605b Move the upstream-netbsd libc files into the correct directory.
I screwed up when I originally imported these files; they're in lib/libc/
in the upstream tree; there is no top-level libc/ (though there is a top-level
common/, so those files stay where they are).

Change-Id: I7c5e2224a4441ab0e33616a855a8c6aacfeac46f
2014-02-20 14:16:58 -08:00
Elliott Hughes
8d0fe1c49e Merge "Remove two DNS files that weren't being built." 2014-02-20 22:14:35 +00:00
Elliott Hughes
cb43f8474d Merge "Unify our assembler macros." 2014-02-20 22:13:18 +00:00
Elliott Hughes
d28b277952 Remove two DNS files that weren't being built.
And switch the makefile to just building everything in the relevant directory.

Change-Id: Ia7785c4dcabb51639c2230026f8a8a9eff919a36
2014-02-20 13:59:20 -08:00
Elliott Hughes
851e68a240 Unify our assembler macros.
Our <machine/asm.h> files were modified from upstream, to the extent
that no architecture was actually using the upstream ENTRY or END macros,
assuming that architecture even had such a macro upstream. This patch moves
everyone to the same macros, with just a few tweaks remaining in the
<machine/asm.h> files, which no one should now use directly.

I've removed most of the unused cruft from the <machine/asm.h> files, though
there's still rather a lot in the mips/mips64 ones.

Bug: 12229603
Change-Id: I2fff287dc571ac1087abe9070362fb9420d85d6d
2014-02-20 13:51:26 -08:00
Elliott Hughes
22c6b7ffd3 Merge "Fix mips64 crt build." 2014-02-20 19:58:23 +00:00
Elliott Hughes
c345caae9a Fix mips64 crt build.
This was broken during the multi-arch makefile changes.

Change-Id: Id25cf3273f63c11fbca1cff944fc5e1bf765c636
2014-02-20 11:57:25 -08:00
Elliott Hughes
6a686556b9 Merge "Remove useless _C_LABEL from our assembler source." 2014-02-20 19:52:37 +00:00
Elliott Hughes
09289d92f9 Remove useless _C_LABEL from our assembler source.
Change-Id: I41a9181537c70ecc69ef8035132c9a83811a40d0
2014-02-20 11:51:11 -08:00
Elliott Hughes
bfa2b6fc6a Merge "Stop advertising an arm32-specific hack like it's a build system feature." 2014-02-20 19:41:15 +00:00
Dmitriy Ivanov
54d49ac75b Merge "Added script generating additions to libgcc_compat.c from linker errors" 2014-02-20 19:40:08 +00:00
Elliott Hughes
6e39ba73bf Stop advertising an arm32-specific hack like it's a build system feature.
Change-Id: I3a830b4a3516b6eb8e4f8e6e6b122a22a2e341df
2014-02-20 11:36:55 -08:00
Dmitriy Ivanov
adab51aefd Added script generating additions to libgcc_compat.c from linker errors
bug: 12234455
Change-Id: Icac35237f06e75745da5a91d9c4c941d7df4f84d
2014-02-20 11:34:08 -08:00
Elliott Hughes
ca566b3103 Merge "Don't explicitly list the tzcode files." 2014-02-20 19:31:13 +00:00
Elliott Hughes
1fbe6213cd Don't explicitly list the tzcode files.
Change-Id: I3ac19899523ac1f5fd2fdd6c942aefce75a964a4
2014-02-20 11:28:20 -08:00
Narayan Kamath
d9459525b4 Merge "Fix signbit / infinite / isinf / isnan unit tests." 2014-02-20 10:03:56 +00:00
Elliott Hughes
75f04d1076 Merge "Remove the useless _C_LABEL from generated system calls." 2014-02-20 03:00:16 +00:00
Elliott Hughes
d465eb4e76 Remove the useless _C_LABEL from generated system calls.
Change-Id: Id1d2fd39972652831ea825f6f9cf940b08f42b5c
2014-02-19 18:59:19 -08:00
Elliott Hughes
fbaddda9f0 Merge "Linker writes to wrong memory location when processing DT_MIPS_RLD_MAP" 2014-02-19 23:40:46 +00:00
Elliott Hughes
b69c0b532e Merge "Make mips/mips64 syscall stubs more like the other architectures." 2014-02-19 23:35:31 +00:00
Elliott Hughes
6db95a869e Merge "Top-level documentation about working on bionic." 2014-02-19 22:58:04 +00:00
Elliott Hughes
9abbbdc534 Make mips/mips64 syscall stubs more like the other architectures.
Change-Id: I55f8c1a95f643a6e484f12fbcc25e2c77e55b6b8
2014-02-19 14:54:31 -08:00
Elliott Hughes
e6c451f5f2 Merge "Make mips generated assembler more like the mips64 stuff." 2014-02-19 20:28:34 +00:00
Elliott Hughes
eae27dc55a Make mips generated assembler more like the mips64 stuff.
I broke the mips build yesterday because it doesn't use
<private/bionic_asm.h> like the other architectures, including mips64.
I want to move mips closer to mips64 to try to avoid this kind of thing
in future.

Change-Id: Idb985587ff355b9e5e765c1f5671dc0144cd2488
2014-02-19 12:20:00 -08:00
Narayan Kamath
5f6f4a956c Fix signbit / infinite / isinf / isnan unit tests.
Turns out stlport isn't broken. <cmath> (included
transitively via gtest in our case) is not required
to make C99 math macros (like signbit) available, nor is
it required to preserve them if they're already defined.
It is only required to make the equivalent functions in
namespace std available.

I couldn't find any documentation of required behaviour for
programs that include both <math.h> and <cmath>.

I've verified experimentally that llvm's libc++ and gnu
stl behave the same as stlport.

bug: 12935307

Change-Id: I9dc5cc0fd9f4f259abc8eefb280177cdd092a94b
2014-02-19 18:50:30 +00:00
Elliott Hughes
560cee6bff Top-level documentation about working on bionic.
Change-Id: If0a531865fa9c0d57486b98d4b78e3efcbf4e1d1
2014-02-18 22:08:56 -08:00
Elliott Hughes
44ef37c1b4 Merge "Use uid_t and gid_t for st_uid and st_gid in struct stat." 2014-02-19 00:51:31 +00:00
Elliott Hughes
24ef4779eb Merge "Fix build by avoiding the _C_LABEL macro." 2014-02-19 00:46:32 +00:00
Elliott Hughes
6b5559315d Use uid_t and gid_t for st_uid and st_gid in struct stat.
Change-Id: Ide62dc714d76d881e3aa79e7a59ee6533a23dd00
2014-02-18 16:43:31 -08:00
Elliott Hughes
986f906710 Fix build by avoiding the _C_LABEL macro.
Change-Id: Ide367c2b65071388bd95fbc81a4ed6ae94aec4e4
2014-02-18 16:42:36 -08:00
Benjamin Adolphi
006f9ad891 Linker writes to wrong memory location when processing DT_MIPS_RLD_MAP
When bionic's dynamic linker processes the .dynamic section of a MIPS ELF binary and encounters the DT_MIPS_RLD_MAP dynamic array tag, it calculates the address of where to write a pointer to the _r_debug structure. The current implementation simply reads the value given in the d_ptr field and writes the pointer address to that location. However, this value has to be adjusted to reflect the real load address of the binary. Otherwise the linker will write to a faulty location possibly resulting in a crash when linking a MIPS binary that includes DT_MIPS_RLD_MAP. This change corrects that problem.

Change-Id: I1a91874f7ab47289001fe72d9016660c14c70362
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
2014-02-19 00:50:32 +01:00
Elliott Hughes
787c1f937a Merge "Add missing file from previous change." 2014-02-18 23:49:16 +00:00
Elliott Hughes
1d18e9cc0a Add missing file from previous change.
Change-Id: Id25000162a9ed76ce756842bdc09fe9afff9528f
2014-02-18 15:48:56 -08:00
Elliott Hughes
b36020789a Merge "Implement some of the missing LFS64 support." 2014-02-18 23:40:56 +00:00
Elliott Hughes
db1ea34748 Implement some of the missing LFS64 support.
This gives us:

* <dirent.h>
  struct dirent64
  readdir64, readdir64_r, alphasort64, scandir64

* <fcntl.h>
  creat64, openat64, open64.

* <sys/stat.h>
  struct stat64
  fstat64, fstatat64, lstat64, stat64.

* <sys/statvfs.h>
  struct statvfs64
  statvfs64, fstatvfs64.

* <sys/vfs.h>
  struct statfs64
  statfs64, fstatfs64.

This also removes some of the incorrect #define hacks we've had in the
past (for stat64, for example, which we promised to clean up way back
in bug 8472078).

Bug: 11865851
Bug: 8472078
Change-Id: Ia46443521918519f2dfa64d4621027dfd13ac566
2014-02-18 15:39:24 -08:00
Elliott Hughes
3623d80675 Merge "Fix x86 build." 2014-02-18 20:35:15 +00:00
Elliott Hughes
915fefb62e Fix x86 build.
Change-Id: Iee6e5884288f7da6c955694cfe32fecfd9c9e263
2014-02-18 12:34:51 -08:00
Elliott Hughes
ffe026680e Merge "bionic: fix __set_errno for arm64 syscalls that return a 64-bit value" 2014-02-18 20:31:01 +00:00
Colin Cross
3d19a8319b bionic: fix __set_errno for arm64 syscalls that return a 64-bit value
bionic/libc/arch-arm64/syscalls/read.S ends with:
    b.hi __set_errno
    ret
END(read)

If __set_errno returns int, it will set w0 to 0xFFFFFFFF, which means
x0 is 0x00000000FFFFFFFF.  When interpreted as a ssize_t that is
INT_MAX, not -1.

Change __set_errno to return long, which will cause x0 to be set instead
of w0.

Change-Id: I9f9ea0f2995928d2ea240eb2ff7758ecdf0ff412
2014-02-18 12:11:38 -08:00
Elliott Hughes
7f15e28dd4 Merge "Clean up warnings in libstdc++." 2014-02-18 20:05:59 +00:00
Elliott Hughes
cd6748cdd7 Merge "Clean up various warnings in bionic." 2014-02-18 20:05:17 +00:00
Elliott Hughes
a38cb08861 Clean up various warnings in bionic.
Change-Id: Ic57541d0a567fd4ae79f0ad59b2ffde1130eb7d2
2014-02-18 12:04:54 -08:00
Elliott Hughes
240f1e2940 Clean up warnings in libstdc++.
Change-Id: Ie71a2fdf227e7a5fc9a446bb1be110da9b3a4280
2014-02-18 12:02:37 -08:00
Elliott Hughes
d4bc9ef83b Merge "Remove duplicate definitions of MIN and MAX." 2014-02-17 19:00:18 +00:00
Elliott Hughes
cfbfe7059c Remove duplicate definitions of MIN and MAX.
These were needed when bionic's header files were missing these macros (though
it would have made a lot more sense to just fix the header files!) but cause
warnings now.

Change-Id: I65a677122f4f6bd07dffc3f37a0c4c0e823d1bb0
2014-02-17 10:57:56 -08:00
Colin Cross
95b808c4ae Merge "build linker and linker64 on 64-bit architectures" 2014-02-14 00:56:22 +00:00
Colin Cross
36ee4ab243 build linker and linker64 on 64-bit architectures
Change-Id: I400bbaf5a779fc427de4c3d86c66548b0179b10d
2014-02-13 11:18:47 -08:00