Make XZ compression parameters dependent on target and not host CPU.

* configure.ac: Define GRUB_TARGET_CPU_XYZ series.
	* grub-core/lib/xzembed/xz_config.h: Use GRUB_TARGET_CPU_XYZ.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-01-18 13:59:03 +01:00
parent 22489834b3
commit 3ec0fc1c3b
3 changed files with 14 additions and 7 deletions

View file

@ -1,3 +1,10 @@
2012-01-18 Vladimir Serbinenko <phcoder@gmail.com>
Make XZ compression parameters dependent on target and not host CPU.
* configure.ac: Define GRUB_TARGET_CPU_XYZ series.
* grub-core/lib/xzembed/xz_config.h: Use GRUB_TARGET_CPU_XYZ.
2012-01-18 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/powerpc/dl.c (grub_arch_dl_get_tramp_got_size): Remove

View file

@ -177,7 +177,7 @@ esac
if test x${target_cpu} = xmipsel ; then
machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo mips_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
else
machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo ${target_cpu}_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo ${target_cpu}_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,` -DGRUB_TARGET_CPU_`echo ${target_cpu} | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`=1"
fi
HOST_CPPFLAGS="$HOST_CPPFLAGS $machine_CPPFLAGS"

View file

@ -26,27 +26,27 @@
/* Enable BCJ filter decoders. */
#if defined(__i386__) || defined(__x86_64__)
#if defined(GRUB_TARGET_CPU_I386) || defined(GRUB_TARGET_CPU_X86_64)
#define XZ_DEC_X86
#endif
#ifdef __powerpc__
#ifdef GRUB_TARGET_CPU_POWERPC
#define XZ_DEC_POWERPC
#endif
#ifdef __ia64__
#ifdef GRUB_TARGET_CPU_IA64
#define XZ_DEC_IA64
#endif
#ifdef __arm__
#ifdef GRUB_TARGET_CPU_ARM
#define XZ_DEC_ARM
#endif
#ifdef __thumb__
#if 0
#define XZ_DEC_ARMTHUMB
#endif
#ifdef __sparc__
#ifdef GRUB_TARGET_CPU_SPARC
#define XZ_DEC_SPARC
#endif