lib/gdb.exp (gdb_compile_shlib): Add support for clang.
authorDoug Evans <dje@google.com>
Wed, 27 Aug 2014 16:40:21 +0000 (09:40 -0700)
committerDoug Evans <dje@google.com>
Wed, 27 Aug 2014 16:40:21 +0000 (09:40 -0700)
gdb/testsuite/ChangeLog:

* lib/gdb.exp (gdb_compile_shlib): Add support for clang.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb.exp

index cac42103c99d76d6ed5222655884153406129b4a..4a65fef02e7e5776559567323793696455f35c4d 100644 (file)
@@ -1,3 +1,7 @@
+2014-08-27  Doug Evans  <dje@google.com>
+
+       * lib/gdb.exp (gdb_compile_shlib): Add support for clang.
+
 2014-08-25  Doug Evans  <dje@google.com>
 
        * gdb.mi/basics.c (callee3, callee2, callee1): Specify result type.
index 61e1614bdd63848b30564a7412da1f904d408503..1019ecda255182f92dc6bae7f078686f314fee70 100644 (file)
@@ -2947,6 +2947,12 @@ proc gdb_compile_shlib {sources dest options} {
         "xlc-*" {
             lappend obj_options "additional_flags=-qpic"
         }
+       "clang-*" {
+           if { !([istarget "*-*-cygwin*"]
+                  || [istarget "*-*-mingw*"]) } {
+               lappend obj_options "additional_flags=-fpic"
+           }
+       }
         "gcc-*" {
             if { !([istarget "powerpc*-*-aix*"]
                    || [istarget "rs6000*-*-aix*"]