[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #28335] [configure.ac] link error due to bad -Wl options
From: |
Grégoire Sutre |
Subject: |
[bug #28335] [configure.ac] link error due to bad -Wl options |
Date: |
Sun, 20 Dec 2009 15:49:17 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.9.1.4) Gecko/20091029 Browser/3.5.4 |
Follow-up Comment #2, bug #28335 (project grub):
No, this patch does not fix the problem I reported, configure stops with the
same error (see below).
I believe that this error is triggered in the macro
grub_PROG_OBJCOPY_ABSOLUTE, which is called before the line that is changed in
the proposed patch. This macro is defined in acinclude.m4. The following
patch works on my system.
--- acinclude.m4.orig 2009-12-20 16:41:28.000000000 +0100
+++ acinclude.m4
@@ -93,7 +93,7 @@ else
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
-------------------------------------------------------------
End of configure:
checking whether objcopy works for absolute addresses... configure: error: cc
cannot link at address 0x2000
*** Error code 1
In config.log:
configure:10662: checking whether objcopy works for absolute addresses
configure:10676: cc -c -DGRUB_MACHINE_PCBIOS=1 -m32 -fno-stack-protector
-mno-stack-arg-probe -Werror -nostdlib -Wl,--defsym,___main=0x8100 conftest.c
>&5
configure:10679: $? = 0
configure:10687: cc -DGRUB_MACHINE_PCBIOS=1 -m32 -fno-stack-protector
-mno-stack-arg-probe -Werror -nostdlib -Wl,--defsym,___main=0x8100 -nostdlib
-Wl,-N -Wl,-Ttext, -Wl,-Ttext -Wl,0x2000 conftest.o -o conftest.exec
/usr/bin/ld: invalid hex number `-Ttext'
collect2: ld returned 1 exit status
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?28335>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/