From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 5C79F3857C5D for ; Fri, 22 Jul 2022 11:35:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5C79F3857C5D Received: by mail-wr1-x436.google.com with SMTP id m17so5830069wrw.7 for ; Fri, 22 Jul 2022 04:35:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cXycVpMNKVwRl8n8hnksJJIN5KA6GChLhVVOpUWIgkI=; b=48gNg0ovpB9zC8KWRnnTLVnotBbaYG38G0qymKNwuJnxnQG9NNoZ/0SKiOV8VlM7vq XJOBtHG5laY1yo42r58kG1VAwyMM1GhFYlmuVECss/wm6ezDYk/ZYLIVhhTLBtzoQSPq SN38/j4ukbNRtGvgJ3p/J7IQSvqIVky8CdqbkHRxSs8veVyx5wJEFgN3PyUr4MmPEONd mcllWnQXnxC3yY7H5jpISPCKkNlWn3JfpcZYH6ilB+PElPE4WU+7K4MbFiS6z15y8jgM E5AVeg/OGqwE4oU5DOa90xDBtf/jK204wlaE4km6P1aVvDPTnQOmGUVj2sg5aaaZFIIM z3Hw== X-Gm-Message-State: AJIora9J+o9p4CX/f6DcYzn9Wok7gy0ciq+YO8/my1csdoUsq27h6wep IN6jn4xYLh1InSKCcRkZSGY= X-Google-Smtp-Source: AGRyM1tMiVw0hWgE9qOwp2H7FlFzth99n6Nwg39ZcDxFa31h1Fld2Rl7ijIHm/cjdMtAZRN3I8ab4w== X-Received: by 2002:a05:6000:2c9:b0:21d:bd7d:3af6 with SMTP id o9-20020a05600002c900b0021dbd7d3af6mr18594wry.405.1658489742263; Fri, 22 Jul 2022 04:35:42 -0700 (PDT) Received: from [192.168.1.95] (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.googlemail.com with ESMTPSA id bg42-20020a05600c3caa00b003a31b79dc0esm21541013wmb.1.2022.07.22.04.35.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jul 2022 04:35:41 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: Use -ftls-model=local-exec for RTEMS by default? From: Iain Sandoe In-Reply-To: Date: Fri, 22 Jul 2022 12:35:41 +0100 Cc: GCC Development Content-Transfer-Encoding: quoted-printable Message-Id: <8CBF2F47-39E7-433E-B294-ACB5EA95DA76@googlemail.com> References: <2592dc25-bf0-6051-a9d8-68db5c3ad6a7@ispras.ru> <808c2471-af44-605e-05e4-330f08e13206@embedded-brains.de> <55ED194B-0F4D-4551-97D8-A898AA771A1D@googlemail.com> To: Sebastian Huber X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2022 11:35:46 -0000 > On 22 Jul 2022, at 12:19, Sebastian Huber = wrote: >=20 > On 21.07.22 10:03, Iain Sandoe wrote: >>> This sounds like an interesting approach in the long run, however, I = need a short term solution which I can back port to GCC 10, 11, and 12. = I guess I will add a >>>=20 >>> MULTILIB_EXTRA_OPTS =3D ftls-model=3Dlocal-exec >>>=20 >>> to all RTEMS multilib configurations. >>>=20 >>> In general I think the target hooks are hard to customize for = operating systems. >> (IMO) It can be not too tricky - Darwin customises several - you = just have to override the default definition in your target-specific = header and provide the replacement e.g ( override in config/darwin.h, = replacement in config/darwin.cc): >> #undef TARGET_ENCODE_SECTION_INFO >> #define TARGET_ENCODE_SECTION_INFO darwin_encode_section_info >=20 > The problem is that in this case you need a target-specific copy and = paste solution. For example lets suppose you want to use >=20 > #define CC1_SPEC "%{!ftls-model=3D*:-ftls-model=3Dlocal-exec}" >=20 > for RTEMS (in gcc/config/rtems.h), then you have a problem on for = example microblaze (gcc/config/microblaze/microblaze.h): >=20 > #ifndef CC1_SPEC > #define CC1_SPEC " \ > %{G*} \ > %(subtarget_cc1_spec) \ > %{mxl-multiply-high:-mcpu=3Dv6.00.a} \ > " > #endif >=20 > or nios2 (gcc/config/nios2/nios2.h): >=20 > #define CC1_SPEC "%{G*}" >=20 > For each target you would have to check if you have to provide some = extra times for CC1_SPEC through copy and paste. Yes, there is a curious =E2=80=98inversion=E2=80=99 process where, to = the OS, the architectures are sub-targets, but to the GCC implementation = the OSs are sub-targets of the arch, it can be possible to work around = this by declaring SUBTARGET_SPEC_XXXX and then appending that to the = various users. However, it could be that even that will not work easily = in this case. Iain