From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52782 invoked by alias); 17 Mar 2015 06:37:30 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 52772 invoked by uid 89); 17 Mar 2015 06:37:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-yh0-f46.google.com Received: from mail-yh0-f46.google.com (HELO mail-yh0-f46.google.com) (209.85.213.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 17 Mar 2015 06:37:28 +0000 Received: by yhjf44 with SMTP id f44so163386yhj.3 for ; Mon, 16 Mar 2015 23:37:27 -0700 (PDT) X-Received: by 10.236.140.163 with SMTP id e23mr65477013yhj.155.1426574246924; Mon, 16 Mar 2015 23:37:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.170.86.194 with HTTP; Mon, 16 Mar 2015 23:37:06 -0700 (PDT) In-Reply-To: <55071E4C.7000602@gjlay.de> References: <54F4BCA1.7080707@gjlay.de> <20150303132144.GC24277@atmel.com> <54FDC417.1000008@gjlay.de> <54FF0788.6050108@gjlay.de> <55071E4C.7000602@gjlay.de> From: Denis Chertykov Date: Tue, 17 Mar 2015 06:37:00 -0000 Message-ID: Subject: Re: [patch,avr]: Part5: Fix various problems with specs and specs file generation. To: Georg-Johann Lay Cc: Senthil Kumar Selvaraj , GCC Patches , Joerg Wunsch Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-03/txt/msg00862.txt.bz2 2015-03-16 21:17 GMT+03:00 Georg-Johann Lay : > This patch introduces a new avr specific command option '-nodevicelib' so > that linking of libdev.a can be bypassed. > > The argument of -specs= is suffixed by %s instead of supplying the absolute > path. That way -specs= works with installation path that contains spaces. > > avr_mct_t.library_name and its initializers in avr-mcus.def are cleaned up. > > This field was used to define __AVR_DEV_LIB_NAME__. If no device macro is > defined because a device is not supported by avr-gcc, that hook macro can be > defined to tell avr/io.h where to find the device's header file. > > This means it is pointless to define __AVR_DEV_LIB_NAME__ in avr-gcc: > > If a device is supported, the device macro (e.g. __AVR_ATmega8__) is defined > and __AVR_DEV_LIB_NAME__ will never be used. > > The patch adds more help text to the device specs file to inform a potential > reader about the role of the hook macro __AVR_DEV_LIB_NAME__. > > The patch also removes specs known to GCC and which don't directly depend on > the device from the device specs file. This makes the specs file smaller > and easier less confusing. > > Ok for trunk? > > Johann > > > PR target/65296 > * config/avr/avrlibc.h (LIB_SPEC, LIBGCC_SPEC) [AVR1]: Don't link > libgcc.a, libc.a, libm.a. > * config/avr/specs.h: Same. > * config/avr/gen-avr-mmcu-specs.c (print_mcu): Don't print specs > which don't (directly) depend on the device. Print more help. > (*avrlibc_devicelib) [-nodevicelib]: Don't link libdev.a. > (*cpp): Don't define __AVR_DEV_LIB_NAME__. > * config/avr/driver-avr.c: Remove -nodevicelib from option list in > case of an error. > (avr_devicespecs_file): Use suffix "%s" instead of absolute path. > for specs file name instead of absolute path. > * config/avr/avr-arch.h (avr_mcu_t) [.library_name]: Remove. > * config/avr/avr-mcus.def: Same: Adjust initializers. > * config/avr/avr.opt (-nodevicelib): New option. > * doc/invoke.texi (AVR Options): Document it. > Please apply. Denis.