* 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

@ -22,14 +22,13 @@ module=$1
modname=`echo $module | sed -e 's@\.module.*$@@'`
# Print all symbols defined by module
if test x@TARGET_APPLE_CC@ = x1; then
@NM@ -g -P -p $module | \
grep -E '^[a-zA-Z0-9_]* [TDS]' | \
sed "s@^\([^ ]*\).*@defined $modname \1@g"
if test x"@TARGET_NMFLAGS_DEFINED_ONLY@" = x; then
@TARGET_NM@ -g @TARGET_NMFLAGS_MINUS_P@ -p $module | \
sed -n "s@^\([0-9a-fA-F]*\) *[TBRDS] *\([^ ]*\).*@defined $modname \2@p"
else
@NM@ -g --defined-only -P -p $module | \
@TARGET_NM@ -g --defined-only @TARGET_NMFLAGS_MINUS_P@ -p $module | \
sed "s@^\([^ ]*\).*@defined $modname \1@g"
fi
# Print all undefined symbols used by module
@NM@ -u -P -p $module | sed "s@^\([^ ]*\).*@undefined $modname \1@g"
@TARGET_NM@ -u @TARGET_NMFLAGS_MINUS_P@ -p $module | sed "s@^\([^ ]*\).*@undefined $modname \1@g"