From patchwork Wed Oct 7 05:54:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Pluzhnikov X-Patchwork-Id: 8954 Received: (qmail 32849 invoked by alias); 7 Oct 2015 05:54:49 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 32834 invoked by uid 89); 7 Oct 2015 05:54:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-wi0-f176.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=0+RrClIQyvdj0uIHf+sj5Pd9TjnUPb90Dr6oa0hc/JE=; b=DH0kpNymZ3Xf4lQzvV/eoMtlseaxwzGbApmKagLI3MFerRAPmHLAdnWL3gXW4mlkUI XkVlbINNXBlqEcEeoAl0UIIf7OFM/WNEVbElo2d2I7V6d5hWrecfF75lhqElWYlyjlRd JnVwUR/j2cwJhst59C2qz+NjUVKGFSRDMfkoVFyYx9k//Vgqir4XpAlrv0ekSJq3T3sK 1NP+j2fgVjkhhtwL+ANpSKzUhHmcsVsjxR9Gnt3HP5TyJ1TKhVRTjEY1WjDOd4H+y4Zv te7PYR64aA7dAYMtK66d16oz7D29OJA/uPxqpXD2P/rf3qF4bSjmkf9psUrb9vsy8BkF 7yxQ== X-Gm-Message-State: ALoCoQkrFvN9DaKZ5/ZKw1TyJmF2XxUey9eQIQwxKOefWQdGYdTqmhizTWYpHyUJpGBymRC6YMzl X-Received: by 10.180.210.162 with SMTP id mv2mr20096140wic.47.1444197284842; Tue, 06 Oct 2015 22:54:44 -0700 (PDT) MIME-Version: 1.0 From: Paul Pluzhnikov Date: Tue, 6 Oct 2015 22:54:15 -0700 Message-ID: Subject: [patch] Fix build error for tst-printf-bz18872 on arm/aarch64 and s390 To: GLIBC Devel Greetings, Some targets do not support "#pragma GCC push_options", and disabling optimization in stdio-common/tst-printf-bz18872.c is only known to be necessary on x86_64 and ix86. Attached patch should fix build problems reported here: https://sourceware.org/ml/libc-alpha/2015-09/msg00484.html https://sourceware.org/ml/libc-alpha/2015-10/msg00063.html 2015-10-06 Paul Pluzhnikov * stdio-common/tst-printf-bz18872.sh: Make disabling optimization conditional on x86_64 or i386. diff --git a/stdio-common/tst-printf-bz18872.sh b/stdio-common/tst-printf-bz18872.sh index 0127e73..1e5f80b 100644 --- a/stdio-common/tst-printf-bz18872.sh +++ b/stdio-common/tst-printf-bz18872.sh @@ -27,11 +27,19 @@ cat <<'EOF' #include #include +#if defined(__x86_64__) || defined(__i386__) /* Compile do_test without optimization: GCC 4.9/5.0/6.0 takes a long time to build this source. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67396 */ +# define DISABLE_OPTIMIZATION 1 +#else +# define DISABLE_OPTIMIZATION 0 +#endif + +#if DISABLE_OPTIMIZATION #pragma GCC push_options #pragma GCC optimize ("-O0") +#endif int do_test (void) { @@ -62,7 +70,10 @@ cat <<'EOF' return 0; } + +#if DISABLE_OPTIMIZATION #pragma GCC pop_options +#endif #define TEST_FUNCTION do_test () #include "../test-skeleton.c"