* INSTALL: Document cross-compilation.

* acinclude.m4: Determine whether nm support -P and --defined-only.
	* configure.ac: Add TARGET_ to all variables pertaining to target
	that don't have it yet.
	* gentpl.py: Likewise.
	* grub-core/Makefile.am: Likewise.
	* grub-core/genmod.sh.in: Likewise.
	* grub-core/gensyminfo.sh.in: Handle OpenBSD and other non-GNU nm
	as well.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-08-22 01:56:28 +02:00
parent ca1fb56345
commit fc97214f7e
8 changed files with 187 additions and 37 deletions

View file

@ -37,7 +37,7 @@ rm -f $tmpfile $outfile
if test x@TARGET_APPLE_CC@ != x1; then
# stripout .modname and .moddeps sections from input module
@OBJCOPY@ -R .modname -R .moddeps $infile $tmpfile
@TARGET_OBJCOPY@ -R .modname -R .moddeps $infile $tmpfile
# Attach .modname and .moddeps sections
t1=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
@ -47,9 +47,9 @@ if test x@TARGET_APPLE_CC@ != x1; then
for dep in $deps; do printf "$dep\0" >> $t2; done
if test -n "$deps"; then
@OBJCOPY@ --add-section .modname=$t1 --add-section .moddeps=$t2 $tmpfile
@TARGET_OBJCOPY@ --add-section .modname=$t1 --add-section .moddeps=$t2 $tmpfile
else
@OBJCOPY@ --add-section .modname=$t1 $tmpfile
@TARGET_OBJCOPY@ --add-section .modname=$t1 $tmpfile
fi
rm -f $t1 $t2
@ -57,7 +57,7 @@ if test x@TARGET_APPLE_CC@ != x1; then
./${TARGET_OBJ2ELF} $tmpfile || exit 1
fi
if test x@platform@ != xemu; then
@STRIP@ --strip-unneeded \
@TARGET_STRIP@ --strip-unneeded \
-K grub_mod_init -K grub_mod_fini \
-K _grub_mod_init -K _grub_mod_fini \
-R .note.gnu.gold-version -R .note.GNU-stack \
@ -87,7 +87,7 @@ else
mv $tmpfile2 $tmpfile
cp $tmpfile $tmpfile.bin
@OBJCONV@ -f@TARGET_MODULE_FORMAT@ \
@TARGET_OBJCONV@ -f@TARGET_MODULE_FORMAT@ \
-nr:_grub_mod_init:grub_mod_init \
-nr:_grub_mod_fini:grub_mod_fini \
-wd1106 -nu -nd $tmpfile.bin $tmpfile || exit 1