From nobody Sat Sep 23 07:53:40 2023 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rt1bp1ZS1z4vDsW for ; Sat, 23 Sep 2023 07:53:42 +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 4Rt1bn6Svgz4NcX for ; Sat, 23 Sep 2023 07:53:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695455621; a=rsa-sha256; cv=none; b=Qbz4WhxKwcDI82XeUaG+U3ATBg5O3cS46lYzidQiIsGUKPav6OzZaYaDC9Qx9r7UVXLb4V 1Sx4iPdTmmtXLerFxMeG6nW+8rBBdwdCINuqMnJDej5HcrfZxeyUZIFrns0ZS8LsHVG5lW 9iKA9Dwpex3ytwWa395l9IpM/xb4lnQ3ig7qFtfNRIeDZL982p9nbg4FPasOUZNgZJF8MD kWfNz7HeQsdmntvg+o4ygKbMyuVlSwnsUDAxATvxTZtmQKjsrQEatWvGOH7gCC4utmA0b/ 9ZvUeIpuL7LStOngiHxbXjnB7ipQDbwE4fp17X36MLCVtM/Ou5lPLO/DJSdv+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695455621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S8NJ2PReOEnwvNTAiBIPuvVy4OzrblMlphziIOBg7ZE=; b=NawUZvE8Me5WRJ0ukQXVyYcRw9e3ST6ZrqcMQKP0u+Odh487lmF/vTRoh1RS1ngxDub1i/ 0p6ACEHpFy0//Fc7H9TdlnLUr9ZB6aTUnl4yfLh/jQz/SUueUh99CUgUgkXoawbGmQqdus mn5RLxXFgp7un8Y9V/XA3qtPGp5ycaELrp1CuiyTreOAN4jRIMI44nPR3IwwYBJsEOv67+ ++q+uYjWvmtQkx/N8Ja9oBTDkr97QWhrFTbadMSLm2wbvOEcj/hUPH956cZnG2T+Oqn9TL Nd2NC5b1Y7Q1M/dd9iy5LsVvoSKiThFLkaaIOAPLjEPtpix+Q5qGw3CdScekEg== 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 4Rt1bn5Z7lzwWV for ; Sat, 23 Sep 2023 07:53:41 +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 38N7rf5l037121 for ; Sat, 23 Sep 2023 07:53:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 38N7rfak037120 for ports-bugs@FreeBSD.org; Sat, 23 Sep 2023 07:53:41 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 274041] lang/gcc10 lang/gcc11 lang/gcc11-devel lang/gcc12 lang/gcc12-devel lang/gcc13 lang/gcc13-devel lang/gcc14-devel: fix build with libc++ 17 Date: Sat, 23 Sep 2023 07:53:40 +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: salvadore@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 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 List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274041 Bug ID: 274041 Summary: lang/gcc10 lang/gcc11 lang/gcc11-devel lang/gcc12 lang/gcc12-devel lang/gcc13 lang/gcc13-devel lang/gcc14-devel: fix build with libc++ 17 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: salvadore@freebsd.org Reporter: dim@FreeBSD.org Flags: maintainer-feedback?(salvadore@freebsd.org) Assignee: salvadore@freebsd.org When building relatively recent gcc ports (with C++ in them) against libc++= 17, you get errors similar to: In file included from /wrkdirs/usr/ports/lang/gcc12/work/gcc-12.2.0/gcc/cp/module.cc:208: In file included from /wrkdirs/usr/ports/lang/gcc12/work/gcc-12.2.0/gcc/system.h:239: In file included from /usr/include/c++/v1/vector:321: In file included from /usr/include/c++/v1/__format/formatter_bool.h:20: In file included from /usr/include/c++/v1/__format/formatter_integral.h:32: In file included from /usr/include/c++/v1/locale:202: /usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute only app= lies to structs, variables, functions, and namespaces 546 | _LIBCPP_INLINE_VISIBILITY | ^ /usr/include/c++/v1/__config:813:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY' 813 | # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI | ^ /usr/include/c++/v1/__config:792:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI' 792 |=20=20=20=20=20=20=20=20=20=20 __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER)))) | ^ In file included from /wrkdirs/usr/ports/lang/gcc12/work/gcc-12.2.0/gcc/cp/module.cc:208: In file included from /wrkdirs/usr/ports/lang/gcc12/work/gcc-12.2.0/gcc/system.h:239: In file included from /usr/include/c++/v1/vector:321: In file included from /usr/include/c++/v1/__format/formatter_bool.h:20: In file included from /usr/include/c++/v1/__format/formatter_integral.h:32: In file included from /usr/include/c++/v1/locale:202: /usr/include/c++/v1/__locale:547:37: error: expected ';' at end of declarat= ion list 547 | char_type toupper(char_type __c) const | ^ /usr/include/c++/v1/__locale:553:48: error: too many arguments provided to function-like macro invocation 553 | const char_type* toupper(char_type* __low, const char_type* __h= igh) const | ^ /wrkdirs/usr/ports/lang/gcc12/work/gcc-12.2.0/gcc/../include/safe-ctype.h:1= 46:9: note: macro 'toupper' defined here 146 | #define toupper(c) do_not_use_toupper_with_safe_ctype | ^ This is because gcc/system.h includes safe-ctype.h which redefines ctype ma= cros such as toupper, tolower, etc to "poison" them. However, it should only include the safe-ctype.h header *after* any C++ headers, such as , , , etc, otherwise these might transitively include internal ctype headers (such as with libc++ 17), causi= ng the above conflicts. Here is a patch that moves the safe-ctype.h inclusion to later in gcc/syste= m.h, which solves this issue, and makes it possible to build against libc++ 17. --=20 You are receiving this mail because: You are the assignee for the bug.=