This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add clang support to gdb_compile_shlib


Doug Evans writes:
 > Hi.
 > 
 > This patch fixes several more failures in the testsuite when run with clang.
 > 
 > gdb.base/
 > pending.exp
 > fixsection.exp
 > shlib-call.exp
 > shreloc.exp
 > solib-display.exp
 > solib-nodir.exp
 > solib-search.exp
 > solib-symbol.exp
 > 
 > 2014-08-25  Doug Evans  <dje@google.com>
 > 
 > 	* lib/gdb.exp (gdb_compile_shlib): Add support for clang.
 > 
 > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
 > index 61e1614..fc9b1df 100644
 > --- a/gdb/testsuite/lib/gdb.exp
 > +++ b/gdb/testsuite/lib/gdb.exp
 > @@ -2947,6 +2947,9 @@ proc gdb_compile_shlib {sources dest options} {
 >          "xlc-*" {
 >              lappend obj_options "additional_flags=-qpic"
 >          }
 > +	"clang-*" {
 > +	    lappend obj_options "additional_flags=-fpic"
 > +	}
 >          "gcc-*" {
 >              if { !([istarget "powerpc*-*-aix*"]
 >                     || [istarget "rs6000*-*-aix*"]

Hi.

A colleague checked windows and got warnings that -fpic is a no-op,
so I've pushed this patch.

[I debated combining clang with gcc, I can go either way.
If it's important to people at this particular point in time
I'm happy to do so.]

2014-08-27  Doug Evans  <dje@google.com>

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

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 61e1614..1019ecd 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*"]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]