Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1ME9YB-0007E4-MU for mharc-grub-devel@gnu.org; Tue, 09 Jun 2009 18:12:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ME9YA-000797-1l for grub-devel@gnu.org; Tue, 09 Jun 2009 18:12:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ME9Y5-0006uS-Ts for grub-devel@gnu.org; Tue, 09 Jun 2009 18:12:09 -0400 Received: from [199.232.76.173] (port=51415 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ME9Y5-0006u9-KM for grub-devel@gnu.org; Tue, 09 Jun 2009 18:12:05 -0400 Received: from c60.cesmail.net ([216.154.195.49]:47979) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1ME9Y5-0002BG-9E for grub-devel@gnu.org; Tue, 09 Jun 2009 18:12:05 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 09 Jun 2009 18:12:04 -0400 Received: from mj.roinet.com (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 15AE834C6A for ; Tue, 9 Jun 2009 18:16:19 -0400 (EDT) From: Pavel Roskin To: grub-devel@gnu.org Date: Tue, 09 Jun 2009 18:12:03 -0400 Message-ID: <20090609221203.30586.29218.stgit@mj.roinet.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [PATCH 1/2] Don't use AC_CHECK_FUNCS for the target, it requires target libc headers X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 22:12:10 -0000 ChangeLog: configure.ac: Remove check for __bswapsi2 and __bswapdi2. include/grub/powerpc/libgcc.h: Use weak attribute for all exports. include/grub/sparc64/libgcc.h: Likewise. Don't use preprocessor conditionals. --- configure.ac | 3 --- include/grub/powerpc/libgcc.h | 10 +++++----- include/grub/sparc64/libgcc.h | 8 ++------ 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index e448c2f..8ece359 100644 --- a/configure.ac +++ b/configure.ac @@ -409,9 +409,6 @@ CFLAGS="$TARGET_CFLAGS" 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 acdd146..bed9377 100644 --- a/include/grub/powerpc/libgcc.h +++ b/include/grub/powerpc/libgcc.h @@ -16,8 +16,8 @@ * along with GRUB. If not, see . */ -void EXPORT_FUNC (memset) (void); -void EXPORT_FUNC (__ashldi3) (void); -void EXPORT_FUNC (__lshrdi3) (void); -void EXPORT_FUNC (__trampoline_setup) (void); -void EXPORT_FUNC (__ucmpdi2) (void); +void EXPORT_FUNC (memset) (void) __attribute__ ((weak)); +void EXPORT_FUNC (__ashldi3) (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)); diff --git a/include/grub/sparc64/libgcc.h b/include/grub/sparc64/libgcc.h index 4a6b619..5d18c5c 100644 --- a/include/grub/sparc64/libgcc.h +++ b/include/grub/sparc64/libgcc.h @@ -20,12 +20,8 @@ void EXPORT_FUNC (memset) (void); -#ifdef HAVE___BSWAPSI2 typedef int SItype __attribute__ ((mode (SI))); -SItype EXPORT_FUNC (__bswapsi2) (SItype); -#endif +SItype EXPORT_FUNC (__bswapsi2) (SItype) __attribute__ ((weak)); -#ifdef HAVE___BSWAPDI2 typedef int DItype __attribute__ ((mode (DI))); -DItype EXPORT_FUNC (__bswapdi2) (DItype); -#endif +DItype EXPORT_FUNC (__bswapdi2) (DItype) __attribute__ ((weak));