IOT-1656: Removing -fPIC compiler option for unsupported builds.
authorPawel Winogrodzki <pawelwi@microsoft.com>
Thu, 8 Dec 2016 03:16:13 +0000 (19:16 -0800)
committerKevin Kane <kkane@microsoft.com>
Tue, 13 Dec 2016 21:29:13 +0000 (21:29 +0000)
One extlibs/mbedtls/SConscript was passing -fPIC for all compilers,
even the ones, which didn't support it.

Change-Id: Ib946da6f73d3e811e05b8b92bc5315e95a5a3d67
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15295
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
extlibs/mbedtls/SConscript

index b8b9cca..7e2133d 100644 (file)
@@ -75,7 +75,10 @@ os.chdir(start_dir)
 mbedtls_env = env.Clone()
 mbedtls_env.PrependUnique(CPPPATH = [mbedtls_dir])
 mbedtls_env.AppendUnique(CPPPATH = [mbedtls_dir+'include/'])
-mbedtls_env.AppendUnique(CFLAGS = ['-fPIC', '-Wall'])
+mbedtls_env.AppendUnique(CFLAGS = ['-Wall'])
+
+if mbedtls_env['CC'] != 'cl':
+    mbedtls_env.AppendUnique(CFLAGS = ['-fPIC'])
 
 ######################################################################
 # Source files and Target(s)