From patchwork Fri Jan 26 21:28:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Wilson X-Patchwork-Id: 866606 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-472136-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="BM5NhLBW"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zSsTZ23gpz9sNr for ; Sat, 27 Jan 2018 08:28:31 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=u1/kYLc5lxj/ 7Pq6Vgk1LwEopTg6wLdCT/FWKOiVFfvxap6+PVLJPaqrQFdrl2ruZ4cHFTGX9GNK hKagq0nWorU7O1jOm8xULQ4Ul/EbdA8mV3xP++wCYsen4kALm6+dmMoFzK/UPU6E x16A38l1BHCk6seo7ADk8xMNXsHSow8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; s=default; bh=cnNjN5RGNdkEFjWnLx WIC1yJCH4=; b=BM5NhLBWywpVLT0pNyrWw0F2Sm+Yj4qCNMjLJwgM5OrjEC4yIW zslOcqnRtXP47r/89z2gK4NXdIetYsd6fSZRNu1vq2C/yiXRxUeil9LDIuI8XI1r 1RxEjK/bEGcc7PPxtjMeBcZ7d0w2b7BGbVqoWX14p4fU26UoM2sP8dFIk= Received: (qmail 14623 invoked by alias); 26 Jan 2018 21:28:22 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 14613 invoked by uid 89); 26 Jan 2018 21:28:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pf0-f195.google.com Received: from mail-pf0-f195.google.com (HELO mail-pf0-f195.google.com) (209.85.192.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 26 Jan 2018 21:28:20 +0000 Received: by mail-pf0-f195.google.com with SMTP id t12so1095429pfg.2 for ; Fri, 26 Jan 2018 13:28:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MlWupyAxzqCHBd9nyDmuDpiVNR6fKSvJIoa3e8A2Owk=; b=bU5ZVR28dJq0KlQL/dLy26fCcCQLI3RwUTFrr30sZ2WaRR+zazx4XDtnjVslFgUaCp x7KH8BxMi9+wTp0laeohjEO3vXzfT/ekIAYAEvJiekxzE7kZnYUUVvIYkB89kDngZMs7 zoGh9TvFbq1PVlPnPwhcwTtEmrL4diHiG/nzp1/V8+j4JTN40xfJ9NR2/2UleJFHqcxV LODJqSUWLWHSYZ6iC90bwnxiePxG0m8FB8j8+9bhZIh03QV0u7S8JcSGPQAJ/1vYqCpQ muT4wA+KBRXUcBCtzYRqWHh4pUYyp1AAIsSSuWp8JxM9XDnHWDs6NGsX9QaD3w3D8NC5 OtnQ== X-Gm-Message-State: AKwxytfhKHMPWKs9j06H1sfVrVNyHNarG5BAVRbflZlbvquURZNS1iG+ tNhF+a9vcaOb9EBcr1JHPwnzr9DCMXQ= X-Google-Smtp-Source: AH8x226EYi+eRqpHMwNLylqoHV28vKaLpEvhxdukV5zqZtwGOHqqZ3FMziEUzfx7ayJnXxcEvrZDIA== X-Received: by 2002:a17:902:4222:: with SMTP id g31-v6mr15199775pld.203.1517002098590; Fri, 26 Jan 2018 13:28:18 -0800 (PST) Received: from rohan.internal.sifive.com ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id e67sm21318017pfd.23.2018.01.26.13.28.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jan 2018 13:28:18 -0800 (PST) From: Jim Wilson To: gcc-patches@gcc.gnu.org Cc: Jim Wilson Subject: [PATCH] RISC-V: Add --specs=nosys.specs support. Date: Fri, 26 Jan 2018 13:28:14 -0800 Message-Id: <20180126212814.22324-1-jimw@sifive.com> This makes --specs=nosys.specs work correctly. Without this patch, libnosys is ignored because libgloss gets pulled in first. We may have to revisit this in the future when we have some proper BSPs defined for various RISC-V hardware. Meanwhile, adding libgloss by default makes things easier for inexperienced users and I don't want to break that. This was tested with a testsuite run for a newlib target, there were no regressions. Also tested by hand to verify that --specs=nosys.specs works correctly. Committed. Jim gcc/ * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs specified. --- gcc/config/riscv/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/riscv/elf.h b/gcc/config/riscv/elf.h index 43ad68bbdf2..f39e83234d2 100644 --- a/gcc/config/riscv/elf.h +++ b/gcc/config/riscv/elf.h @@ -24,7 +24,7 @@ along with GCC; see the file COPYING3. If not see /* Link against Newlib libraries, because the ELF backend assumes Newlib. Handle the circular dependence between libc and libgloss. */ #undef LIB_SPEC -#define LIB_SPEC "--start-group -lc -lgloss --end-group" +#define LIB_SPEC "--start-group -lc %{!specs=nosys.specs:-lgloss} --end-group" #undef STARTFILE_SPEC #define STARTFILE_SPEC "crt0%O%s crtbegin%O%s"