From 2258347f3bb770641a7d8fe311911ace8f69cb20 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 17 Oct 2013 13:06:20 -0700 Subject: [PATCH] Build the linker with the same -std flags as the rest of bionic. Change-Id: I5bdb28ecfdf78a90f6b072077a1c5ffd63f5d2ae --- linker/Android.mk | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/linker/Android.mk b/linker/Android.mk index e52ab709d..2bd8c3054 100644 --- a/linker/Android.mk +++ b/linker/Android.mk @@ -18,10 +18,17 @@ LOCAL_SRC_FILES:= \ LOCAL_LDFLAGS := -shared -Wl,--exclude-libs,ALL -LOCAL_CFLAGS += -fno-stack-protector \ - -Wstrict-overflow=5 \ - -fvisibility=hidden \ - -Wall -Wextra -Werror \ +LOCAL_CFLAGS += \ + -fno-stack-protector \ + -Wstrict-overflow=5 \ + -fvisibility=hidden \ + -Wall -Wextra -Werror \ + +LOCAL_CONLYFLAGS += \ + -std=gnu99 \ + +LOCAL_CPPFLAGS += \ + -std=gnu++11 \ # We need to access Bionic private headers in the linker. LOCAL_CFLAGS += -I$(LOCAL_PATH)/../libc/