From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by sourceware.org (Postfix) with ESMTPS id D346C3857C49 for ; Tue, 4 Aug 2020 20:50:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D346C3857C49 Received: by mail-il1-x131.google.com with SMTP id x1so15145818ilp.7 for ; Tue, 04 Aug 2020 13:50:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=XQGUNqVWx8RH3KjcMhPKTgmMGAnlfCoQVbJw2uFYyrI=; b=Kl3clA36YSJIG8E893Z+zQ7MhzY1N8q2AlTC7Kr8yn2I3STRVJYMP7iftzNmJGg8JS i+7UA6BYmxKMndv3WqGpXez90PLNzx8z165C+gGj66PxrJEVfqTr0uu52uifF/9hKq2e NQspAYcoNb6mhAfPm4vYjGvv7fN9VKg/oPLkFSjDGaba0I7PNq/pSquUh5JZHjdnepeO ge4vFvSI/JvEUGnqfL8Kd0jTL+PbWLd3rP8m07IkqQ0o08le7kiEGpsVJcne42aIkGK9 Zv3GFUYpDy3MIz/eBx2lkz3Ipwbcv6tqNAbeBTjTRRFwTJNzolxt8/BcYlX8s21peyIf 1Jyg== X-Gm-Message-State: AOAM533QS4Ylm8LlSMD6zcTO8jjoPO+hyTNFJE7T8UQy4fMGargjr7XH 5KrD1Bl428xPcKRJYJ2aRtVESyKKSG+RITId5rY= X-Google-Smtp-Source: ABdhPJxaMZCdk9bBT3IJ0755ZeUCA40Zy8vULGZUmWQeESUrMq2WRD1GJ/GXY6nnXcy5HLHL2jAJxSXR9nqAdCxpRB4= X-Received: by 2002:a92:c805:: with SMTP id v5mr343040iln.134.1596574258652; Tue, 04 Aug 2020 13:50:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Tue, 4 Aug 2020 21:50:47 +0100 Message-ID: Subject: Re: Reducing size of GCC installation? To: "Thompson, Matt (GSFC-610.1)[SCIENCE SYSTEMS AND APPLICATIONS INC]" Cc: "gcc-help@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2020 20:51:00 -0000 On Tue, 4 Aug 2020 at 20:28, Thompson, Matt (GSFC-610.1)[SCIENCE SYSTEMS AND APPLICATIONS INC] via Gcc-help wrote: > > All, > > This might be a FAQ, but my Google-fu is being stymied by the fact that m= y searches are often finding issues about making executables, etc. made by = GCC smaller rather than my issue: making GCC itself smaller. > > To wit, I'm trying to build some Docker images and found that the code I'= m eventually trying to build with gcc (gfortran, actually) doesn't like the= versions from RPMs/DEBs/etc. So, my first step is usually to do what I'm q= uite used to and build GCC a la: > > ../gcc-10.2.0/configure --prefix=3D$HOME/GCC/10.2.0 --disable-multilib = --enable-languages=3Dc,c++,fortran If you're not going to need them you can disable a number of features: --disable-nls --disable-libstdcxx-pch --disable-libcc1 --disable-libsanitizer --disable-libssp --disable-libgomp --disable-libvtv --disable-libstdcxx-filesystem-ts I wouldn't recommend this one, despite shrinking the size of libstdc++.so and libstdc++.a, because it is an ABI break: --disable-libstdcxx-dual-abi If this one still works it would also be an ABI break (and make C++ code compile slower): --disable-extern-template