Bean wrote:
...
diff -u -p -r1.7 aclocal.m4
--- aclocal.m4  25 Nov 2007 02:01:30 -0000      1.7
+++ aclocal.m4  14 Dec 2007 11:51:14 -0000
@@ -57,7 +57,7 @@ else
 fi
 grub_cv_prog_objcopy_absolute=yes
 for link_addr in 2000 8000 7C00; do
-  if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} ${LDFLAGS} -nostdlib -Wl,-N
-Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec]); then :
+  if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-T
"-Wl,${srcdir}/ldscript" -Wl,-Ttext -Wl,$link_addr conftest.o -o
conftest.exec]); then :

Selecting the builtin "-N" script first has no effect if a custom script is specified later. Therefore, "-Wl,-N" is IMO no longer necessary.


Pavel Roskin wrote:
...
We may want to use architecture specific ld scripts, but that can be corrected in further patches.

See "[PATCH] Build on Cygwin" for a working example on how to select a platform specific linker script in configure.ac. This can be easily extended, e.g. test more specific scripts first:

 for f in \
   ${target_cpu}-${platform}-${target_os} \
   ${target_cpu}-${platform} \
   ${target_cpu}; do
   if test -f "${srcdir}/conf/$f-img-ld.sc"; then ...


Christian



_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to