From: Doug Evans Date: Wed, 27 Aug 2014 16:40:21 +0000 (-0700) Subject: lib/gdb.exp (gdb_compile_shlib): Add support for clang. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ee92b0dd4e4abc5063f689a084c27ee7d5b08942;p=binutils-gdb.git lib/gdb.exp (gdb_compile_shlib): Add support for clang. gdb/testsuite/ChangeLog: * lib/gdb.exp (gdb_compile_shlib): Add support for clang. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index cac42103c99..4a65fef02e7 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2014-08-27 Doug Evans + + * lib/gdb.exp (gdb_compile_shlib): Add support for clang. + 2014-08-25 Doug Evans * gdb.mi/basics.c (callee3, callee2, callee1): Specify result type. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 61e1614bdd6..1019ecda255 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -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*"]