From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14087 invoked by alias); 6 Jan 2010 15:06:24 -0000 Received: (qmail 14065 invoked by uid 22791); 6 Jan 2010 15:06:23 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Jan 2010 15:06:19 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o06F6IR3025740 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 6 Jan 2010 10:06:18 -0500 Received: from zebedee.pink (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o06F6GeP005230; Wed, 6 Jan 2010 10:06:17 -0500 Message-ID: <4B44A6E8.2070300@redhat.com> Date: Wed, 06 Jan 2010 15:06:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0 MIME-Version: 1.0 To: GCC Patches CC: java@gcc.gnu.org Subject: Patch: move lang_specific_driver after setup of cc_libexec_prefix Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2010-01/txt/msg00014.txt.bz2 gcj is not relocatable because the libexec prefix is set *after* lang_specific_driver is called. Unfortunately, lang_specific_driver needs to know the libexec prefix to pass it to ecj1. I can't see any reason why lang_specific_driver needs to be called before the libexec prefix is set, and it doesn't seem to break anything. Fixed thusly, bootstrapped x86_64 GNU/Linux. OK? Andrew. 2010-01-06 Andrew Haley * gcc.c (process_command): Move lang_specific_driver before setting cc_libexec_prefix. Index: gcc/gcc.c =================================================================== --- gcc/gcc.c (revision 155475) +++ gcc/gcc.c (working copy) @@ -3599,12 +3599,6 @@ CONST_CAST2 (const char *const **, const char ***, &argv)); - /* Do language-specific adjustment/addition of flags. */ - lang_specific_driver (&argc, - CONST_CAST2 (const char *const **, const char ***, - &argv), - &added_libraries); - /* Handle any -no-canonical-prefixes flag early, to assign the function that builds relative prefixes. This function creates default search paths that are needed later in normal option handling. */ @@ -3660,6 +3654,12 @@ is relocated. The toolchain was either relocated using GCC_EXEC_PREFIX or an automatically created GCC_EXEC_PREFIX from argv[0]. */ + /* Do language-specific adjustment/addition of flags. */ + lang_specific_driver (&argc, + CONST_CAST2 (const char *const **, const char ***, + &argv), + &added_libraries); + if (gcc_exec_prefix) { int len = strlen (gcc_exec_prefix);