Handling of TARGET_IMG_LDFLAGS_AC in configure (bug #28335)
PATCH 1/1 Handling of TARGET_IMG_LDFLAGS_AC in configure (bug #28335)
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
2009-12-30 Gregoire Sutre <[email protected]>
* 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.
acinclude.m4 renamed from acinclude.m4.orig +1 -1
@@ -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 renamed from configure.ac.orig +2 -2
@@ -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
Quoted 4 lines · Grégoire Sutre
Hi,
The following patch fixes bug report #28335.
Quoted 8 lines
http://savannah.gnu.org/bugs/?28335
The definitions and uses of
TARGET_IMG_LDFLAGS_AChave 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_ACis now the same as the definition ofTARGET_IMG_LDFLAGS.
Can anybody test the patch on cygwin and with Apple's toolchain?
Quoted 10 lines
Best regards,
Grégoire
------------------------------------------------------------------------_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko