From 2ec14f5a52d28eded07ddd015a188f8e691227d7 Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Wed, 11 Jul 2018 16:46:54 +0100 Subject: COMPMID-1246: Disable -pie and -static-libstdc++ when compiling with clang Remove the following warning: clang50++: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument] Change-Id: Ifdd53d5cc48542e8bd6b9728c5fdc519ab2c9f06 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/139619 Tested-by: Jenkins Reviewed-by: Pablo Tello --- SConstruct | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index ccc92168e9..d386d978da 100644 --- a/SConstruct +++ b/SConstruct @@ -195,14 +195,16 @@ if not GetOption("help"): if env['standalone']: env.Append(CXXFLAGS = ['-fPIC']) - env.Append(LINKFLAGS = ['-static-libgcc','-static-libstdc++']) + if 'clang++' not in cpp_compiler: + env.Append(LINKFLAGS = ['-static-libgcc','-static-libstdc++']) if env['Werror']: env.Append(CXXFLAGS = ['-Werror']) if env['os'] == 'android': env.Append(CPPDEFINES = ['ANDROID']) - env.Append(LINKFLAGS = ['-pie', '-static-libstdc++']) + if 'clang++' not in cpp_compiler: + env.Append(LINKFLAGS = ['-pie', '-static-libstdc++']) elif env['os'] == 'bare_metal': env.Append(LINKFLAGS = ['-static']) env.Append(LINKFLAGS = ['-specs=rdimon.specs']) -- cgit v1.2.1