From patchwork Thu Apr 6 11:41:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yash Shinde X-Patchwork-Id: 80213 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp956296vqo; Thu, 6 Apr 2023 04:43:40 -0700 (PDT) X-Google-Smtp-Source: AKy350YPb9dF0YO0MBdlO+Pzv90/u6cP58u8ZKr7lPs8PXS9qVnuj6aDI3jwIhNZONlXklC5JFx6 X-Received: by 2002:a17:907:80c:b0:949:64d1:ef87 with SMTP id wv12-20020a170907080c00b0094964d1ef87mr5938947ejb.55.1680781420681; Thu, 06 Apr 2023 04:43:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680781420; cv=none; d=google.com; s=arc-20160816; b=WRQhiONl+KfNm65kttfvSxnWHlDfUpBg+k2eufZpWHX7bVE/Yo+5QX878fgFIs5lmJ rmkZxQJFQafMfIdwEwqMCu6oBvxnWDi9QWXkeyUlonwYn6vxUQBfTZ94oCvukMlT0Rey gu+/HvxzuRHd+ssmI4JXcezqMtjID/oD3eXlDYZ4LU+QNO5ZPaNzHZuJO9BjxJ62FAUH eHSiYXw6apKTopihP8t+PS6poeizY/JFZfFF6rj6A20Nxj4Mp4kSPyqbdGgdsN4VBfQh uCP2ebFiMnOFN0a2ISAWu4aWa07Q7+W1SaFYp+i4HuD/aAvc1wlOfM+CFc0LR3v41Xko uwfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=wSJEp3ciLu5TvAn1mCjM4W2xp4qJAz8a31ORj0P1HM4=; b=onwozQYEQ88AcSJc/8lMqw1IZgFHv8QSe4rQAyiEFCnNmkvhDhvjtGmmbGbi1aDQAl 9z7EFIVuCNuG56KtepYaVwO+rt7SUvDKDIMYBxlFiEP0nKVYwVIkCb9KpzZedlXXaO6V 9ANCsMm9/dnJudxCwzb/ThFtPrIQnxmYDGNF2DX36jJsKmYhNZ0Ije9lp3SkAKO29kax 8rzQxZjYWaU8o1gy0hzyzkm6AakgKhG+R7GzDuUTevx87OU17Kxp/R9LdyaCvfBkTW6r qHYXYEcgv14uUgectIK/ow0/Pg5c6LWQQSQZs16B+gR40Uf11Txk6EzcDx3Z2e7wfAv/ eORw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=omj25ud0; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id e8-20020a170906c00800b00946872f37c6si996883ejz.450.2023.04.06.04.43.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 04:43:40 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=omj25ud0; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 42B86385840F for ; Thu, 6 Apr 2023 11:43:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 42B86385840F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680781419; bh=wSJEp3ciLu5TvAn1mCjM4W2xp4qJAz8a31ORj0P1HM4=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=omj25ud0+IAaQUq1LFkYNKaQSm8eZZb07dpoxfjHdFQ93mMjNT6E0Q8svacQVA/s+ XVqMFCdGXaAKfXK/IXHE6kFH0BqVCiuXziWcOzmoNLZqd7URFT9YFZT8TPGW5z88DQ an+fjNFd6ET9GTDyMz5lCyGQao4jXUKuNW/hPYzc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by sourceware.org (Postfix) with ESMTPS id 16DA13858D32 for ; Thu, 6 Apr 2023 11:42:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 16DA13858D32 Received: by mail-pj1-x1032.google.com with SMTP id l7so36978186pjg.5 for ; Thu, 06 Apr 2023 04:42:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680781373; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wSJEp3ciLu5TvAn1mCjM4W2xp4qJAz8a31ORj0P1HM4=; b=zEESuWQwJEQAzRuPkaAL5PtW2UQk8mrLw0Q0z95Fs9rR971xN2818bXQpOs3cXAdWj snY0kFXglotdsU6tdDunzZey/XZWNgksS9nFHHU6DsSS8dCbSrOTwtSf6Jmb7Uu84Tz3 /Rnt3DIxxOqdFwQHVx0MNtR46J54c9zIo6WvRieIQrMqYLoIkegIwMfpljykcknQFrml UQCHz4w5RZth3XHRfm98XMlFgmeO3/ihIXCd4C+PYM1/UD4Wq0E5w+nqIYRPT5Wmo1AZ FEixl/JtH7Z7cACNW08apgNh2DH/hy9netdtTOn0Z1kIY0JdB3CRAX6nXRY8D+9dhNkV 4dpA== X-Gm-Message-State: AAQBX9cJeBfOgF4Quehg8o4zjFdzdf9ri5JuVL5Fpd3paw+Tzy7lYBAB W1wbMlOyXs4fI3yEg/tfxfzMTL/xufmh8w== X-Received: by 2002:a05:6a20:6aa1:b0:da:aaec:9455 with SMTP id bi33-20020a056a206aa100b000daaaec9455mr2382836pzb.43.1680781373352; Thu, 06 Apr 2023 04:42:53 -0700 (PDT) Received: from bft-2.. ([49.204.85.206]) by smtp.gmail.com with ESMTPSA id c8-20020aa781c8000000b00593e84f2d08sm1211314pfn.52.2023.04.06.04.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 04:42:52 -0700 (PDT) X-Google-Original-From: Khem Raj To: gcc-patches@gcc.gnu.org Cc: raj.khem@gmail.com, Yash.Shinde@windriver.com Subject: [PATCH] gcc: armv4: pass fix-v4bx to linker to support EABI. Date: Thu, 6 Apr 2023 17:11:58 +0530 Message-Id: <20230406114158.3182468-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Khem Raj via Gcc-patches From: Yash Shinde Reply-To: Khem Raj Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762427058958034567?= X-GMAIL-MSGID: =?utf-8?q?1762427058958034567?= The LINK_SPEC for linux gets overwritten by linux-eabi.h which means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result the option is not passed to linker when chosing march=armv4 This patch redefines this in linux-eabi.h and reinserts it for eabi defaulting toolchains. Signed-off-by: Khem Raj Signed-off-by: Yash Shinde --- gcc/config/arm/linux-eabi.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- gcc/config/arm/linux-eabi.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h index a119875599d..e8b64c17b01 100644 --- a/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h @@ -88,10 +88,14 @@ #define MUSL_DYNAMIC_LINKER \ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" +/* For armv4 we pass --fix-v4bx to linker to support EABI */ +#undef TARGET_FIX_V4BX_SPEC +#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}" + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to use the GNU/Linux version, not the generic BPABI version. */ #undef LINK_SPEC -#define LINK_SPEC EABI_LINK_SPEC \ +#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \ LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)