lkml.org 
[lkml]   [2022]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] powerpc: e500: Fix compilation with gcc e500 compiler


    On 2 July 2022 7:44:05 pm AEST, "Pali Rohár" <pali@kernel.org> wrote:
    >On Tuesday 24 May 2022 11:39:39 Pali Rohár wrote:
    >> gcc e500 compiler does not support -mcpu=powerpc option. When it is
    >> specified then gcc throws compile error:
    >>
    >> gcc: error: unrecognized argument in option ‘-mcpu=powerpc’
    >> gcc: note: valid arguments to ‘-mcpu=’ are: 8540 8548 native
    >>
    >> So do not set -mcpu=powerpc option when CONFIG_E500 is set. Correct option
    >> -mcpu=8540 for CONFIG_E500 is set few lines below in that Makefile.
    >>
    >> Signed-off-by: Pali Rohár <pali@kernel.org>
    >> Cc: stable@vger.kernel.org
    >
    >Michael, do you have any objections about this patch?

    I don't particularly like it :)

    From the discussion with Segher, it sounds like this is a problem with a specific build of gcc that you're using, not a general problem with gcc built with e500 support.

    Keying it off CONFIG_E500 means it will fix your problem, but not anyone else who has a different non-e500 compiler that also doesn't support -mcpu=powerpc (for whatever reason).

    So I wonder if a better fix is to use cc-option when setting -mcpu=powerpc.

    cheers

    \
     
     \ /
      Last update: 2022-07-04 12:26    [W:3.467 / U:0.932 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site