Messages in this thread | | | From | Nick Desaulniers <> | Date | Tue, 2 Mar 2021 14:09:01 -0800 | Subject | Re: [PATCH 2/2] Makefile: Only specify '--prefix=' when building with clang + GNU as |
| |
On Tue, Mar 2, 2021 at 2:02 PM Fangrui Song <maskray@google.com> wrote: > > On 2021-03-02, Nathan Chancellor wrote: > >When building with LLVM_IAS=1, there is no point to specifying > >'--prefix=' because that flag is only used to find the cross assembler, > >which is clang itself when building with LLVM_IAS=1. All of the other > >tools are invoked directly from PATH or a full path specified via the > >command line, which does not depend on the value of '--prefix='. > > > >Sharing commands to reproduce issues becomes a little bit easier without > >a '--prefix=' value because that '--prefix=' value is specific to a > >user's machine due to it being an absolute path. > > > >Signed-off-by: Nathan Chancellor <nathan@kernel.org> > > Reviewed-by: Fangrui Song <maskray@google.com> > > clang can spawn GNU as (if -f?no-integrated-as is specified) and GNU > objcopy (-f?no-integrated-as and -gsplit-dwarf and -g[123]).
But -g get's set via CONFIG_DEBUG_INFO and -gsplit-dwarf by DEBUG_INFO_SPLIT. So if we say: $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CC=clang LLVM_IAS=1
So cross compile, use clang, use the integrated assembler (ie. with this change, don't set --prefix), with either of the two above configs, which objcopy get's exec'd?
> > With LLVM_IAS=1, these cases are ruled out.
-- Thanks, ~Nick Desaulniers
| |