Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Cleanup: pass "-pie" only to the linker
@ 2012-01-13 17:02 Paul Pluzhnikov
  2012-01-13 18:42 ` Jan Kratochvil
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Pluzhnikov @ 2012-01-13 17:02 UTC (permalink / raw)
  To: gdb-patches; +Cc: ppluzhnikov

Greetings,

When testing GDB with Clang, several compilations fail due to a warning:

  clang -fPIE -pie -c gdb.base/attach-pie-misread.c ...
  clang: warning: argument unused during compilation: '-pie'

(the test harness considers any STDERR output as a failed compilation).

Here is a fix.

Thanks,

--
Paul Pluzhnikov

testsuite/ChangeLog:

2012-01-13  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* gdb.base/attach-pie-misread.exp: Pass -pie only to the linker.
	* gdb.base/pie-execl.exp: Likewise.


Index: testsuite/gdb.base/attach-pie-misread.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/attach-pie-misread.exp,v
retrieving revision 1.5
diff -u -p -r1.5 attach-pie-misread.exp
--- testsuite/gdb.base/attach-pie-misread.exp	4 Jan 2012 08:17:45 -0000	1.5
+++ testsuite/gdb.base/attach-pie-misread.exp	13 Jan 2012 16:48:21 -0000
@@ -27,7 +27,7 @@ set genfile ${objdir}/${subdir}/${test}-
 set executable ${test}
 set binfile ${objdir}/${subdir}/${executable}
 
-if {[build_executable_own_libs ${test}.exp $executable $srcfile [list "additional_flags=-fPIE -pie"]] == ""} {
+if {[build_executable_own_libs ${test}.exp $executable $srcfile [list "additional_flags=-fPIE" "ldflags=-pie"]] == ""} {
     return -1
 }
 
@@ -97,7 +97,7 @@ if {$result == 0} {
     fail $test
 }
 
-set prelink_args [build_executable_own_libs ${test}.exp $executable $srcfile [list "additional_flags=-fPIE -pie -DGEN=\"$genfile\""]]
+set prelink_args [build_executable_own_libs ${test}.exp $executable $srcfile [list "additional_flags=-fPIE -DGEN=\"$genfile\"" "ldflags=-pie"]]
 if {$prelink_args == ""} {
     return -1
 }
Index: testsuite/gdb.base/pie-execl.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/pie-execl.exp,v
retrieving revision 1.4
diff -u -p -r1.4 pie-execl.exp
--- testsuite/gdb.base/pie-execl.exp	4 Jan 2012 08:17:46 -0000	1.4
+++ testsuite/gdb.base/pie-execl.exp	13 Jan 2012 16:48:21 -0000
@@ -37,7 +37,7 @@ set binfile2_test_msg OBJDIR/${subdir}/$
 # Use conditional compilation according to `BIN' as GDB remembers the source
 # file name of the breakpoint.
 
-set opts [list debug {additional_flags=-fPIE -pie}]
+set opts [list debug {"additional_flags=-fPIE" "ldflags=-pie"}]
 if {[build_executable ${testfile}.exp $executable1 $srcfile [concat $opts {additional_flags=-DBIN=1}]] == ""
     || [build_executable ${testfile}.exp $executable2 $srcfile [concat $opts {additional_flags=-DBIN=2}]] == ""} {
     return -1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-13 18:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-13 17:02 [patch] Cleanup: pass "-pie" only to the linker Paul Pluzhnikov
2012-01-13 18:42 ` Jan Kratochvil
2012-01-13 19:59   ` Paul Pluzhnikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox