From patchwork Tue Oct 26 12:44:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 46660 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 896D03858410 for ; Tue, 26 Oct 2021 12:45:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 896D03858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635252309; bh=qzxmMfrJ/GYd+3YrHBpbWfU80hEFQgvxRw4RvZ1nHtE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=nqwkCii/QcVW/uuFkaiPe3oD8GX+2EGelJfDVBiKHLoeeCkY+K2GP7DRGnZ9kzS99 noKLHdYxNRi+oAz3WX3QbDErntV76Vlbal1ccUGCCkktwm6IFF/8vZzJd8Jrm4LKYI FNkf1F+qy/857TpgW+z8Bk6mN7emyr9Gn8kPvD4k= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id D5A753858403 for ; Tue, 26 Oct 2021 12:44:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D5A753858403 Received: by mail-wm1-x331.google.com with SMTP id y78so8718900wmc.0 for ; Tue, 26 Oct 2021 05:44:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=qzxmMfrJ/GYd+3YrHBpbWfU80hEFQgvxRw4RvZ1nHtE=; b=Qjcgut2MyFzi0JWMJGuJH9nwimYJRjCp07/TOMY96yiZok1yMuQvaoGUN5Z2P0ZNRx 6jJUcQPQcUQwdEIrfVm0YeFjqXRaKiekjU3YaEh95vK8Km+aOwq41+ajatZYeEX2tZjM IlvQ2ZXvbNuD4I6QfX/V6WQHwPwsFxxZeb17rmbE9qOCm8Dr5suIq0BfFgHk/MoRIfDo 3AVKJTonYhnBJx3+5HvI9PtMAy3yzeEXooy51zJmi4nZ35A8psdkAjpewK4RjkKCyYQ7 ubs+mcEGqTLi8gI4CMQhfF+ZSecxshL5b2KNsPtr0sxlYfiCTmv9EcNKY5JY1Ei5sXEW cnNg== X-Gm-Message-State: AOAM532emn0njMhaOR4ITRfv1H4YpIhFbDtaTXAheCZ7mx7X6219d1jy AnjH6RQ1G0H19ekbwIqbjkMqmGwexwbYDw== X-Google-Smtp-Source: ABdhPJyXXyfX1Ei5If8MNZxJ/EFWxOUR1UZiJt7lynx5Xlfy36w4mh+KVaWGU+pvdWJJ7VksKalVLQ== X-Received: by 2002:a05:600c:4fc5:: with SMTP id o5mr6061365wmq.147.1635252278417; Tue, 26 Oct 2021 05:44:38 -0700 (PDT) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:6b9e:385e:1583:4f40]) by smtp.gmail.com with ESMTPSA id n68sm496146wmn.13.2021.10.26.05.44.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 05:44:38 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/4] Makefile.in: Ensure build CPP is used for build targets Date: Tue, 26 Oct 2021 13:44:34 +0100 Message-Id: <20211026124437.3301773-1-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Richard Purdie via Gcc-patches From: Richard Purdie Reply-To: Richard Purdie Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" During cross compiling, CPP is being set to the target compiler even for build targets. As an example, when building a cross compiler targetting mingw, the config.log for libiberty in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log shows: configure:3786: checking how to run the C preprocessor configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=[sysroot]/x86_64-nativesdk-mingw32-pokysdk-mingw32 configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=[sysroot]/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c configure:3876: $? = 0 This is libiberty being built for the build environment, not the target one (i.e. in build-x86_64-linux). As such it should be using the build environment's gcc and not the target one. In the mingw case the system headers are quite different leading to build failures related to not being able to include a process.h file for pem-unix.c. Fix this by using CC_FOR_BUILD instead of CC. Ultimately a CPP_FOR_BUILD could be defined but CC_FOR_BUILD seems at least more correct and is a simpler fix. 2021-10-26 Richard Purdie Changelog: * Makefile.in: Use CC_FOR_BUILD as CPP for build targets to avoid host/target contamination Signed-off-by: Richard Purdie --- Makefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.in b/Makefile.in index 34b2d89660d..f4815d7e75f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -152,6 +152,7 @@ BUILD_EXPORTS = \ AR="$(AR_FOR_BUILD)"; export AR; \ AS="$(AS_FOR_BUILD)"; export AS; \ CC="$(CC_FOR_BUILD)"; export CC; \ + CPP="$(CC_FOR_BUILD) -E"; export CPP; \ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ CXX="$(CXX_FOR_BUILD)"; export CXX; \ From patchwork Tue Oct 26 12:44:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 46661 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 42DDD3858026 for ; Tue, 26 Oct 2021 12:46:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 42DDD3858026 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635252366; bh=xem6XBYPTM+EE/3XBhjHGrkf64bqRN0AcfJQ3bCub/w=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=cS6hX480s36W+uak1YWoYasAla0nRq0tlN8Wj4EDwbsWYrYaHM9CpTEzlaiOjRaOh pluT8ghg330kNSlrqIlpFk1jAM/PMyCXm6pSYtnVCcQltcqsmvN1sVVyxdqW9H4uQ2 z8hV1roV58faGlMhoiabUZV8huKD5iY/f1Lv//D0= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id DF2E23858410 for ; Tue, 26 Oct 2021 12:44:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DF2E23858410 Received: by mail-wr1-x42f.google.com with SMTP id d13so16506299wrf.11 for ; Tue, 26 Oct 2021 05:44:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xem6XBYPTM+EE/3XBhjHGrkf64bqRN0AcfJQ3bCub/w=; b=xn76reUUyM3ZwEs7d//f6PawidOYhTuuaEeiPGP3miOisGa7DpnOWBJvR///YxwYwe DUQD7IWUYOaJXSFt+DjG2CzRgoGP6LbhJ51+urwrN/GtOCCTVy9ayVPvkhCUobjAFF9H 1zlImcJZcZGQ6KFxhoBF9XjfsK59FHF/ZcNnVXtwV/mA+b0Emowor0fPfMXaNvT4ww1g 4mfvF5OzW/1YQz/5YJu1Jj4NzdU9I1V7XCig12rPJRifqDprtFyBSXeByRNel+lJdhpJ 73rqKwKQN8OAPKZBmIz7G4fHOUkJkVDbq/UGWtVAYCm6ZmDLV24Og9nfiIiL5cYf2++8 RxhA== X-Gm-Message-State: AOAM531BZ2G/QJ1lwTpIL4NiY8qOTiFm0PL7iDIv06dPbqRfkthZTPgz Hv86GbH/hdGaw170eDAILrK4HDlMSkdbCA== X-Google-Smtp-Source: ABdhPJxW8VaUbfAvbNml7WlYi3JQh0OBli/fbwanrmTLww1ucn+axBzdjPhgHeE5PNYiK7uuJC8A6g== X-Received: by 2002:a5d:6484:: with SMTP id o4mr31590772wri.337.1635252278734; Tue, 26 Oct 2021 05:44:38 -0700 (PDT) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:6b9e:385e:1583:4f40]) by smtp.gmail.com with ESMTPSA id n68sm496146wmn.13.2021.10.26.05.44.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 05:44:38 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/4] gcc: Fix "argument list too long" from install-plugins Date: Tue, 26 Oct 2021 13:44:35 +0100 Message-Id: <20211026124437.3301773-2-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211026124437.3301773-1-richard.purdie@linuxfoundation.org> References: <20211026124437.3301773-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Richard Purdie via Gcc-patches From: Richard Purdie Reply-To: Richard Purdie Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" When building in longer build paths (200+ characters), the "echo $(PLUGIN_HEADERS)" from the install-plugins target would cause an "argument list too long error" on some systems. Avoid this by calling make's sort function on the list which removes duplicates and stops the overflow from reaching the echo command. The original sort is left to handle the the .h and .def files. 2021-10-26 Richard Purdie gcc/ChangeLog: * Makefile.in: Fix "argument list too long" from install-plugins Signed-off-by: Richard Purdie --- gcc/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 658093c11c0..89482c6dd4e 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -3685,7 +3685,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype # We keep the directory structure for files in config, common/config or # c-family and .def files. All other files are flattened to a single directory. $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) - headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \ + headers=`echo $(sort $(PLUGIN_HEADERS)) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \ for file in $$headers; do \ if [ -f $$file ] ; then \ From patchwork Tue Oct 26 12:44:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 46663 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D456F3857C40 for ; Tue, 26 Oct 2021 12:47:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D456F3857C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635252478; bh=yluJz1Zit088aYQ51yeNWYMFq0i6yV4PPxw6Fl1+WXE=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=frBZR7M6aLj/hk2Q00zqZLjrYnfFKAfH7d4+lNsWuivv2Zivm335euSzC0vSe3tD8 RIzpmfwsb8exlD5pcKplX595qkf2fz8cgCOUcYGZDPrNFElMrSRVzCHXdOKc2DqAt3 tv0n38ftqwjZtCQJ0IDX9NtrfGuJ07X7l9jzSa2o= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 6535C3858415 for ; Tue, 26 Oct 2021 12:44:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6535C3858415 Received: by mail-wr1-x431.google.com with SMTP id v17so17696482wrv.9 for ; Tue, 26 Oct 2021 05:44:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yluJz1Zit088aYQ51yeNWYMFq0i6yV4PPxw6Fl1+WXE=; b=MjWoU316o7iPtN+ddEkHVQgKEQFFdyrauptvdInfGI1yCaghSwYsvGEioh5X8oHzpx YQGUGln4/ji/6NqJ2k44kzLbivNsXfgfRuLR5YsiQJIxyfxV8RxavC8K5rs3d9syJSS5 ryduoo0aC+KErU4ntwJP0p+CNs6znp9XzI9Zgi6JdvCSpQoDsKXQVs2J2pNoHg7rK39o b1bDZ/EMXwJjvaPbA2TFeYyV0CIT3ixW3c97Lg+TZly8kU9nXZsq3sertSyYDNA8Ap3P IRqmGSqW+rWcU5WrnJBN/rcjdRYmUFffuE5eWXJjv9QSKoa6QuhMq0DblprF9qGnzW4y A8HA== X-Gm-Message-State: AOAM532KvIHAvj4KMY44q8nPHAoD7NMMnVVTwbVv9O9ovt4GPy7K5lOH GwVvsP14mxGjNvxZdZMG3r1auFe3iBPb0A== X-Google-Smtp-Source: ABdhPJxVClGx1xdFUgzlHt+RcbFNFAKCIXmW6PhudKHPOAm+KFO6eLhku8OaufZ/VA9zFloVURVLWQ== X-Received: by 2002:adf:f1d2:: with SMTP id z18mr22543966wro.160.1635252279282; Tue, 26 Oct 2021 05:44:39 -0700 (PDT) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:6b9e:385e:1583:4f40]) by smtp.gmail.com with ESMTPSA id n68sm496146wmn.13.2021.10.26.05.44.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 05:44:38 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 3/4] gcc: Add --nostdlib++ option Date: Tue, 26 Oct 2021 13:44:36 +0100 Message-Id: <20211026124437.3301773-3-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211026124437.3301773-1-richard.purdie@linuxfoundation.org> References: <20211026124437.3301773-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Richard Purdie via Gcc-patches From: Richard Purdie Reply-To: Richard Purdie Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" OpenEmbedded/Yocto Project builds libgcc and the other gcc runtime libraries separately from the compiler and slightly differently to the standard gcc build. In general this works well but in trying to build them separately we run into an issue since we're using our gcc, not xgcc and there is no way to tell configure to use libgcc but not look for libstdc++. This adds such an option allowing such configurations to work. 2021-10-26 Richard Purdie gcc/c-family/ChangeLog: * c.opt: Add --nostdlib++ option gcc/cp/ChangeLog: * g++spec.c (lang_specific_driver): Add --nostdlib++ option gcc/ChangeLog: * doc/invoke.texi: Document --nostdlib++ option * gcc.c: Add --nostdlib++ option Signed-off-by: Richard Purdie --- gcc/c-family/c.opt | 4 ++++ gcc/cp/g++spec.c | 1 + gcc/doc/invoke.texi | 8 ++++++-- gcc/gcc.c | 1 + 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 06457ac739e..ee742c831fd 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -2190,6 +2190,10 @@ nostdinc++ C++ ObjC++ Do not search standard system include directories for C++. +nostdlib++ +Driver +Do not link standard C++ runtime library + o C ObjC C++ ObjC++ Joined Separate ; Documented in common.opt diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c index 3c9bd1490b4..818beb61cee 100644 --- a/gcc/cp/g++spec.c +++ b/gcc/cp/g++spec.c @@ -159,6 +159,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, switch (decoded_options[i].opt_index) { case OPT_nostdlib: + case OPT_nostdlib__: case OPT_nodefaultlibs: library = -1; break; diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 71992b8c597..b30b79ebdc0 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -236,7 +236,7 @@ in the following sections. -ftemplate-backtrace-limit=@var{n} @gol -ftemplate-depth=@var{n} @gol -fno-threadsafe-statics -fuse-cxa-atexit @gol --fno-weak -nostdinc++ @gol +-fno-weak -nostdinc++ -nostdlib++ @gol -fvisibility-inlines-hidden @gol -fvisibility-ms-compat @gol -fext-numeric-literals @gol @@ -633,7 +633,7 @@ Objective-C and Objective-C++ Dialects}. @item Linker Options @xref{Link Options,,Options for Linking}. @gccoptlist{@var{object-file-name} -fuse-ld=@var{linker} -l@var{library} @gol --nostartfiles -nodefaultlibs -nolibc -nostdlib @gol +-nostartfiles -nodefaultlibs -nolibc -nostdlib -nostdlib++ @gol -e @var{entry} --entry=@var{entry} @gol -pie -pthread -r -rdynamic @gol -s -static -static-pie -static-libgcc -static-libstdc++ @gol @@ -16125,6 +16125,10 @@ library subroutines. constructors are called; @pxref{Collect2,,@code{collect2}, gccint, GNU Compiler Collection (GCC) Internals}.) +@item -nostdlib++ +@opindex nostdlib++ +Do not use the standard system C++ runtime libraries when linking. + @item -e @var{entry} @itemx --entry=@var{entry} @opindex e diff --git a/gcc/gcc.c b/gcc/gcc.c index 506c2acc282..abb900a4247 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -1167,6 +1167,7 @@ proper position among the other output files. */ %(mflib) " STACK_SPLIT_SPEC "\ %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \ %{!nostdlib:%{!r:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}}\ + %{!nostdlib++:}\ %{!nostdlib:%{!r:%{!nostartfiles:%E}}} %{T*} \n%(post_link) }}}}}}" #endif From patchwork Tue Oct 26 12:44:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 46662 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4BCD2385801F for ; Tue, 26 Oct 2021 12:47:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4BCD2385801F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635252422; bh=OMEdcI/hbn/Vv9WhyQDYQUWYhT8IDo7OGh3m5+bU7Kc=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=uh4zz8dxEJQrSH2yHwE8ROW78Plyz2bFbvE51bEOuFYgz/Ph+t8CwRe0edZlQvdzW 65kz0mcCHHjS03dxSvRL2aRylA8w4Ut6hkBtZgLRoZQ8a7oIDYEsHANxNUaqH1Ak16 imjcAna6VyBxQMQAlfb18h1Ak8II8W+opIr0lYJY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id BA2833858421 for ; Tue, 26 Oct 2021 12:44:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BA2833858421 Received: by mail-wr1-x435.google.com with SMTP id p14so13025267wrd.10 for ; Tue, 26 Oct 2021 05:44:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OMEdcI/hbn/Vv9WhyQDYQUWYhT8IDo7OGh3m5+bU7Kc=; b=ba9VM/QlBq3XnGbZf3vPAJZRuyNO1jVyklibLjaDZ/urOAf8aVSQxQDm0rKOsn4Iuv 026CJMf4GBz2wGF91e/0YNFi7g+2HFx/3v/+ABlmFVzYCiiYFRd3NbVFdAbYNzxJCn2O rM5V2DPAzYu3WV4vBQjDYWYde1ZUxlOYBmZsBr7sR8iqp3b+TZ9Ux5AWjrE/ZNvNBRPJ uBGKwPBl/2sWZGZu6Jz+0zT790s8LRqxe8JN+sls7OcDEGLpBV33E7ilnug1ntMyOJXF 0RCOPwwmR5yQ9lsHjpCC12WrdDHVTx0WW8qlTdowTelcdIevs4Z86rIRC1Ct+CWy2Ud4 ID7g== X-Gm-Message-State: AOAM532OzzODgjt6JGoQkJFyNEki8AjfkkyXYhtRMaViKNRPaPj4gQO4 NLvt5aELe4wJYaAt8RHDgVAEB3oSUkTtSA== X-Google-Smtp-Source: ABdhPJyqz8lh2quekhs7GE2TQb/HiKJp9hMvalHgOtyNJXF8JY6ZLnLQtmxjfuv9vTXYi4saIQ/Kqw== X-Received: by 2002:adf:fd47:: with SMTP id h7mr28336393wrs.200.1635252279768; Tue, 26 Oct 2021 05:44:39 -0700 (PDT) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:6b9e:385e:1583:4f40]) by smtp.gmail.com with ESMTPSA id n68sm496146wmn.13.2021.10.26.05.44.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 05:44:39 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 4/4] gcc/nios2: Define the musl linker Date: Tue, 26 Oct 2021 13:44:37 +0100 Message-Id: <20211026124437.3301773-4-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211026124437.3301773-1-richard.purdie@linuxfoundation.org> References: <20211026124437.3301773-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Richard Purdie via Gcc-patches From: Richard Purdie Reply-To: Richard Purdie Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Add a definition of the musl linker used on the nios2 platform. 2021-10-26 Richard Purdie gcc/ChangeLog: * config/nios2/linux.h (MUSL_DYNAMIC_LINKER): Add musl linker Signed-off-by: Richard Purdie --- gcc/config/nios2/linux.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h index 08edf1521f6..15696d86241 100644 --- a/gcc/config/nios2/linux.h +++ b/gcc/config/nios2/linux.h @@ -30,6 +30,7 @@ #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1" +#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1" #undef LINK_SPEC #define LINK_SPEC LINK_SPEC_ENDIAN \