Clean up the 32-bit kernel support, fix LP64 fcntl declaration.
In practice, thanks to all the registers the stubs don't actually change,
but it's confusing to have an incorrect declaration.
I suspect that fcntl remains broken for aarch64; it happens to work for
x86_64 because the first vararg argument gets placed in the right register
anyway, but I have no reason to believe that's true for aarch64.
This patch adds a unit test, though, so we'll be able to tell when we get
as far as running the unit tests.
Change-Id: I58dd0054fe99d7d51d04c22781d8965dff1afbf3
diff --git a/libc/Android.mk b/libc/Android.mk
index 190272e..b24320d 100644
--- a/libc/Android.mk
+++ b/libc/Android.mk
@@ -170,17 +170,11 @@
netbsd/resolv/res_state.c \
-# These are shared by all the 32-bit targets, but not the 64-bit ones.
+# These are used by the 32-bit targets, but not the 64-bit ones.
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86))
libc_common_src_files += \
- bionic/fcntl.c \
- bionic/fstatfs.c \
- bionic/__get_tls.cpp \
- bionic/lseek64.c \
+ bionic/legacy_32_bit_support.cpp \
bionic/ndk_cruft.cpp \
- bionic/pread.c \
- bionic/pwrite.c \
- bionic/statfs.c \
endif