This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH, PE] Don't pass -fpic to gcc.
- From: Pedro Alves <pedro_alves at portugalmail dot pt>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Date: Thu, 21 Dec 2006 22:09:32 +0000
- Subject: [PATCH, PE] Don't pass -fpic to gcc.
Hi all,
PE targets ignore -fpic, since they are always pic. This patch makes
gdb_compile_shlib not add
-fpic to PE targets. There are a few fails in cygwin caused by the
warning cygwin gcc emits when
-fpic is passed.
"warning: -fpic ignored for target (all code is position independent)"
Please review and commit.
Cheers,
Pedro Alves
gdb/testsuite/
2006-12-21 Pedro Alves <pedro_alves@portugalmail.pt>
* gdb.base/lib/gdb.exp: Don't pass -fpic to gcc on Cygwin, MinGW
and generic PE targets.
Index: testsuite/lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.72
diff -u -p -r1.72 gdb.exp
--- testsuite/lib/gdb.exp 10 Nov 2006 16:58:53 -0000 1.72
+++ testsuite/lib/gdb.exp 21 Dec 2006 22:00:14 -0000
@@ -1575,7 +1575,10 @@ proc gdb_compile_shlib {sources dest opt
}
"gcc-*" {
if { !([istarget "powerpc*-*-aix*"]
- || [istarget "rs6000*-*-aix*"]) } {
+ || [istarget "rs6000*-*-aix*"]
+ || [istarget "*-*-cygwin*"]
+ || [istarget "*-*-mingw*"]
+ || [istarget "*-*-pe*"]) } {
lappend obj_options "additional_flags=-fpic"
}
}