am f3489807: Merge "Clean up and document our hacks for building BSD source."

* commit 'f3489807af6d48f208bc796d3c9b0d83a4fd5374':
  Clean up and document our hacks for building BSD source.
This commit is contained in:
Elliott Hughes 2014-04-22 13:31:59 +00:00 committed by Android Git Automerger
commit 71eb83acc5
23 changed files with 23 additions and 16 deletions

View File

@ -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

View File

@ -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)

View File

@ -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.

View File

@ -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.