From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NQ6fA-0006HJ-72 for mharc-grub-devel@gnu.org; Wed, 30 Dec 2009 17:05:04 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQ6f8-0006Fv-Gd for grub-devel@gnu.org; Wed, 30 Dec 2009 17:05:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQ6f3-0006EY-L4 for grub-devel@gnu.org; Wed, 30 Dec 2009 17:05:01 -0500 Received: from [199.232.76.173] (port=45766 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQ6f3-0006EV-Ez for grub-devel@gnu.org; Wed, 30 Dec 2009 17:04:57 -0500 Received: from iona.labri.fr ([147.210.8.143]:52211) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NQ6f3-0003kj-04 for grub-devel@gnu.org; Wed, 30 Dec 2009 17:04:57 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by iona.labri.fr (Postfix) with ESMTP id 5851F36B7A for ; Wed, 30 Dec 2009 23:04:55 +0100 (CET) X-Virus-Scanned: amavisd-new at labri.fr Received: from iona.labri.fr ([127.0.0.1]) by localhost (iona.labri.fr [127.0.0.1]) (amavisd-new, port 10027) with LMTP id E4TyjnKbKNSY for ; Wed, 30 Dec 2009 23:04:55 +0100 (CET) Received: from [192.168.1.108] (c2433-1-88-160-112-182.fbx.proxad.net [88.160.112.182]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by iona.labri.fr (Postfix) with ESMTP id 133B536B74 for ; Wed, 30 Dec 2009 23:04:55 +0100 (CET) Message-ID: <4B3BCE86.2050005@labri.fr> Date: Wed, 30 Dec 2009 23:04:54 +0100 From: =?ISO-8859-1?Q?Gr=E9goire_Sutre?= Organization: CNRS / LaBRI User-Agent: Thunderbird 2.0.0.23 (X11/20091027) MIME-Version: 1.0 To: The development of GRUB 2 Content-Type: multipart/mixed; boundary="------------030401060304070003020106" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [PATCH] Handling of TARGET_IMG_LDFLAGS_AC in configure (bug #28335) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2009 22:05:02 -0000 This is a multi-part message in MIME format. --------------030401060304070003020106 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hi, The following patch fixes bug report #28335. http://savannah.gnu.org/bugs/?28335 The definitions and uses of TARGET_IMG_LDFLAGS_AC have been changed so=20 that, in all cases, a number is supposed to be appended to it. In particular, in the case where a linker script if present (lines=20 311-314), the definition of TARGET_IMG_LDFLAGS_AC is now the same as the=20 definition of TARGET_IMG_LDFLAGS. Best regards, Gr=E9goire --------------030401060304070003020106 Content-Type: text/plain; name="ChangeLog-configure-LDFLAGS_AC" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ChangeLog-configure-LDFLAGS_AC" 2009-12-30 Gregoire Sutre * configure.ac: all definitions and uses of TARGET_IMG_LDFLAGS_AC now expect a number appended to it. * acinclude.m4 (grub_PROG_OBJCOPY_ABSOLUTE): ${TARGET_IMG_LDFLAGS_AC} expects a number appended to it. --------------030401060304070003020106 Content-Type: text/plain; name="patch-configure-LDFLAGS_AC" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-configure-LDFLAGS_AC" --- acinclude.m4.orig 2009-12-30 22:05:08.000000000 +0100 +++ acinclude.m4 2009-12-30 21:56:05.000000000 +0100 @@ -93,7 +93,7 @@ fi grub_cv_prog_objcopy_absolute=yes for link_addr in 0x2000 0x8000 0x7C00; do - if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib ${TARGET_IMG_LDFLAGS_AC} -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec]); then : + if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib ${TARGET_IMG_LDFLAGS_AC}$link_addr conftest.o -o conftest.exec]); then : else AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr]) fi --- configure.ac.orig 2009-12-30 22:34:06.000000000 +0100 +++ configure.ac 2009-12-30 22:37:04.000000000 +0100 @@ -311,7 +311,7 @@ if test -f "${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"; then TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc" TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT} -Wl,-Ttext," - TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc" + TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc -Wl,-Ttext," else TARGET_IMG_LDSCRIPT= TARGET_IMG_LDFLAGS='-Wl,-N -Wl,-Ttext,' @@ -446,7 +446,7 @@ if test "x$target_cpu" = xi386; then if test ! -z "$TARGET_IMG_LDSCRIPT"; then # Check symbols provided by linker script. - CFLAGS="$TARGET_CFLAGS -nostdlib $TARGET_IMG_LDFLAGS_AC -Wl,-Ttext,8000,--defsym,___main=0x8100" + CFLAGS="$TARGET_CFLAGS -nostdlib ${TARGET_IMG_LDFLAGS_AC}8000,--defsym,___main=0x8100" fi if test "x$TARGET_APPLE_CC" != x1 ; then grub_CHECK_BSS_START_SYMBOL --------------030401060304070003020106--