Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XUNLb-0007ER-0t for mharc-grub-devel@gnu.org; Wed, 17 Sep 2014 18:05:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUNLT-00079q-8P for grub-devel@gnu.org; Wed, 17 Sep 2014 18:05:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUNLM-00022i-R7 for grub-devel@gnu.org; Wed, 17 Sep 2014 18:05:03 -0400 Received: from e24smtp02.br.ibm.com ([32.104.18.86]:56469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUNLM-00022H-GK for grub-devel@gnu.org; Wed, 17 Sep 2014 18:04:56 -0400 Received: from /spool/local by e24smtp02.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 17 Sep 2014 19:04:50 -0300 Received: from d24dlp02.br.ibm.com (9.18.248.206) by e24smtp02.br.ibm.com (10.172.0.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 17 Sep 2014 19:04:49 -0300 Received: from d24relay03.br.ibm.com (d24relay03.br.ibm.com [9.13.184.25]) by d24dlp02.br.ibm.com (Postfix) with ESMTP id 4C6D41DC0027 for ; Wed, 17 Sep 2014 18:04:47 -0400 (EDT) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.8.31.93]) by d24relay03.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s8HM3pBv22282318 for ; Wed, 17 Sep 2014 19:03:52 -0300 Received: from d24av02.br.ibm.com (localhost [127.0.0.1]) by d24av02.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s8HM4lJV023528 for ; Wed, 17 Sep 2014 19:04:47 -0300 Received: from beren.chocolate ([9.78.142.247]) by d24av02.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s8HM4jBD023473 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 17 Sep 2014 19:04:47 -0300 Date: Wed, 17 Sep 2014 19:04:44 -0300 From: Paulo Flabiano Smorigo To: grub-devel@gnu.org Subject: Re: [RFC PATCH 1/3] Add powerpc little-endian (ppc64le) flags Message-ID: <20140917220444.GA8777@beren.chocolate> References: <1409255765-3209-1-git-send-email-pfsmorigo@linux.vnet.ibm.com> <1409255765-3209-2-git-send-email-pfsmorigo@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline In-Reply-To: <1409255765-3209-2-git-send-email-pfsmorigo@linux.vnet.ibm.com> User-Agent: Mutt/1.5.22.1 (2013-10-16) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14091722-0005-0000-0000-0000008AD6EE X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 32.104.18.86 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2014 22:05:10 -0000 --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Thu, Aug 28, 2014 at 04:56:03PM -0300, Paulo Flabiano Smorigo wrote: > libgcc dependency was removed *just* for this target because > the distros that use ppc64el doesn't have 32-bit support on it. > > * configure.ac: Add targets for powerpc64el and skip libgcc. > * Makefile.am: Likewise. > --- > configure.ac | 17 +++++++++++++++-- > grub-core/Makefile.am | 2 ++ > 2 files changed, 17 insertions(+), 2 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 8888c2f..1364c8b 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -119,6 +119,7 @@ if test "x$with_platform" = x; then > x86_64-*) platform=pc ;; > powerpc-*) platform=ieee1275 ;; > powerpc64-*) platform=ieee1275 ;; > + powerpc64le-*) platform=ieee1275 ;; > sparc64-*) platform=ieee1275 ;; > mipsel-*) platform=loongson ;; > mips-*) platform=arc ;; > @@ -137,6 +138,7 @@ case "$target_cpu"-"$platform" in > x86_64-xen) ;; > x86_64-*) target_cpu=i386 ;; > powerpc64-ieee1275) target_cpu=powerpc ;; > + powerpc64le-ieee1275) target_cpu=powerpc ;; > esac > > # Check if the platform is supported, make final adjustments. > @@ -581,6 +583,13 @@ if test "x$target_cpu" = xi386 && test "x$platform" != xemu; then > TARGET_CFLAGS="$TARGET_CFLAGS -march=i386" > fi > > +if test x$target_cpu = xpowerpc && test x$ac_cv_c_bigendian = xno; then > + LD_FORCE_LE=1 > + TARGET_CFLAGS="$TARGET_CFLAGS -mbig-endian -DNO_LIBGCC=1" > + TARGET_CCASFLAGS="$TARGET_CCASFLAGS -mbig-endian" > + TARGET_LDFLAGS="$TARGET_LDFLAGS -static -mbig-endian" > +fi > + > if test "x$target_m32" = x1; then > # Force 32-bit mode. > TARGET_CFLAGS="$TARGET_CFLAGS -m32" > @@ -1024,7 +1033,8 @@ else > CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error" > fi > CPPFLAGS="$TARGET_CPPFLAGS" > -if test x$target_cpu = xi386 || test x$target_cpu = xx86_64 || test "x$grub_cv_cc_target_clang" = xyes ; then > +if test x$target_cpu = xi386 || test x$target_cpu = xx86_64 || test "x$grub_cv_cc_target_clang" = xyes \ > + || ( test x$target_cpu = xpowerpc && test x$ac_cv_c_bigendian = xno ); then > TARGET_LIBGCC= > else > TARGET_LIBGCC=-lgcc > @@ -1608,7 +1618,9 @@ if test x"$enable_werror" != xno ; then > HOST_CFLAGS="$HOST_CFLAGS -Werror" > fi > > -if test "x$grub_cv_cc_target_clang" = xno; then > +# if not clang or power LE, use static libgcc > +if test "x$grub_cv_cc_target_clang" = xno \ > + || ! ( test x$target_cpu = xpowerpc && test x$ac_cv_c_bigendian = xno ); then > TARGET_LDFLAGS_STATIC_LIBGCC="-static-libgcc" > else > TARGET_LDFLAGS_STATIC_LIBGCC= > @@ -1671,6 +1683,7 @@ AM_CONDITIONAL([COND_mips_arc], [test "(" x$target_cpu = xmips -o x$target_cpu = > AM_CONDITIONAL([COND_sparc64_ieee1275], [test x$target_cpu = xsparc64 -a x$platform = xieee1275]) > AM_CONDITIONAL([COND_sparc64_emu], [test x$target_cpu = xsparc64 -a x$platform = xemu]) > AM_CONDITIONAL([COND_powerpc_ieee1275], [test x$target_cpu = xpowerpc -a x$platform = xieee1275]) > +AM_CONDITIONAL([COND_powerpc_le], [test x$target_cpu = xpowerpc -a x$ac_cv_c_bigendian = xno]) > AM_CONDITIONAL([COND_mips], [test x$target_cpu = xmips -o x$target_cpu = xmipsel]) > AM_CONDITIONAL([COND_mipsel], [test x$target_cpu = xmipsel]) > AM_CONDITIONAL([COND_mipseb], [test x$target_cpu = xmips]) > diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am > index 5c087c8..cb7fd9f 100644 > --- a/grub-core/Makefile.am > +++ b/grub-core/Makefile.am > @@ -84,8 +84,10 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/time.h > KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm_private.h > KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/net.h > if !COND_clang > +if !COND_powerpc_le > KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libgcc.h > endif > +endif > KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/memory.h > > if COND_i386_pc > -- > 1.8.1.4 > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > I just moved some part of this patch to the second one. Now this patch only add the target and all libgcc stuff is in the second one. -- Paulo Flabiano Smorigo IBM Linux Technology Center --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Add-powerpc-little-endian-ppc64le-flags.patch" From 7a2e287e6ed00476c6760797541c3aff49dbeb40 Mon Sep 17 00:00:00 2001 From: Paulo Flabiano Smorigo Date: Wed, 17 Sep 2014 14:42:40 -0300 Subject: [PATCH 1/2] Add powerpc little-endian (ppc64le) flags * configure.ac: Add target for ppc64le (ppc64el). --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac index 8662bac..25193de 100644 --- a/configure.ac +++ b/configure.ac @@ -119,6 +119,7 @@ if test "x$with_platform" = x; then x86_64-*) platform=pc ;; powerpc-*) platform=ieee1275 ;; powerpc64-*) platform=ieee1275 ;; + powerpc64le-*) platform=ieee1275 ;; sparc64-*) platform=ieee1275 ;; mipsel-*) platform=loongson ;; mips-*) platform=arc ;; @@ -137,6 +138,7 @@ case "$target_cpu"-"$platform" in x86_64-xen) ;; x86_64-*) target_cpu=i386 ;; powerpc64-ieee1275) target_cpu=powerpc ;; + powerpc64le-ieee1275) target_cpu=powerpc ;; esac # Check if the platform is supported, make final adjustments. @@ -581,6 +583,13 @@ if test "x$target_cpu" = xi386 && test "x$platform" != xemu; then TARGET_CFLAGS="$TARGET_CFLAGS -march=i386" fi +if test x$target_cpu = xpowerpc && test x$ac_cv_c_bigendian = xno; then + #LD_FORCE_LE=1 + TARGET_CFLAGS="$TARGET_CFLAGS -mbig-endian" + TARGET_CCASFLAGS="$TARGET_CCASFLAGS -mbig-endian" + TARGET_LDFLAGS="$TARGET_LDFLAGS -static -mbig-endian" +fi + if test "x$target_m32" = x1; then # Force 32-bit mode. TARGET_CFLAGS="$TARGET_CFLAGS -m32" -- 1.8.4.2 --2fHTh5uZTiUOsy+g--