From nobody Fri Jul 14 20:25:03 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 4R2jdX6b40z4mZFh for ; Fri, 14 Jul 2023 20:25:04 +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 4R2jdX1YkFz3Dd9 for ; Fri, 14 Jul 2023 20:25:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689366304; 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=t0da05Mwt9Edq0bJMoUu/Y/MokBcduB+lF81xLijDDQ=; b=SHFlULlRShUOf3aVKm1ocKWJVBBpsB2mylhtnMQ3zEM/ppVxgTVNr/AHOLnaHVnbj1qSE6 45/Bqu+eZgaYnASkpCiI4oYR3zq2J23OiB8buySUY63ZUQs9ZfITQRz229HKcupX7ci7Pb Umnh0+9sgSghhQpaiIxpURzSfh1ZnOU5+hwWiw2H0wlnj07FLMjctoeZ5QHEmKm2kEjvob +UiBFOSr5f2o87efhRBmzBi2K4wMl5Xc56rtZCsFMWqTJv2zk/2nr6KMD+7ZCzSpmkzkvn RjjyYUn/OJNIKEJIwA/lfilhcDDUFg3ubdW/iV6kbFSG9L6z1LcDNPidbRVS5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689366304; a=rsa-sha256; cv=none; b=DhCR2WOY9QybAWP4LExtuiOEp8E0w/cLcXSAHysv7kPS+P3N+cwtlkaj+D8LwCUFh3szXu cbq2Vb2lgGvx5Xgm1v2eqTp0zY8dxZ63+QBrjf707+fJbPzhV7Y72Mm7sflAii+FlaAcBt h4U1AHAKXe+MDcNaEtW6wQN0YusbkCPUEE5s7hOLRuAKQENCqEfRTGJag5xHlWseNWJhol 3bwUVJAG3kHb11w9bR2C/6q08PeJ0FY9UT4z03ujKI4jpXsac0WO4Jy/k21yiCIib0Jsjs jX+xVEX3rCnb3Op0pUTIX1+1+GWgg/BmLhVnyD778MAZErh1h6MW8QwqUGSRHw== 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 4R2jdW66GHzXR5 for ; Fri, 14 Jul 2023 20:25:03 +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 36EKP3WK002678 for ; Fri, 14 Jul 2023 20:25:03 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 36EKP393002677 for ports-bugs@FreeBSD.org; Fri, 14 Jul 2023 20:25:03 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 272508] lang/gcc12: use --enable-link-serialization to avoid memory crunch on multi-core systems Date: Fri, 14 Jul 2023 20:25:03 +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 Some People X-Bugzilla-Who: nicholas.e.taylor@gmail.com 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 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 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 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272508 Bug ID: 272508 Summary: lang/gcc12: use --enable-link-serialization to avoid memory crunch on multi-core systems Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: salvadore@freebsd.org Reporter: nicholas.e.taylor@gmail.com Flags: maintainer-feedback?(salvadore@freebsd.org) Assignee: salvadore@freebsd.org Created attachment 243396 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D243396&action= =3Dedit Add SERIAL_LINK option lang/gcc12, particularly with an LTO bootstrap, can use up a lot of memory = on multi-core systems. A major contributor to the problem is that the slow, memory-hungry LTO link jobs from multiple parallel compilations tend to occ= ur at the same time. GCC 12 configure provides[1] an option, --enable-link-serialization, to set= up dependencies so that those link jobs will not occur in parallel. I found t= hat enabling it on my 16-core system[2] let me build lang/gcc12 with LTO_BOOTST= RAP, without any visits from the OOM reaper: a novel experience for me. The attached patch adds a SERIAL_LINK option to lang/gcc12; when enabled, it sets the --enable-link-serialization configure option. I admit the audience of "Builds lang/gcc12 with LTO_BOOTSTRAP, too many cor= es, and not enough RAM" is pretty niche, but perhaps this will help someone els= e. [1] https://gcc.gnu.org/install/configure.html [2] 16 GB RAM and 40 GB swap --=20 You are receiving this mail because: You are the assignee for the bug.=