From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8553 invoked by alias); 4 Mar 2013 16:12:59 -0000 Received: (qmail 8524 invoked by uid 22791); 4 Mar 2013 16:12:56 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pb0-f44.google.com (HELO mail-pb0-f44.google.com) (209.85.160.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Mar 2013 16:12:36 +0000 Received: by mail-pb0-f44.google.com with SMTP id wz12so3164766pbc.31 for ; Mon, 04 Mar 2013 08:12:35 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.68.50.231 with SMTP id f7mr8545130pbo.221.1362413555533; Mon, 04 Mar 2013 08:12:35 -0800 (PST) Received: by 10.68.239.8 with HTTP; Mon, 4 Mar 2013 08:12:35 -0800 (PST) Date: Mon, 04 Mar 2013 16:12:00 -0000 Message-ID: Subject: Separate CFLAGS for libgcc? From: Fanael Linithien To: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2013-03/txt/msg00021.txt.bz2 Hi, Is it possible to build libgcc with different CFLAGS than the rest of the target libraries? Specifically, I want to build the target libraries with -flto, but omit that option for libgcc, because LTO infos in libgcc cause errors like this one when linking programs: `__Unwind_Resume' referenced in section `.text' of ccAtADcl.lto.o: defined in discarded section `.text' of unwind-dw2.o (symbol from plugin) Even if not for the errors, I'd still like to know how can I e.g. build libgcc with -Os, but other libraries (especially libstdc++) with -O2.