From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZA0HM-0005En-PY for mharc-grub-devel@gnu.org; Tue, 30 Jun 2015 14:29:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZA0HI-00058B-HS for grub-devel@gnu.org; Tue, 30 Jun 2015 14:29:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZA0HD-0007GF-OX for grub-devel@gnu.org; Tue, 30 Jun 2015 14:29:04 -0400 Received: from mail-la0-x236.google.com ([2a00:1450:4010:c03::236]:34617) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZA0HD-0007Fg-CX for grub-devel@gnu.org; Tue, 30 Jun 2015 14:28:59 -0400 Received: by lagx9 with SMTP id x9so24544476lag.1 for ; Tue, 30 Jun 2015 11:28:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=LOzy7fgK28cDF0NMnp6qbZ2ReMZHulOrHUj4LgZZNHk=; b=ma4V6lNaQ4NSCynUFQJebIljyheohaz7laKs/oNZvGMG65dS/QnrIqccvrk/aBceEq oTRp1il4tUZkgb8mI3Hlmmz8f5crSu56e3Cz2yEG5DzCGYgmV+Qv3WARFWSG8EXEywst rkzMJg0EBk8qSQZ6dLAlrvH0K2bJm+oir0NL+9O3gfVKa8mfTkX24cBOO9eES8ryp8Ec c8txTiWnv1BKREN5C+BzniTCEYTj1hi7B8gD7YeiNjtmkABZ9m65Yux1+v3zRcbE97If i2Iu0inrfhzp0e/ux/oNNVSbHqa5U5rLoWud5b0jHHOllJqIQMUbox4g0Wkw/ghoW0E5 9pqg== X-Received: by 10.152.197.2 with SMTP id iq2mr21104554lac.103.1435688938202; Tue, 30 Jun 2015 11:28:58 -0700 (PDT) Received: from opensuse.site (ppp91-76-14-38.pppoe.mtu-net.ru. [91.76.14.38]) by mx.google.com with ESMTPSA id sf1sm9943199lbb.3.2015.06.30.11.28.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jun 2015 11:28:57 -0700 (PDT) Date: Tue, 30 Jun 2015 21:28:56 +0300 From: Andrei Borzenkov To: Paulo Flabiano Smorigo Subject: Re: [PATCH 1/2] Add powerpc little-endian (ppc64le) flags Message-ID: <20150630212856.12c56676@opensuse.site> In-Reply-To: <5592DA7A.8050107@linux.vnet.ibm.com> References: <1435669013-3741-1-git-send-email-pfsmorigo@linux.vnet.ibm.com> <1435669013-3741-2-git-send-email-pfsmorigo@linux.vnet.ibm.com> <5592DA7A.8050107@linux.vnet.ibm.com> X-Mailer: Claws Mail 3.11.0 (GTK+ 2.24.28; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::236 Cc: grub-devel@gnu.org 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: Tue, 30 Jun 2015 18:29:06 -0000 =D0=92 Tue, 30 Jun 2015 15:05:46 -0300 Paulo Flabiano Smorigo =D0=BF=D0=B8=D1=88=D0= =B5=D1=82: > On 2015-06-30 11:33, Vladimir 'phcoder' Serbinenko wrote: > > What about clang? >=20 > Not good news about clang support. This is what the toolchain team said=20 > about it: >=20 > The -mbig-endian option was added around April 10th, 2014.=20 > Unfortunately, those who implemented it only implemented it for ARM and=20 > one other architecture. >=20 > The option is currently accepted on Power systems, but does not have any= =20 > affect on the code generation for Power. >=20 >=20 > So, what can we do here? Maybe add a constrain in the configure file=20 > saying that it's not possible to build GRUB in a LE environment using cla= ng. If I understand it correctly, it is possible to build for big-endian PowerPC using clang -target=3Dpowerpc but then we depend on clang being built with BE target support; and e.g. openSUSE builds it with cmake -G "Ninja" \ -DBUILD_SHARED_LIBS=3DOFF \ -DCMAKE_BUILD_TYPE=3DRelease \ -DLLVM_ENABLE_ASSERTIONS=3DOFF \ -DLLVM_TARGETS_TO_BUILD=3Dhost \ -DCMAKE_C_FLAGS=3D"-O0" \ -DCMAKE_CXX_FLAGS=3D"-O0" \ -DLLVM_HOST_TRIPLE=3D%{host_triple} \ so as I understand on ppc64le it does not build support for any other target. Actually openSUSE does not even build clang on ppc at all. > > > > Le 30 juin 2015 16:30, "Andrei Borzenkov" > > a =C3=A9crit : > > > > On Tue, Jun 30, 2015 at 5:03 PM, Vladimir 'phcoder' Serbinenko > > > wrote: > > > Which compilers support these flags? I'm concerned of breaking > > old compilers > > > > > > > -static and -mbig-endian are listed in gcc 2.95.3 documentation for= PPC. > > > > > Le 30 juin 2015 14:57, "Paulo Flabiano Smorigo" > > > > > a =C3=A9crit : > > >> > > >> 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 | 8 ++++++++ > > >> 1 file changed, 8 insertions(+) > > >> > > >> diff --git a/configure.ac b/configure.ac > > > > >> index fd8a62e..0a79fad 100644 > > >> --- a/configure.ac > > >> +++ b/configure.ac > > >> @@ -116,6 +116,7 @@ if test "x$with_platform" =3D x; then > > >> x86_64-*) platform=3Dpc ;; > > >> powerpc-*) platform=3Dieee1275 ;; > > >> powerpc64-*) platform=3Dieee1275 ;; > > >> + powerpc64le-*) platform=3Dieee1275 ;; > > >> sparc64-*) platform=3Dieee1275 ;; > > >> mipsel-*) platform=3Dloongson ;; > > >> mips-*) platform=3Darc ;; > > >> @@ -138,6 +139,7 @@ case "$target_cpu"-"$platform" in > > >> x86_64-none) ;; > > >> x86_64-*) target_cpu=3Di386 ;; > > >> powerpc64-ieee1275) target_cpu=3Dpowerpc ;; > > >> + powerpc64le-ieee1275) target_cpu=3Dpowerpc ;; > > >> esac > > >> > > >> # Check if the platform is supported, make final adjustments. > > >> @@ -601,6 +603,12 @@ if test "x$target_cpu" =3D xi386 && test > > "x$platform" > > >> !=3D xemu; then > > >> TARGET_CFLAGS=3D"$TARGET_CFLAGS -march=3Di386" > > >> fi > > >> > > >> +if test x$target_cpu =3D xpowerpc; then > > >> + TARGET_CFLAGS=3D"$TARGET_CFLAGS -mbig-endian" > > >> + TARGET_CCASFLAGS=3D"$TARGET_CCASFLAGS -mbig-endian" > > >> + TARGET_LDFLAGS=3D"$TARGET_LDFLAGS -static -mbig-endian" > > >> +fi > > >> + > > >> if test "x$target_m32" =3D x1; then > > >> # Force 32-bit mode. > > >> TARGET_CFLAGS=3D"$TARGET_CFLAGS -m32" > > >> -- > > >> 2.1.0 > > >> > > >> > > >> _______________________________________________ > > >> Grub-devel mailing list > > >> Grub-devel@gnu.org > > >> https://lists.gnu.org/mailman/listinfo/grub-devel > > > > > > > > > _______________________________________________ > > > Grub-devel mailing list > > > Grub-devel@gnu.org > > > https://lists.gnu.org/mailman/listinfo/grub-devel > > > > > > > _______________________________________________ > > Grub-devel mailing list > > Grub-devel@gnu.org > > https://lists.gnu.org/mailman/listinfo/grub-devel > > > > > > > > _______________________________________________ > > Grub-devel mailing list > > Grub-devel@gnu.org > > https://lists.gnu.org/mailman/listinfo/grub-devel > > >=20 >=20