diff options
| author | Elliott Hughes <enh@google.com> | 2014-04-21 17:13:46 -0700 |
|---|---|---|
| committer | Elliott Hughes <enh@google.com> | 2014-04-21 17:13:46 -0700 |
| commit | d39f3f2c2e7fc73ddb019695f0df3417deef5bf4 (patch) | |
| tree | ab5ee52f07ce296396e190040ec6d1e5a8bb2474 | |
| parent | 44a98d5c12530cbd6b1b0779690e9952207c34bf (diff) | |
| download | bionic-d39f3f2c2e7fc73ddb019695f0df3417deef5bf4.zip bionic-d39f3f2c2e7fc73ddb019695f0df3417deef5bf4.tar.gz bionic-d39f3f2c2e7fc73ddb019695f0df3417deef5bf4.tar.bz2 | |
Clean up and document our hacks for building BSD source.
Change-Id: Ic591e22fa5b363bb68376b9f25814c0e5bd83fbf
| -rw-r--r-- | HACKING.txt | 10 | ||||
| -rw-r--r-- | libc/Android.mk | 20 | ||||
| -rw-r--r-- | libc/upstream-freebsd/android/include/freebsd-compat.h (renamed from libc/upstream-freebsd/freebsd-compat.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-freebsd/android/include/libc_private.h (renamed from libc/upstream-freebsd/libc_private.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-freebsd/android/include/namespace.h (renamed from libc/upstream-freebsd/namespace.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-freebsd/android/include/spinlock.h (renamed from libc/upstream-freebsd/spinlock.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-freebsd/android/include/un-namespace.h (renamed from libc/upstream-freebsd/un-namespace.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-netbsd/README.txt | 4 | ||||
| -rw-r--r-- | libc/upstream-netbsd/android/include/env.h (renamed from libc/upstream-netbsd/env.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-netbsd/android/include/extern.h (renamed from libc/upstream-netbsd/extern.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-netbsd/android/include/fd_setsize.h (renamed from libc/upstream-netbsd/fd_setsize.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-netbsd/android/include/namespace.h (renamed from libc/upstream-netbsd/namespace.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-netbsd/android/include/netbsd-compat.h (renamed from libc/upstream-netbsd/netbsd-compat.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-netbsd/android/include/port_after.h (renamed from libc/upstream-netbsd/port_after.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-netbsd/android/include/port_before.h (renamed from libc/upstream-netbsd/port_before.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-netbsd/android/include/rand48.h (renamed from libc/upstream-netbsd/rand48.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-netbsd/android/include/reentrant.h (renamed from libc/upstream-netbsd/reentrant.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-openbsd/README.txt | 5 | ||||
| -rw-r--r-- | libc/upstream-openbsd/android/gdtoa_support.cpp (renamed from libc/upstream-openbsd/gdtoa_support.cpp) | 0 | ||||
| -rw-r--r-- | libc/upstream-openbsd/android/include/arith.h (renamed from libc/upstream-openbsd/arith.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-openbsd/android/include/gd_qnan.h (renamed from libc/upstream-openbsd/gd_qnan.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-openbsd/android/include/openbsd-compat.h (renamed from libc/upstream-openbsd/openbsd-compat.h) | 0 | ||||
| -rw-r--r-- | libc/upstream-openbsd/android/include/thread_private.h (renamed from libc/upstream-openbsd/thread_private.h) | 0 |
23 files changed, 23 insertions, 16 deletions
diff --git a/HACKING.txt b/HACKING.txt index 9f45903..fb93b5a 100644 --- a/HACKING.txt +++ b/HACKING.txt @@ -97,8 +97,14 @@ libc/ upstream-openbsd/ # These directories contain unmolested upstream source. Any time we can # just use a BSD implementation of something unmodified, we should. - # See files like netbsd-compat.h for various ways in which we manage to - # build BSD source in bionic. + # The structure under these directories mimics the upstream tree, + # but there's also... + android/ + include/ + # This is where we keep the hacks necessary to build BSD source + # in our world. The *-compat.h files are automatically included + # using -include, but we also provide equivalents for missing + # header/source files needed by the BSD implementation. bionic/ # This is the biggest mess. The C++ files are files we own, typically diff --git a/libc/Android.mk b/libc/Android.mk index 0ec927a..507126e 100644 --- a/libc/Android.mk +++ b/libc/Android.mk @@ -306,7 +306,7 @@ libc_upstream_netbsd_src_files := \ upstream-netbsd/lib/libc/unistd/killpg.c \ libc_upstream_openbsd_gdtoa_src_files := \ - upstream-openbsd/gdtoa_support.cpp \ + upstream-openbsd/android/gdtoa_support.cpp \ upstream-openbsd/lib/libc/gdtoa/dmisc.c \ upstream-openbsd/lib/libc/gdtoa/dtoa.c \ upstream-openbsd/lib/libc/gdtoa/gdtoa.c \ @@ -549,7 +549,7 @@ LOCAL_CFLAGS := \ -I$(LOCAL_PATH)/dns/include \ -I$(LOCAL_PATH)/private \ -I$(LOCAL_PATH)/upstream-netbsd/lib/libc/include \ - -include upstream-netbsd/netbsd-compat.h + -include upstream-netbsd/android/include/netbsd-compat.h LOCAL_CONLYFLAGS := $(libc_common_conlyflags) LOCAL_CPPFLAGS := $(libc_common_cppflags) LOCAL_C_INCLUDES := $(libc_common_c_includes) @@ -573,9 +573,9 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(libc_upstream_freebsd_src_files) LOCAL_CFLAGS := \ $(libc_common_cflags) \ - -I$(LOCAL_PATH)/upstream-freebsd \ + -I$(LOCAL_PATH)/upstream-freebsd/android/include \ -I$(LOCAL_PATH)/upstream-freebsd/lib/libc/include \ - -include upstream-freebsd/freebsd-compat.h + -include freebsd-compat.h LOCAL_CONLYFLAGS := $(libc_common_conlyflags) LOCAL_CPPFLAGS := $(libc_common_cppflags) LOCAL_C_INCLUDES := $(libc_common_c_includes) @@ -600,9 +600,9 @@ LOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files) LOCAL_CFLAGS := \ $(libc_common_cflags) \ -DPOSIX_MISTAKE \ - -I$(LOCAL_PATH)/upstream-netbsd \ + -I$(LOCAL_PATH)/upstream-netbsd/android/include \ -I$(LOCAL_PATH)/upstream-netbsd/lib/libc/include \ - -include upstream-netbsd/netbsd-compat.h + -include netbsd-compat.h LOCAL_CONLYFLAGS := $(libc_common_conlyflags) LOCAL_CPPFLAGS := $(libc_common_cppflags) LOCAL_C_INCLUDES := $(libc_common_c_includes) @@ -626,9 +626,9 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(libc_upstream_openbsd_src_files) LOCAL_CFLAGS := \ $(libc_common_cflags) \ - -I$(LOCAL_PATH)/upstream-openbsd \ + -I$(LOCAL_PATH)/upstream-openbsd/android/include \ -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/include \ - -include upstream-openbsd/openbsd-compat.h + -include openbsd-compat.h LOCAL_CONLYFLAGS := $(libc_common_conlyflags) LOCAL_CPPFLAGS := $(libc_common_cppflags) LOCAL_C_INCLUDES := $(libc_common_c_includes) @@ -653,9 +653,9 @@ LOCAL_SRC_FILES_32 := $(libc_upstream_openbsd_gdtoa_src_files_32) LOCAL_SRC_FILES_64 := $(libc_upstream_openbsd_gdtoa_src_files_64) LOCAL_CFLAGS := \ $(libc_common_cflags) \ - -I$(LOCAL_PATH)/upstream-openbsd \ + -I$(LOCAL_PATH)/upstream-openbsd/android/include \ -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/include \ - -include upstream-openbsd/openbsd-compat.h \ + -include openbsd-compat.h \ LOCAL_CONLYFLAGS := $(libc_common_conlyflags) LOCAL_CPPFLAGS := $(libc_common_cppflags) diff --git a/libc/upstream-freebsd/freebsd-compat.h b/libc/upstream-freebsd/android/include/freebsd-compat.h index d5f1425..d5f1425 100644 --- a/libc/upstream-freebsd/freebsd-compat.h +++ b/libc/upstream-freebsd/android/include/freebsd-compat.h diff --git a/libc/upstream-freebsd/libc_private.h b/libc/upstream-freebsd/android/include/libc_private.h index c6a6433..c6a6433 100644 --- a/libc/upstream-freebsd/libc_private.h +++ b/libc/upstream-freebsd/android/include/libc_private.h diff --git a/libc/upstream-freebsd/namespace.h b/libc/upstream-freebsd/android/include/namespace.h index a980b57..a980b57 100644 --- a/libc/upstream-freebsd/namespace.h +++ b/libc/upstream-freebsd/android/include/namespace.h diff --git a/libc/upstream-freebsd/spinlock.h b/libc/upstream-freebsd/android/include/spinlock.h index f5c3785..f5c3785 100644 --- a/libc/upstream-freebsd/spinlock.h +++ b/libc/upstream-freebsd/android/include/spinlock.h diff --git a/libc/upstream-freebsd/un-namespace.h b/libc/upstream-freebsd/android/include/un-namespace.h index a3f850e..a3f850e 100644 --- a/libc/upstream-freebsd/un-namespace.h +++ b/libc/upstream-freebsd/android/include/un-namespace.h diff --git a/libc/upstream-netbsd/README.txt b/libc/upstream-netbsd/README.txt index 86af6eb..e2d146e 100644 --- a/libc/upstream-netbsd/README.txt +++ b/libc/upstream-netbsd/README.txt @@ -2,8 +2,4 @@ This directory contains upstream NetBSD source. You should not edit these files directly. Make fixes upstream and then pull down the new version of the file. -Note that code in the other 'netbsd' directory contains Android modifications. -We should work towards getting as many of those changes as possible upstream -and then losing those files in favor of pure upstream copies here instead. - TODO: write a script to make this process automated. diff --git a/libc/upstream-netbsd/env.h b/libc/upstream-netbsd/android/include/env.h index 8f99f9d..8f99f9d 100644 --- a/libc/upstream-netbsd/env.h +++ b/libc/upstream-netbsd/android/include/env.h diff --git a/libc/upstream-netbsd/extern.h b/libc/upstream-netbsd/android/include/extern.h index 616becd..616becd 100644 --- a/libc/upstream-netbsd/extern.h +++ b/libc/upstream-netbsd/android/include/extern.h diff --git a/libc/upstream-netbsd/fd_setsize.h b/libc/upstream-netbsd/android/include/fd_setsize.h index e69de29..e69de29 100644 --- a/libc/upstream-netbsd/fd_setsize.h +++ b/libc/upstream-netbsd/android/include/fd_setsize.h diff --git a/libc/upstream-netbsd/namespace.h b/libc/upstream-netbsd/android/include/namespace.h index a4d4151..a4d4151 100644 --- a/libc/upstream-netbsd/namespace.h +++ b/libc/upstream-netbsd/android/include/namespace.h diff --git a/libc/upstream-netbsd/netbsd-compat.h b/libc/upstream-netbsd/android/include/netbsd-compat.h index 84be931..84be931 100644 --- a/libc/upstream-netbsd/netbsd-compat.h +++ b/libc/upstream-netbsd/android/include/netbsd-compat.h diff --git a/libc/upstream-netbsd/port_after.h b/libc/upstream-netbsd/android/include/port_after.h index 3f8b6f8..3f8b6f8 100644 --- a/libc/upstream-netbsd/port_after.h +++ b/libc/upstream-netbsd/android/include/port_after.h diff --git a/libc/upstream-netbsd/port_before.h b/libc/upstream-netbsd/android/include/port_before.h index 9fa9487..9fa9487 100644 --- a/libc/upstream-netbsd/port_before.h +++ b/libc/upstream-netbsd/android/include/port_before.h diff --git a/libc/upstream-netbsd/rand48.h b/libc/upstream-netbsd/android/include/rand48.h index 1ad8b0d..1ad8b0d 100644 --- a/libc/upstream-netbsd/rand48.h +++ b/libc/upstream-netbsd/android/include/rand48.h diff --git a/libc/upstream-netbsd/reentrant.h b/libc/upstream-netbsd/android/include/reentrant.h index 3ca8fd6..3ca8fd6 100644 --- a/libc/upstream-netbsd/reentrant.h +++ b/libc/upstream-netbsd/android/include/reentrant.h diff --git a/libc/upstream-openbsd/README.txt b/libc/upstream-openbsd/README.txt new file mode 100644 index 0000000..9db64ea --- /dev/null +++ b/libc/upstream-openbsd/README.txt @@ -0,0 +1,5 @@ +This directory contains upstream OpenBSD source. You should not edit these +files directly. Make fixes upstream and then pull down the new version of +the file. + +TODO: write a script to make this process automated. diff --git a/libc/upstream-openbsd/gdtoa_support.cpp b/libc/upstream-openbsd/android/gdtoa_support.cpp index 4e7bf3b..4e7bf3b 100644 --- a/libc/upstream-openbsd/gdtoa_support.cpp +++ b/libc/upstream-openbsd/android/gdtoa_support.cpp diff --git a/libc/upstream-openbsd/arith.h b/libc/upstream-openbsd/android/include/arith.h index b262e4f..b262e4f 100644 --- a/libc/upstream-openbsd/arith.h +++ b/libc/upstream-openbsd/android/include/arith.h diff --git a/libc/upstream-openbsd/gd_qnan.h b/libc/upstream-openbsd/android/include/gd_qnan.h index e8e907b..e8e907b 100644 --- a/libc/upstream-openbsd/gd_qnan.h +++ b/libc/upstream-openbsd/android/include/gd_qnan.h diff --git a/libc/upstream-openbsd/openbsd-compat.h b/libc/upstream-openbsd/android/include/openbsd-compat.h index b55f390..b55f390 100644 --- a/libc/upstream-openbsd/openbsd-compat.h +++ b/libc/upstream-openbsd/android/include/openbsd-compat.h diff --git a/libc/upstream-openbsd/thread_private.h b/libc/upstream-openbsd/android/include/thread_private.h index 10421e2..10421e2 100644 --- a/libc/upstream-openbsd/thread_private.h +++ b/libc/upstream-openbsd/android/include/thread_private.h |
