From owner-freebsd-ports-bugs@freebsd.org Sat May 15 19:50:10 2021 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B2D264E407 for ; Sat, 15 May 2021 19:50:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4FjGFt108pz3jpn for ; Sat, 15 May 2021 19:50:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 21F3C64E386; Sat, 15 May 2021 19:50:10 +0000 (UTC) Delivered-To: ports-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 21BA464E406 for ; Sat, 15 May 2021 19:50:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FjGFt0P2Tz3k7K for ; Sat, 15 May 2021 19:50:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA1BF3788 for ; Sat, 15 May 2021 19:50:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 14FJo9fT054212 for ; Sat, 15 May 2021 19:50:09 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 14FJo9qi054210 for ports-bugs@FreeBSD.org; Sat, 15 May 2021 19:50:09 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 255913] devel/aws-c-common: let CMake detect -moutline-atomics correctly Date: Sat, 15 May 2021 19:50:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dim@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: danilo@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 May 2021 19:50:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255913 Bug ID: 255913 Summary: devel/aws-c-common: let CMake detect -moutline-atomics correctly Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: danilo@FreeBSD.org Reporter: dim@FreeBSD.org Assignee: danilo@FreeBSD.org Flags: maintainer-feedback?(danilo@FreeBSD.org) Created attachment 224980 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D224980&action= =3Dedit Let CMake detect -moutline-atomics correctly During an exp-run for llvm 12 (see bug 255570), it turned out that security/aws-c-cal does not build with clang 12.0.0 [1], at least not on am= d64: -- The C compiler identification is Clang 12.0.0 [...] -- Performing Test HAS_MOUTLINE_ATOMICS -- Performing Test HAS_MOUTLINE_ATOMICS - Success [...] FAILED: CMakeFiles/aws-c-cal.dir/source/der.c.o=20 /usr/bin/cc -DAWS_CAL_EXPORTS -DAWS_CAL_USE_IMPORT_EXPORT -DAWS_COMMON_USE_IMPORT_EXPORT -DHAVE_SYSCONF -Daws_c_cal_EXPORTS -I/wrkdirs/usr/ports/security/aws-c-cal/work/aws-c-cal-0.4.5/include -isyst= em /usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing= -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -Wall -Werror -Wstrict-prototypes -fno-omit-frame-pointer -pedantic -Wno-long-long -fPIC -moutline-atomics -Wgnu -Wno-gnu-zero-variadic-macro-arguments -fvisibility=3Dhidden -std=3Dgnu99 -MD -MT CMakeFiles/aws-c-cal.dir/source/= der.c.o -MF CMakeFiles/aws-c-cal.dir/source/der.c.o.d -o CMakeFiles/aws-c-cal.dir/source/der.c.o -c /wrkdirs/usr/ports/security/aws-c-cal/work/aws-c-cal-0.4.5/source/der.c cc: error: The 'x86_64' architecture does not support -moutline-atomics; fl= ag ignored [-Werror,-Woption-ignored] This port uses /usr/local/lib/cmake/AwsCFlags.cmake to detect the -moutline-atomics flag, but it does so by checking if the compiler prints an *error* when using the flag. It could be debated that CMake's check_c_compiler_flag() functionality is rather broken in that sense, as it does not exhaustively scan for warnings from the compiler. On the other hand, security/aws-c-cal compiles with -Werror, so then you ge= t an error for such warnings. Instead of hacking around it in security/aws-c-cal= , I propose to fix it in devel/aws-c-common instead, simply by adding -Werror to the HAS_MOUTLINE_ATOMICS check. This will ensure that it does *not* get enabled on x86, where it is not functional, and will still get enabled on e.g. aarch64, for which this flag= is meant. [1] http://package22.nyi.freebsd.org/data/mainamd64PR255570-default/2021-05-08_= 16h02m24s/logs/errors/aws-c-cal-0.4.5.log --=20 You are receiving this mail because: You are the assignee for the bug.=