All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Grégoire Sutre" <gregoire.sutre@labri.fr>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: [PATCH] Handling of TARGET_IMG_LDFLAGS_AC in configure (bug #28335)
Date: Wed, 30 Dec 2009 23:04:54 +0100	[thread overview]
Message-ID: <4B3BCE86.2050005@labri.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

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 
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 
311-314), the definition of TARGET_IMG_LDFLAGS_AC is now the same as the 
definition of TARGET_IMG_LDFLAGS.

Best regards,

Grégoire

[-- Attachment #2: ChangeLog-configure-LDFLAGS_AC --]
[-- Type: text/plain, Size: 263 bytes --]

2009-12-30 Gregoire Sutre  <gregoire.sutre@labri.fr>

	* 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.

[-- Attachment #3: patch-configure-LDFLAGS_AC --]
[-- Type: text/plain, Size: 1630 bytes --]

--- 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

             reply	other threads:[~2009-12-30 22:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-30 22:04 Grégoire Sutre [this message]
2009-12-31 11:48 ` [PATCH] Handling of TARGET_IMG_LDFLAGS_AC in configure (bug #28335) Vladimir 'φ-coder/phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B3BCE86.2050005@labri.fr \
    --to=gregoire.sutre@labri.fr \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.