From e92d25f296af266ebf15bafcc599a91f1f87bd38 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 17 Sep 2015 15:04:54 -0700 Subject: [PATCH] Don't re-export libgcc symbols from every object. Target modules shouldn't re-export libgcc.a because we don't want other binaries importing them when they should be getting their own copy of the builtins. Bug: http://b/24166967 Change-Id: Iaa208933885375da4a8e1b8935f76e9f3ea0647f --- core/config.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/config.mk b/core/config.mk index e7a1d2020a..3477ec870d 100644 --- a/core/config.mk +++ b/core/config.mk @@ -586,6 +586,11 @@ HOST_GLOBAL_CPPFLAGS += $(HOST_RELEASE_CPPFLAGS) TARGET_GLOBAL_CFLAGS += $(TARGET_RELEASE_CFLAGS) TARGET_GLOBAL_CPPFLAGS += $(TARGET_RELEASE_CPPFLAGS) +# Target modules shouldn't re-export libgcc.a because we don't want other +# binaries importing them when they should be getting their own copy of the +# builtins. +TARGET_GLOBAL_LDFLAGS += -Wl,--exclude-libs,libgcc.a + ifdef TARGET_2ND_ARCH $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_CFLAGS += $(COMMON_GLOBAL_CFLAGS) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_RELEASE_CFLAGS += $(COMMON_RELEASE_CFLAGS)