From: Adhemerval Zanella Date: Thu, 24 Mar 2022 18:54:10 +0000 (-0300) Subject: tst-printf-bz18872.sh: stdio: Use __attribute__ ((optnone)) for Clang X-Git-Tag: glibc-2.41~247 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d085db5b57c71c3ee2fbfc38a4f7e2158abeb1d4;p=thirdparty%2Fglibc.git tst-printf-bz18872.sh: stdio: Use __attribute__ ((optnone)) for Clang Use __attribute__ ((optnone)) instead of __attribute__ ((optimize ("-O0"))) to disable optimization for Clang. Co-Authored-By: H.J. Lu Reviewed-by: Sam James --- diff --git a/stdio-common/tst-printf-bz18872.sh b/stdio-common/tst-printf-bz18872.sh index 3b283f49a6..ade4b61f85 100644 --- a/stdio-common/tst-printf-bz18872.sh +++ b/stdio-common/tst-printf-bz18872.sh @@ -31,7 +31,11 @@ cat <<'EOF' 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 */ +#ifdef __clang__ +__attribute__ ((optnone)) +#else __attribute__ ((optimize ("-O0"))) +#endif int do_test (void) { mtrace ();