[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] zap linking-only option from EMBEDDED_EXTRA_CFLAGS
- To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Tue, 27 Sep 2022 14:29:34 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RdKa9YppLrZ/GksXmmNlTC4WrT092sYpChMVJNDGWMk=; b=PDvlcv9BESkuVXzQBUy4o+90uwyNVQcs6OlXsQnUC555bhtfxauVXN9PlbGM1XXcKl0dyjjF9iL6yyPbAam+tkpUzYfWD93+sJxsBuYk9v8dE7ZgS4aSBF1+mE8qEPhHz4tvemrdbyYJz9kiDT5e0S1SPN6qt3yzieIjlTk9SebN1tFzVVQLKYvfZO+NJ21ppdpQlGg031f3FDoW5C3ZuS67bff1A3khR0EyklT/dJX9FIOdhfOGIXbabbH1EZyhhhBM8oQAmOMaALE4O5/aUtEMdLb+LEiOaM4mpyUsF8FLtuok/2EasmDlkXh6SUMvi+KTOckau65SB8zUPDA+/A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jmCFxFqJwvB3JqcAfVR6MbByxnN2fLRxGsVGVTG5esQmosZOYlmlL7NVENOHuFWxyEXzFgRl14jO4QGqSamh7ZJSJwmYA9JOomGEGV8XmD0zkxJDGO918IyYQmxvVwiDA/VJUtwc2YF+P0m4L082k23R5CQWpgNhGtAUnJ7skIlqM/YQHGRsXH6aOahXitnJmGg6vFXnSwNB0rWJAJtUFKDAZ8z9xfSWBcUhk6sRPYie/qjKfnFNWKBKnSU+Gw+zit8evfX5PBZYNv0XLSvvFygtB9GG/f5KWidjlKh/mQgiLmcLnl/6wL+tT1MbKe5Do/OLciiZUuUa+suEKjM1iw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
- Delivery-date: Tue, 27 Sep 2022 14:29:55 +0000
- Ironport-data: A9a23:UTLpKaoDPG+GWr1TTrhdsn3h849eBmKdZBIvgKrLsJaIsI4StFCzt garIBmHa/iOamryeNlwao2/8h9TvZTdy9QwSQQ9rC82HiIa9JuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYGYpLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+55wehBtC5gZkPaER4weE/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5mx PtEGSIxXiK5qe+974yJUeg9vdQGM5y+VG8fkikIITDxK98DGcqGaYOToNhS0XE3m9xEGuvYa 4wBcz1zYR/cYhpJfFAKFJY5m+TujX76G9FagAvN+exrvC6OlUotjNABM/KMEjCObexTklyVu STt+GPhDwtBHNee1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llluhEk6y5Qqb3OiueT11rm9e8opwkc7/mZ8 o=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYxBz9vXThIyLw8kuRIj7v9n8AEK3zbpOAgAAEUwA=
- Thread-topic: [PATCH] zap linking-only option from EMBEDDED_EXTRA_CFLAGS
On 27/09/2022 15:14, Roger Pau Monne wrote:
> On Fri, Sep 09, 2022 at 09:22:52AM +0200, Jan Beulich wrote:
>> While I was suspicious of the compiler issuing a diagnostic about an
>> unused linking-only option when not doing any linking, I did check this
>> with a couple of gcc versions only, but not with Clang. (Oddly enough at
>> least older Clang versions complain about the use of '-nopie' now that
>> we actually use '-no-pie'.) Filter out the problematic option in all
>> cases where the variable is consumed for compilation only (which right
>> now is everywhere).
>>
>> Fixes: ecd6b9759919 ("Config.mk: correct PIE-related option(s) in
>> EMBEDDED_EXTRA_CFLAGS")
>> Reported-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>> ---
>> Arguably with all users of EMBEDDED_EXTRA_CFLAGS using these just for
>> compiling, the option could be omitted from that variable right away.
>> But if any compile-and-link-in-one-go use appeared, there would be an
>> issue.
> Is it feasible to have compile-and-link-in-one-go in one use feasible
> with what we consider embedded (firmware or kernel like binaries). I
> would expect those to always require a linker script and a separate
> linking step.
As I've expressed several times previously, the entire variable is bogus.
Just because we do have several things which are built as
non-freestanding, doesn't mean they share a common CLFLAGS environment.
PIE is very specific to the intended use, and blindly disabling the
stack protector isn't safe either. It only works because none of our
freestanding environments have gone to the effort of adding stack
protector support.
-fno-exceptions is furthermore bogus in CLFLAGS, as its a CXXFLAG only.
And no, this mess can't plausibly be used for a compile and link in one
go. Filtering out a non-CFLAG from the collection at every call site is
nonsense.
~Andrew
|