Remove invalid uses of -l and -I

LOCAL_LDLIBS should only be used with -l flags for NDK and some host
libraries. Other uses should use LOCAL_SHARED_LIBRARIES.

LOCAL_LDFLAGS should not contain -l entries, they should be in
LOCAL_LDLIBS instead.

LOCAL_CFLAGS should not contain -I entries, those should use
LOCAL_C_INCLUDES instead.

Change-Id: Ic901aa14651572ac682166becd4f0cd86baecc34
This commit is contained in:
Dan Willemsen 2016-05-25 13:19:49 -07:00
parent 58ea31cc90
commit ee2da03e26
5 changed files with 11 additions and 8 deletions

View File

@ -25,7 +25,9 @@ libbacktrace_common_conlyflags := \
libbacktrace_common_cppflags := \
-std=gnu++11 \
-I external/libunwind/include/tdep \
libbacktrace_common_c_includes := \
external/libunwind/include/tdep \
# The latest clang (r230699) does not allow SP/PC to be declared in inline asm lists.
libbacktrace_common_clang_cflags += \

View File

@ -10,12 +10,11 @@ include $(CLEAR_VARS)
LOCAL_MODULE:= libnativebridge
LOCAL_SRC_FILES:= $(NATIVE_BRIDGE_COMMON_SRC_FILES)
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_SHARED_LIBRARIES := liblog libdl
LOCAL_CLANG := true
LOCAL_CPP_EXTENSION := .cc
LOCAL_CFLAGS += -Werror -Wall
LOCAL_CPPFLAGS := -std=gnu++11 -fvisibility=protected
LOCAL_LDFLAGS := -ldl
LOCAL_MULTILIB := both
include $(BUILD_SHARED_LIBRARY)

View File

@ -13,7 +13,7 @@ LOCAL_SRC_FILES:= $(NATIVE_BRIDGE_COMMON_SRC_FILES)
LOCAL_CLANG := true
LOCAL_CFLAGS += -Werror -Wall
LOCAL_CPPFLAGS := -std=gnu++11 -fvisibility=protected
LOCAL_LDFLAGS := -ldl
LOCAL_SHARED_LIBRARIES := libdl
LOCAL_MULTILIB := both
include $(BUILD_SHARED_LIBRARY)
@ -49,7 +49,7 @@ LOCAL_SRC_FILES:= $(NATIVE_BRIDGE2_COMMON_SRC_FILES)
LOCAL_CLANG := true
LOCAL_CFLAGS += -Werror -Wall
LOCAL_CPPFLAGS := -std=gnu++11 -fvisibility=protected
LOCAL_LDFLAGS := -ldl
LOCAL_SHARED_LIBRARIES := libdl
LOCAL_MULTILIB := both
include $(BUILD_SHARED_LIBRARY)

View File

@ -12,12 +12,11 @@ include $(CLEAR_VARS)
LOCAL_MODULE:= libnativeloader
LOCAL_SRC_FILES:= $(native_loader_common_src_files)
LOCAL_SHARED_LIBRARIES := libnativehelper liblog libcutils
LOCAL_SHARED_LIBRARIES := libnativehelper liblog libcutils libdl
LOCAL_STATIC_LIBRARIES := libbase
LOCAL_CLANG := true
LOCAL_CFLAGS := $(native_loader_common_cflags)
LOCAL_CPPFLAGS := -std=gnu++14 -fvisibility=hidden
LOCAL_LDFLAGS := -ldl
LOCAL_MULTILIB := both
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include

View File

@ -3,7 +3,6 @@ LOCAL_PATH:= $(call my-dir)
common_cflags := \
-Werror -Wno-unused-parameter -Wno-unused-const-variable \
-I$(LOCAL_PATH)/upstream-netbsd/include/ \
-include bsd-compatibility.h \
@ -21,6 +20,7 @@ LOCAL_SRC_FILES := \
upstream-netbsd/lib/libc/string/swab.c \
upstream-netbsd/lib/libutil/raise_default_signal.c
LOCAL_CFLAGS += $(common_cflags) -Dmain=dd_main -DNO_CONV
LOCAL_C_INCLUDES += $(LOCAL_PATH)/upstream-netbsd/include/
LOCAL_MODULE := libtoolbox_dd
include $(BUILD_STATIC_LIBRARY)
@ -49,6 +49,7 @@ LOCAL_SRC_FILES := \
$(patsubst %,%.c,$(OUR_TOOLS)) \
LOCAL_CFLAGS += $(common_cflags)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/upstream-netbsd/include/
LOCAL_CONLYFLAGS += -std=gnu99
LOCAL_SHARED_LIBRARIES := \
@ -95,6 +96,7 @@ $(INPUT_H_LABELS_H):
include $(CLEAR_VARS)
LOCAL_SRC_FILES := r.c
LOCAL_CFLAGS += $(common_cflags)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/upstream-netbsd/include/
LOCAL_MODULE := r
LOCAL_MODULE_TAGS := debug
include $(BUILD_EXECUTABLE)
@ -109,6 +111,7 @@ LOCAL_SRC_FILES := \
upstream-netbsd/usr.bin/grep/queue.c \
upstream-netbsd/usr.bin/grep/util.c
LOCAL_CFLAGS += $(common_cflags)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/upstream-netbsd/include/
LOCAL_MODULE := grep
LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,egrep fgrep,ln -sf grep $(TARGET_OUT)/bin/$(t);)
include $(BUILD_EXECUTABLE)