From patchwork Fri Jun 17 02:21:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: : Pass -no_pie on SYSTEMSPEC for darwin11 From: Jack Howarth X-Patchwork-Id: 100754 Message-Id: <20110617022132.GA18745@bromo.med.uc.edu> To: gcc-patches@gcc.gnu.org Cc: mikestump@comcast.net, iains@gcc.gnu.org Date: Thu, 16 Jun 2011 22:21:32 -0400 The gcj compiler needs to pass -no_pie for linkage on darwin11 due to the new -pie default of the linker. The attached patch accomplishes this by passing -no_pie on SYSTEMSPEC for *-*-darwin[12]*. Since Darwin10 supports -no_pie in its linker, I included it in the triplet match to simplify the syntax. Bootstrap and tested on x86_64-apple-darwin11. Okay for gcc trunk? Jack 2011-06-16 Jack Howarth * libjava/configure.ac (SYSTEMSPEC): Pass -no_pie for darwin11. * libjava/configure: Regenerate. Index: libjava/configure.ac =================================================================== --- libjava/configure.ac (revision 175131) +++ libjava/configure.ac (working copy) @@ -898,9 +898,12 @@ case "${host}" in SYSTEMSPEC="-lunicows $SYSTEMSPEC" fi ;; - *-*-darwin[[912]]*) + *-*-darwin9*) SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" ;; + *-*-darwin[[12]]*) + SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" + ;; *) SYSTEMSPEC= ;;