diff --git a/ChangeLog b/ChangeLog index e7fc70728..f92d8da3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-10-15 Vladimir Serbinenko + + Revert 2009-06-10 Pavel Roskin + + * configure.ac: Put checks for __bswapsi2 and __bswapdi2. + * include/grub/powerpc/libgcc.h: Don't use weak attribute for all + exports. + * include/grub/sparc64/libgcc.h: Likewise. Use + preprocessor conditionals. + 2009-10-14 Robert Millan * conf/common.rmk (grub-dumpbios): Remove rule. diff --git a/configure.ac b/configure.ac index 3e4da66c8..447f13fcc 100644 --- a/configure.ac +++ b/configure.ac @@ -417,6 +417,9 @@ fi CPPFLAGS="$TARGET_CPPFLAGS" LDFLAGS="$TARGET_LDFLAGS" +# Check for target functions. +AC_CHECK_FUNCS(__bswapsi2 __bswapdi2) + # Defined in aclocal.m4. grub_PROG_TARGET_CC if test "x$TARGET_APPLE_CC" != x1 ; then diff --git a/include/grub/powerpc/libgcc.h b/include/grub/powerpc/libgcc.h index ea4b073a0..0ff8964b7 100644 --- a/include/grub/powerpc/libgcc.h +++ b/include/grub/powerpc/libgcc.h @@ -16,9 +16,9 @@ * along with GRUB. If not, see . */ -void EXPORT_FUNC (memset) (void) __attribute__ ((weak)); -void EXPORT_FUNC (__ashldi3) (void) __attribute__ ((weak)); -void EXPORT_FUNC (__ashrdi3) (void) __attribute__ ((weak)); -void EXPORT_FUNC (__lshrdi3) (void) __attribute__ ((weak)); -void EXPORT_FUNC (__trampoline_setup) (void) __attribute__ ((weak)); -void EXPORT_FUNC (__ucmpdi2) (void) __attribute__ ((weak)); +void EXPORT_FUNC (memset) (void); +void EXPORT_FUNC (__ashldi3) (void); +void EXPORT_FUNC (__ashrdi3) (void); +void EXPORT_FUNC (__lshrdi3) (void); +void EXPORT_FUNC (__trampoline_setup) (void); +void EXPORT_FUNC (__ucmpdi2) (void); diff --git a/include/grub/sparc64/libgcc.h b/include/grub/sparc64/libgcc.h index 5d18c5c81..4a6b6194d 100644 --- a/include/grub/sparc64/libgcc.h +++ b/include/grub/sparc64/libgcc.h @@ -20,8 +20,12 @@ void EXPORT_FUNC (memset) (void); +#ifdef HAVE___BSWAPSI2 typedef int SItype __attribute__ ((mode (SI))); -SItype EXPORT_FUNC (__bswapsi2) (SItype) __attribute__ ((weak)); +SItype EXPORT_FUNC (__bswapsi2) (SItype); +#endif +#ifdef HAVE___BSWAPDI2 typedef int DItype __attribute__ ((mode (DI))); -DItype EXPORT_FUNC (__bswapdi2) (DItype) __attribute__ ((weak)); +DItype EXPORT_FUNC (__bswapdi2) (DItype); +#endif