From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2790 invoked by alias); 20 May 2016 15:04:13 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 2101 invoked by uid 89); 20 May 2016 15:04:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,POKER_BODY,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:2521, hongjiu.lu@intel.com, hongjiuluintelcom X-HELO: mail-qk0-f195.google.com Received: from mail-qk0-f195.google.com (HELO mail-qk0-f195.google.com) (209.85.220.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 20 May 2016 15:04:02 +0000 Received: by mail-qk0-f195.google.com with SMTP id l68so10813455qkf.3 for ; Fri, 20 May 2016 08:04:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc; bh=wGWrL5C+4W3n7d+OGJRdkqocOHZLoZs8lJx+4lfFE64=; b=T7RSp1UBgeUPu9znV4axxrFCMGFQj+5WfW+nq4k9RtGopxBf4JlsFNq5Om3JTonBg+ xZD8cglpQgdT4OaAqC28Wf+EZoX+hrPHGKb/QHC2G6FMyMJWL85dKbdDafdk9x1o54gA d6oTOYydhRu4rSGGnKZYs+giBiARbnATYkCcY+IfreXmPNVDaxtJDwDK3ghA+75GaWma uB3VeN2auxdO0LmJr7fQ5Se9JcI5E8OMSUduqFS3YxRqY5zRG/iYaOOJJof97p8Ug5Nt BR3V69KGacD+1T4/fYuOJH7yBifc92CJgtLO3mgMft9rNRjEZRD4UtkE9XHEFH4hPkLa nQzA== X-Gm-Message-State: AOPr4FVVFF1rgqnH0UwMQtmbobZGAjadY0pdxGDuKjNvvcP6WdNyUR0GnyO782nhPXK/I0JMpAh4QJsgTzMKeQ== MIME-Version: 1.0 X-Received: by 10.55.207.149 with SMTP id v21mr3889061qkl.195.1463756640589; Fri, 20 May 2016 08:04:00 -0700 (PDT) Received: by 10.55.221.134 with HTTP; Fri, 20 May 2016 08:04:00 -0700 (PDT) Date: Fri, 20 May 2016 15:04:00 -0000 Message-ID: Subject: PING^3: [PATCH] PR target/70454: Build x86 libgomp with -march=i486 or better From: "H.J. Lu" To: GCC Patches Cc: Jakub Jelinek , Uros Bizjak Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg01657.txt.bz2 On Mon, May 9, 2016 at 5:52 AM, H.J. Lu wrote: > On Mon, May 2, 2016 at 6:46 AM, H.J. Lu wrote: >> On Mon, Apr 25, 2016 at 1:36 PM, H.J. Lu wrote: >>> If x86 libgomp isn't compiled with -march=i486 or better, append >>> -march=i486 XCFLAGS for x86 libgomp build. >>> >>> Tested on i686 with and without --with-arch=i386. Tested on >>> x86-64 with and without --with-arch_32=i386. OK for trunk? >>> >>> >>> H.J. >>> --- >>> PR target/70454 >>> * configure.tgt (XCFLAGS): Append -march=i486 to compile x86 >>> libgomp if needed. >>> --- >>> libgomp/configure.tgt | 36 ++++++++++++++++-------------------- >>> 1 file changed, 16 insertions(+), 20 deletions(-) >>> >>> diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt >>> index 77e73f0..c876e80 100644 >>> --- a/libgomp/configure.tgt >>> +++ b/libgomp/configure.tgt >>> @@ -67,28 +67,24 @@ if test x$enable_linux_futex = xyes; then >>> ;; >>> >>> # Note that bare i386 is not included here. We need cmpxchg. >>> - i[456]86-*-linux*) >>> + i[456]86-*-linux* | x86_64-*-linux*) >>> config_path="linux/x86 linux posix" >>> - case " ${CC} ${CFLAGS} " in >>> - *" -m64 "*|*" -mx32 "*) >>> - ;; >>> - *) >>> - if test -z "$with_arch"; then >>> - XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}" >>> + # Need i486 or better. >>> + cat > conftestx.c <>> +#if defined __x86_64__ || defined __i486__ || defined __pentium__ \ >>> + || defined __pentiumpro__ || defined __pentium4__ \ >>> + || defined __geode__ || defined __SSE__ >>> +# error Need i486 or better >>> +#endif >>> +EOF >>> + if ${CC} ${CFLAGS} -c -o conftestx.o conftestx.c > /dev/null 2>&1; then >>> + if test "${target_cpu}" = x86_64; then >>> + XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic" >>> + else >>> + XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}" >>> fi >>> - esac >>> - ;; >>> - >>> - # Similar jiggery-pokery for x86_64 multilibs, except here we >>> - # can't rely on the --with-arch configure option, since that >>> - # applies to the 64-bit side. >>> - x86_64-*-linux*) >>> - config_path="linux/x86 linux posix" >>> - case " ${CC} ${CFLAGS} " in >>> - *" -m32 "*) >>> - XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic" >>> - ;; >>> - esac >>> + fi >>> + rm -f conftestx.c conftestx.o >>> ;; >>> >>> # Note that sparcv7 and sparcv8 is not included here. We need cas. >>> -- >>> 2.5.5 >>> >> >> PING. >> > > PING. > PING. -- H.J.