Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 712488 - flag-o-matic gives false positives when clang-10 warns about unknown CUDA version
Summary: flag-o-matic gives false positives when clang-10 warns about unknown CUDA ver...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on: 714742
Blocks:
  Show dependency tree
 
Reported: 2020-03-14 12:08 UTC by Anton Gubarkov
Modified: 2022-07-26 04:49 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild I tried to build with clang (libreoffice-6.3.5.2.ebuild,15.59 KB, text/plain)
2020-03-16 20:03 UTC, Anton Gubarkov
Details
the ebuild I tried to build with clang (webkit-gtk-2.26.4-r1.ebuild,8.55 KB, text/plain)
2020-03-16 20:07 UTC, Anton Gubarkov
Details
build.log (build.log,1.58 KB, text/x-log)
2020-03-16 20:12 UTC, Anton Gubarkov
Details
die.env (die.env,309.67 KB, text/plain)
2020-03-16 20:21 UTC, Anton Gubarkov
Details
debug of pretend (712488.txt,938.12 KB, text/plain)
2020-03-17 07:26 UTC, Anton Gubarkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Gubarkov 2020-03-14 12:08:34 UTC
I tried to experiment with using clang for building packages. I started with webkit-gtk and immediately hit an error that I need at least GCC 7.3.x or Clang >= 5 for C++17-specific compiler flags. 
I have clang 10.

The problem is in the way flag-o-matic.eclass checks for the compiler flags. 
It adds -Werror and the harmless warning about CUDA 10.2 incompatibility with clang-10 becomes blocking.
clang-10: error: Unknown CUDA version 10.2. Assuming the latest supported version 10.1 [-Werror,-Wunknown-cuda-version]
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2020-03-16 18:57:12 UTC
I'm afraid it's too high-level description of a problem.

Please provide more details on what is actually failing:
1. Is it a ebuild you wrote or something in ::gentoo? Do link or attach the ebuild.
2. Post 'emerge --info' so we could see what is being mangled by flag-o-matic.
3. Please attach build.log that illustrates a problem.
Comment 2 Anton Gubarkov 2020-03-16 20:03:37 UTC
Created attachment 620710 [details]
ebuild I tried to build with clang
Comment 3 Anton Gubarkov 2020-03-16 20:07:33 UTC
Created attachment 620712 [details]
the ebuild  I tried to build with clang
Comment 4 Anton Gubarkov 2020-03-16 20:10:16 UTC
PF16W6Y2 ~ # emerge --info webkit-gtk
Portage 2.3.94 (python 3.6.10-final-0, default/linux/amd64/17.1/desktop/gnome/systemd, gcc-9.3.0, glibc-2.30-r5, 5.5.9-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.5.9-gentoo-x86_64-Intel-R-_Core-TM-_i7-8850H_CPU_@_2.60GHz-with-gentoo-2.7
KiB Mem:    32632100 total,   9427200 free
KiB Swap:   33554428 total,  32667644 free
Timestamp of repository gentoo: Sun, 15 Mar 2020 14:08:54 +0000
Head commit of repository gentoo: 3b16c8dce88885c0270311b98376840772afd06e

sh bash 5.0_p16
ld GNU ld (Gentoo 2.34 p1) 2.34.0
app-shells/bash:          5.0_p16::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.7::gentoo, 3.8.2::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.1-r2::gentoo
sys-devel/binutils:       2.34::gentoo
sys-devel/gcc:            8.4.0::gentoo, 9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: git://github.com/gentoo-mirror/gentoo.git
    priority: -1000

dlang
    location: /var/lib/layman/dlang
    masters: gentoo
    priority: 50

gentoo-zh
    location: /var/lib/layman/gentoo-zh
    masters: gentoo
    priority: 50

go-overlay
    location: /var/lib/layman/go-overlay
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

tlp
    location: /var/lib/layman/tlp
    masters: gentoo
    priority: 50

rugubara
    location: /var/lib/layman/rugubara
    masters: gentoo
    priority: 100

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -mtune=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -mtune=native"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -mtune=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -mtune=native"
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/ http://mirror.yandex.ru/gentoo-distfiles/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi aio alsa amd64 bash-completion berkdb bluetooth branding bzip2 cacert cairo cdda cdr cgroup-hybrid cli client colord crypt cups cxx dbus djvu dri dri3 dts dvd dvdr eds emboss encode evo exif fat ffmpeg flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm graphite gstreamer gtk gtk3 iconv icu introspection ipv6 jack jpeg jpeg2k lcms ldap libglvnd libnotify libsecret libtirpc libzfs lm_sensors lv2 mad mng mp3 mp4 mpeg multilib native-headset nautilus ncat ncurses networkmanager nls nptl nvenc nvme ogg opengl openmp opus pam pango pcre pdf png policykit ppds pulseaudio qt5 raw readline sdl sdl2 seccomp smp sna sound spell spice split-usr ssl startup-notification svg systemd tcpd thunderbolt tiff tracker truetype udev udisks uefi unicode upower usb usbredir user-session vaapi vala vdpau virgl vorbis wayland webdav wireguard wxwidgets x264 x265 xattr xcb xml xv xvid zeroconf zfs zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput wacom" KERNEL="linux" L10N="en ru" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25 ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="i965 iris nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

net-libs/webkit-gtk-2.26.4-r1::gentoo was built with the following:
USE="X egl geolocation gnome-keyring gstreamer introspection jpeg2k jumbo-build libnotify opengl (seccomp) spell wayland (-aqua) -coverage -gles2-only -gtk-doc -test" ABI_X86="(64)"
FEATURES="binpkg-docompress news pid-sandbox strict unknown-features-warn assume-digests unmerge-logs multilib-strict binpkg-logs protect-owned ebuild-locks binpkg-dostrip fixlafiles userpriv preserve-libs network-sandbox ipc-sandbox userfetch merge-sync parallel-fetch usersandbox sandbox distlocks unmerge-orphans config-protect-if-modified qa-unresolved-soname-deps sfperms usersync"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--no-keep-memory"
Comment 5 Anton Gubarkov 2020-03-16 20:12:32 UTC
Created attachment 620714 [details]
build.log
Comment 6 Anton Gubarkov 2020-03-16 20:17:37 UTC
I tracked this call in the ebuild
		if ! test-flag-CXX -std=c++17 ; then
			die "You need at least GCC 7.3.x or Clang >= 5 for C++17-specific compiler flags"
		fi

to flag-o-matic and added debug echoes to it. I ran the test command that flagomatic run to test -std=c++17. 
The only error was 
clang-10: error: Unknown CUDA version 10.2. Assuming the latest supported version 10.1 [-Werror,-Wunknown-cuda-version]
Comment 7 Anton Gubarkov 2020-03-16 20:20:07 UTC
I turned the compiler to clang using package.env

net-libs/webkit-gtk compiler-clang-lto

/etc/portage/env/compiler-clang-lto:
CC="clang"
CXX="clang++"
CFLAGS="${CFLAGS} -flto=thin"
CXXFLAGS="${CXXFLAGS} -flto=thin"
LDFLAGS="-Wl,-O2 -Wl,--as-needed"     #please use whichever optimization level you're comfortable with
Comment 8 Anton Gubarkov 2020-03-16 20:21:30 UTC
Created attachment 620716 [details]
die.env
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2020-03-16 22:41:11 UTC
I tried to run the following command locally, but it does not fail for me:

    $ PORTAGE_TMPDIR=/tmp/bug CFLAGS="-O2 -pipe -mtune=native -flto=thin" CXXFLAGS="-O2 -pipe -mtune=native -flto=thin" LDFLAGS="-Wl,-O1 -Wl,--as-needed" CC=clang CXX=clang++ ebuild --debug webkit-gtk-2.26.4-r1.ebuild clean pretend; echo $?

Can you check if it fails for you? And if it does attach it's output.
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2020-03-16 22:43:34 UTC
Also, can you post 'ls -l1 /opt/cuda/bin' output? I wonder if somehow unrelated compiler takes precedence and breaks your environment.
Comment 11 Anton Gubarkov 2020-03-17 07:21:51 UTC
PF16W6Y2 ~ # ls -l1 /opt/cuda/bin/
total 45327
-rwxr-xr-x 1 root root    80576 фев 18 23:27 bin2c
drwxr-xr-x 2 root root        4 фев 18 23:27 crt
-rwxr-xr-x 1 root root      431 фев 18 23:27 cuda-config
-rwxr-xr-x 1 root root  4833904 фев 18 23:27 cudafe++
-rwxr-xr-x 1 root root   397480 фев 18 23:27 cuda-memcheck
-rwxr-xr-x 1 root root   688016 фев 18 23:27 cuda-uninstaller
-rwxr-xr-x 1 root root   212224 фев 18 23:27 cuobjdump
-rwxr-xr-x 1 root root   195600 фев 18 23:27 fatbinary
-rwxr-xr-x 1 root root   229504 фев 18 23:27 nvcc
-rwxr-xr-x 1 root root      417 фев 18 23:27 nvcc.profile
-rwxr-xr-x 1 root root 23034280 фев 18 23:27 nvdisasm
-rwxr-xr-x 1 root root  8092008 фев 18 23:27 nvlink
-rwxr-xr-x 1 root root    97168 фев 18 23:27 nvprune
-rwxr-xr-x 1 root root  7955808 фев 18 23:27 ptxas
Comment 12 Anton Gubarkov 2020-03-17 07:26:20 UTC
Created attachment 620736 [details]
debug of pretend
Comment 13 Sergei Trofimovich (RETIRED) gentoo-dev 2020-03-17 07:28:28 UTC
(In reply to Anton Gubarkov from comment #11)
> PF16W6Y2 ~ # ls -l1 /opt/cuda/bin/
> total 45327
> -rwxr-xr-x 1 root root    80576 фев 18 23:27 bin2c
> drwxr-xr-x 2 root root        4 фев 18 23:27 crt
> -rwxr-xr-x 1 root root      431 фев 18 23:27 cuda-config
> -rwxr-xr-x 1 root root  4833904 фев 18 23:27 cudafe++
> -rwxr-xr-x 1 root root   397480 фев 18 23:27 cuda-memcheck
> -rwxr-xr-x 1 root root   688016 фев 18 23:27 cuda-uninstaller
> -rwxr-xr-x 1 root root   212224 фев 18 23:27 cuobjdump
> -rwxr-xr-x 1 root root   195600 фев 18 23:27 fatbinary
> -rwxr-xr-x 1 root root   229504 фев 18 23:27 nvcc
> -rwxr-xr-x 1 root root      417 фев 18 23:27 nvcc.profile
> -rwxr-xr-x 1 root root 23034280 фев 18 23:27 nvdisasm
> -rwxr-xr-x 1 root root  8092008 фев 18 23:27 nvlink
> -rwxr-xr-x 1 root root    97168 фев 18 23:27 nvprune
> -rwxr-xr-x 1 root root  7955808 фев 18 23:27 ptxas

Nothing suspicious stands out. Let's oolk at the output of:

    $ PORTAGE_TMPDIR=/tmp/bug CFLAGS="-O2 -pipe -mtune=native -flto=thin" CXXFLAGS="-O2 -pipe -mtune=native -flto=thin" LDFLAGS="-Wl,-O1 -Wl,--as-needed" CC=clang CXX=clang++ ebuild --debug webkit-gtk-2.26.4-r1.ebuild clean pretend; echo $?
Comment 14 Anton Gubarkov 2020-03-17 07:45:07 UTC
(In reply to Sergei Trofimovich from comment #13)
> (In reply to Anton Gubarkov from comment #11)

> 
> Nothing suspicious stands out. Let's oolk at the output of:
> 
>     $ PORTAGE_TMPDIR=/tmp/bug CFLAGS="-O2 -pipe -mtune=native -flto=thin"
> CXXFLAGS="-O2 -pipe -mtune=native -flto=thin" LDFLAGS="-Wl,-O1
> -Wl,--as-needed" CC=clang CXX=clang++ ebuild --debug
> webkit-gtk-2.26.4-r1.ebuild clean pretend; echo $?

I've attached the output (~ 900K) https://bugs.gentoo.org/attachment.cgi?id=620736. And it did fail...
Comment 15 Sergei Trofimovich (RETIRED) gentoo-dev 2020-03-17 07:51:02 UTC
(In reply to Anton Gubarkov from comment #6)
> I tracked this call in the ebuild
> 		if ! test-flag-CXX -std=c++17 ; then
> 			die "You need at least GCC 7.3.x or Clang >= 5 for C++17-specific
> compiler flags"
> 		fi
> 
> to flag-o-matic and added debug echoes to it. I ran the test command that
> flagomatic run to test -std=c++17. 
> The only error was 
> clang-10: error: Unknown CUDA version 10.2. Assuming the latest supported
> version 10.1 [-Werror,-Wunknown-cuda-version]

I guess the trigger is a dev-util/nvidia-cuda-toolkit installed.

clang tries to check if installed cuda is of supported version:

    https://github.com/llvm-mirror/clang/blob/ae6164e81a997145838d60883a373e79de1b8e78/lib/Driver/Driver.cpp#L623

Regardless of if you plan to use it or not in a target tuple. Looks like clang does not understand 10.2.

It looks like '-Wno-unknown-cuda-version' is only supported by clang-10 and not before and gcc-5 and not before.

You can try any of the workarounds to see if the above looks correct:
- disable LLVM_TARGETS=NVPTX default
- uninstall dev-util/nvidia-cuda-toolkit
- install dev-util/nvidia-cuda-toolkit that provides older cuda
Comment 16 Sergei Trofimovich (RETIRED) gentoo-dev 2020-03-17 07:53:52 UTC
(In reply to Anton Gubarkov from comment #14)
> (In reply to Sergei Trofimovich from comment #13)
> > (In reply to Anton Gubarkov from comment #11)
> 
> > 
> > Nothing suspicious stands out. Let's oolk at the output of:
> > 
> >     $ PORTAGE_TMPDIR=/tmp/bug CFLAGS="-O2 -pipe -mtune=native -flto=thin"
> > CXXFLAGS="-O2 -pipe -mtune=native -flto=thin" LDFLAGS="-Wl,-O1
> > -Wl,--as-needed" CC=clang CXX=clang++ ebuild --debug
> > webkit-gtk-2.26.4-r1.ebuild clean pretend; echo $?
> 
> I've attached the output (~ 900K)
> https://bugs.gentoo.org/attachment.cgi?id=620736. And it did fail...

Thank you! Yeah, looks like normal clang is called here:

+ clang++ -Werror -std=c++17 -xc++ -c /tmp/bug/portage/net-libs/webkit-gtk-2.26.4-r1/temp/test-flag.cc -o /tmp/bug/portage/net-libs/webkit-gtk-2.26.4-r1/temp/test-flag.exe
+ cmdline+=(-Qunused-arguments)
+ clang++ -Werror -std=c++17 -xc++ -c /tmp/bug/portage/net-libs/webkit-gtk-2.26.4-r1/temp/test-flag.cc -o /tmp/bug/portage/net-libs/webkit-gtk-2.26.4-r1/temp/test-flag.exe -Qunused-arguments
+ die 'You need at least GCC 7.3.x or Clang >= 5 for C++17-specific compiler flags'
Comment 17 Anton Gubarkov 2020-03-17 08:17:01 UTC
When I read the rationale to add -Werror to flagomatic, it seems that it was a workaround for clang giving warnings on unsupported flags.

i tried to give -std=c++25 to clang w/o -Werror:

PF16W6Y2 /tmp/bug/portage/net-libs/webkit-gtk-2.26.4-r1/temp #  clang++ -std=c++25 -xc++ -c /tmp/bug/portage/net-libs/webkit-gtk-2.26.4-r1/temp/test-flag.cc -o /tmp/bug/portage/net-libs/webkit-gtk-2.26.4-r1/temp/test-flag.exe -Qunused-arguments
clang-10: warning: Unknown CUDA version 10.2. Assuming the latest supported version 10.1 [-Wunknown-cuda-version]
error: invalid value 'c++25' in '-std=c++25'
note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard
note: use 'gnu++98' or 'gnu++03' for 'ISO C++ 1998 with amendments and GNU extensions' standard
note: use 'c++11' for 'ISO C++ 2011 with amendments' standard
note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard
note: use 'c++14' for 'ISO C++ 2014 with amendments' standard
note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard
note: use 'c++17' for 'ISO C++ 2017 with amendments' standard
note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard
note: use 'c++20' for 'ISO C++ 2020 DIS' standard
note: use 'gnu++20' for 'ISO C++ 2020 DIS with GNU extensions' standard

It bailed out ok giving the error.
Comment 18 Sergei Trofimovich (RETIRED) gentoo-dev 2020-03-17 09:35:38 UTC
(In reply to Anton Gubarkov from comment #17)
> When I read the rationale to add -Werror to flagomatic, it seems that it was
> a workaround for clang giving warnings on unsupported flags.

My understanding is that clang still has many flags that it ignores but accepts for "compatibility" with gcc.

$ clang a.c -o a --param=l1-cache-line-size=64
clang-10: warning: argument unused during compilation: '--param=l1-cache-line-size=64' [-Wunused-command-line-argument]

We might end up doing one of:
- dropping -Werror and live with warnings. that might break some picky build systems, but is should not be too much worse as most ebuilds don't filter CFLAGS at all and thus already these warnings.
- changing -Werror to more targeted -Werror=unused-command-line-argument
- detecting and using -Wunknown-cuda-version, similar to what we do with -Qunused-arguments
Comment 19 Larry the Git Cow gentoo-dev 2020-03-20 22:33:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab8fe14ae2e9110faa85ca1c4528b470c0be1535

commit ab8fe14ae2e9110faa85ca1c4528b470c0be1535
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-03-20 22:28:19 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-03-20 22:33:36 +0000

    flag-o-matic.eclass: don't use -Werror in test-flag-PROG(), bug #712488
    
    -Werror filters out too much (everything) if used compiler happens
    to always generate warnings. Let's drop cosmetic stripping of
    ignored flags until we really need it. Then we can consider more
    selective filtering by using more targeted -Werror= options.
    
    Reported-by: Anton Gubarkov
    Closes: https://bugs.gentoo.org/712488
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 eclass/flag-o-matic.eclass   | 19 ++++++++-----------
 eclass/tests/flag-o-matic.sh | 10 ++++++----
 2 files changed, 14 insertions(+), 15 deletions(-)
Comment 20 Larry the Git Cow gentoo-dev 2020-03-26 07:51:04 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5003d48705fa9b501022d4e6326c8f516a2eec0

commit a5003d48705fa9b501022d4e6326c8f516a2eec0
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-03-26 07:49:07 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-03-26 07:50:41 +0000

    flag-o-matic.eclass: revert "don't use -Werror in test-flag-PROG(), bug #712488"
    
    This reverts commit ab8fe14ae2e9110faa85ca1c4528b470c0be1535.
    Triggers build failures on sys-libs/compiler-rt-sanitizers.
    
    Reported-by: Craig Andrews
    Bug: https://bugs.gentoo.org/714742
    Bug: https://bugs.gentoo.org/712488
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 eclass/flag-o-matic.eclass   | 19 +++++++++++--------
 eclass/tests/flag-o-matic.sh | 10 ++++------
 2 files changed, 15 insertions(+), 14 deletions(-)
Comment 21 Sergei Trofimovich (RETIRED) gentoo-dev 2020-03-26 07:52:34 UTC
Removal of -Werror caused bug #714742. We'll need to fix that first to re-apply again.
Comment 22 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-03-26 08:02:38 UTC
The clang warning is fixed in 10.0.0.  It would really be appreciated if you had reported the clang problem earlier instead of debating how to workaround it.  It would certainly have saved me from requesting a last minute backport.
Comment 23 Sergei Trofimovich (RETIRED) gentoo-dev 2020-03-26 08:07:55 UTC
(In reply to Michał Górny from comment #22)
> The clang warning is fixed in 10.0.0.

In my opinion strip-unsupported-flags should not rely on warning-free output of a compiler.

> It would really be appreciated if you
> had reported the clang problem earlier instead of debating how to workaround
> it.  It would certainly have saved me from requesting a last minute backport.

I did not see it as a clang problem.
Comment 24 Larry the Git Cow gentoo-dev 2020-03-26 08:24:05 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c5a9175843ce79427b04a5f23927a415d78d057

commit 9c5a9175843ce79427b04a5f23927a415d78d057
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-03-26 08:22:50 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-03-26 08:23:59 +0000

    flag-o-matic.eclass: document assumptions and limitations of test-flag-PROG()
    
    Bug: https://bugs.gentoo.org/712488
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 eclass/flag-o-matic.eclass | 11 +++++++++++
 1 file changed, 11 insertions(+)
Comment 25 Larry the Git Cow gentoo-dev 2022-07-26 04:46:52 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b535e8f1ed0f6afd8e23e0e0c99b65bea6163f6

commit 4b535e8f1ed0f6afd8e23e0e0c99b65bea6163f6
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-26 04:41:01 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-26 04:41:22 +0000

    flag-o-matic.eclass: add bug references re -Qunused-arguments
    
    To ensure we pay attention to these if changing in future (like I've been wondering
    about)
    
    Bug: https://bugs.gentoo.org/712488
    Bug: https://bugs.gentoo.org/714742
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/flag-o-matic.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)