From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XEC1d-0004RK-23 for mharc-grub-devel@gnu.org; Mon, 04 Aug 2014 02:45:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEC1V-0004QP-PQ for grub-devel@gnu.org; Mon, 04 Aug 2014 02:45:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEC1P-000144-T3 for grub-devel@gnu.org; Mon, 04 Aug 2014 02:45:33 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:33097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEC1P-00013z-LK for grub-devel@gnu.org; Mon, 04 Aug 2014 02:45:27 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s746jP44032101 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 4 Aug 2014 06:45:26 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s746jO0H004235 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 4 Aug 2014 06:45:25 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s746jOK3004936 for ; Mon, 4 Aug 2014 06:45:24 GMT Received: from [10.162.81.211] (/10.162.81.211) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 03 Aug 2014 23:45:24 -0700 Message-ID: <53DF2C02.4030607@oracle.com> Date: Mon, 04 Aug 2014 10:45:22 +0400 From: Stanislav Kholmanskikh User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [RFC PATCH] configure check for ld's --no-relax flag References: <1406895356-28090-1-git-send-email-stanislav.kholmanskikh@oracle.com> <20140801193559.61fe4363@opensuse.site> <53DBB4D4.3090508@gmail.com> In-Reply-To: <53DBB4D4.3090508@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by userp1040.oracle.com id s746jP44032101 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 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: Mon, 04 Aug 2014 06:45:39 -0000 Hi! On 08/01/2014 07:40 PM, Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: > On 01.08.2014 17:35, Andrey Borzenkov wrote: >> =D0=92 Fri, 1 Aug 2014 16:15:56 +0400 >> Stanislav Kholmanskikh =D0=BF=D0=B8= =D1=88=D0=B5=D1=82: >> >>> Early versions of binutils doesn't support --no-relax flag, so >>> commit 063f2a04d158ec1b275a925dfbae74b124708cde prevents building >>> with such versions. >>> >>> Signed-off-by: Stanislav Kholmanskikh >>> --- >>> conf/Makefile.common | 8 ++++++++ >>> configure.ac | 10 ++++++++++ >>> 2 files changed, 18 insertions(+), 0 deletions(-) >>> >>> diff --git a/conf/Makefile.common b/conf/Makefile.common >>> index e4c301f..5bda66f 100644 >>> --- a/conf/Makefile.common >>> +++ b/conf/Makefile.common >>> @@ -8,11 +8,19 @@ unexport LC_ALL >>> # Platform specific options >>> if COND_sparc64_ieee1275 >>> CFLAGS_PLATFORM +=3D -mno-app-regs >>> +if COND_LD_SUPPORTS_NO_RELAX >>> LDFLAGS_PLATFORM =3D -Wl,-melf64_sparc -Wl,--no-relax >>> +else >>> + LDFLAGS_PLATFORM =3D -Wl,-melf64_sparc -mno-relax >>> +endif >> >> TBO I think commit should simply be reverted. "Uniformity" is rather >> poor excuse for breaking existing systems. >> > This commit is needed for clang to compile for sparc64. Given that > sparc64 clang still doesn't really work I'm ok with reverting, at least > for now. But, it this case, maybe it would be better to consider=20 reviewing/applying this patch? Just to not return to this issue after=20 some time? Andrey, Vladimir, what do you think? Thanks. >>> endif >>> if COND_sparc64_emu >>> CFLAGS_PLATFORM +=3D -mno-app-regs >>> +if COND_LD_SUPPORTS_NO_RELAX >>> LDFLAGS_PLATFORM =3D -Wl,--no-relax >>> +else >>> + LDFLAGS_PLATFORM =3D -mno-relax >>> +endif >>> endif >>> if COND_arm >>> if !COND_emu >>> diff --git a/configure.ac b/configure.ac >>> index 8888c2f..282fded 100644 >>> --- a/configure.ac >>> +++ b/configure.ac >>> @@ -516,6 +516,14 @@ fi >>> >>> TARGET_CC_VERSION=3D"$(LC_ALL=3DC $TARGET_CC --version | head -n1)" >>> >>> +AC_CACHE_CHECK([if the target C compiler supports -Wl,--no-relax], [= grub_cv_target_cc_wl_no_relax_flag], [ >>> + LDFLAGS=3D"$TARGET_LDFLAGS -nostdlib -static" >>> + >>> + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ >>> +int main(void) { return 0; } >>> +]])], [grub_cv_target_cc_wl_no_relax_flag=3Dyes], [grub_cv_target_cc= _wl_no_relax_flag=3Dno]) >>> +]) >>> + >>> AC_CACHE_CHECK([which extra warnings work], [grub_cv_target_cc_w_ex= tra_flags], [ >>> LDFLAGS=3D"$TARGET_LDFLAGS -nostdlib -static" >>> >>> @@ -1708,6 +1716,8 @@ AM_CONDITIONAL([COND_ENABLE_BOOT_TIME_STATS], [= test x$BOOT_TIME_STATS =3D x1]) >>> >>> AM_CONDITIONAL([COND_HAVE_CXX], [test x$HAVE_CXX =3D xyes]) >>> >>> +AM_CONDITIONAL([COND_LD_SUPPORTS_NO_RELAX], [test x$grub_cv_target_c= c_wl_no_relax_flag =3D xyes]) >>> + >>> AM_CONDITIONAL([COND_HAVE_ASM_USCORE], [test x$HAVE_ASM_USCORE =3D = x1]) >>> AM_CONDITIONAL([COND_STARFIELD], [test "x$starfield_excuse" =3D x]) >>> AM_CONDITIONAL([COND_HAVE_EXEC], [test "x$have_exec" =3D xy]) >> >> >> _______________________________________________ >> 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 >