From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24044 invoked by alias); 13 Jan 2012 16:55:23 -0000 Received: (qmail 24022 invoked by uid 22791); 13 Jan 2012 16:55:20 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-ee0-f73.google.com (HELO mail-ee0-f73.google.com) (74.125.83.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 13 Jan 2012 16:55:06 +0000 Received: by eekc1 with SMTP id c1so80177eek.0 for ; Fri, 13 Jan 2012 08:55:04 -0800 (PST) Received: by 10.213.3.136 with SMTP id 8mr223159ebn.11.1326473704300; Fri, 13 Jan 2012 08:55:04 -0800 (PST) Received: by 10.213.3.136 with SMTP id 8mr223150ebn.11.1326473704012; Fri, 13 Jan 2012 08:55:04 -0800 (PST) Received: from hpza9.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id u2si1577522eeb.2.2012.01.13.08.55.04 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 13 Jan 2012 08:55:04 -0800 (PST) Received: from elbrus2.mtv.corp.google.com (elbrus2.mtv.corp.google.com [172.18.111.111]) by hpza9.eem.corp.google.com (Postfix) with ESMTP id CC0E75C0064; Fri, 13 Jan 2012 08:55:03 -0800 (PST) Received: by elbrus2.mtv.corp.google.com (Postfix, from userid 74925) id 02937190B08; Fri, 13 Jan 2012 08:55:02 -0800 (PST) To: gdb-patches@sourceware.org Cc: ppluzhnikov@google.com Subject: [patch] Cleanup: pass "-pie" only to the linker Message-Id: <20120113165503.02937190B08@elbrus2.mtv.corp.google.com> Date: Fri, 13 Jan 2012 17:02:00 -0000 From: ppluzhnikov@google.com (Paul Pluzhnikov) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00485.txt.bz2 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 * 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