[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADa2P2UTMwwYPFLW+UM5FNBL+_8Pi_Am+saa+Y2ywpi0jPDvWw@mail.gmail.com>
Date: Sun, 10 May 2020 21:43:32 +0430
From: Mahmood Naderan <mahmood.nt@...il.com>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: Using a custom LDFLAG for all objects and binaries
> Have you read Documentation/kbuild/makefiles.rst ?
>
> LDFLAGS
> Generic $(LD) options
>
> Flags used for all invocations of the linker.
What I see is this in Documentation/kbuild/makefiles.txt
LDFLAGS Generic $(LD) options
Flags used for all invocations of the linker.
Often specifying the emulation is sufficient.
Example:
#arch/s390/Makefile
LDFLAGS := -m elf_s390
Note: ldflags-y can be used to further customise
the flags used. See chapter 3.7.
I have two questions then:
1- Can I use that as a bash variable? Like "LDFLAGS=--emit-relocs make"
or
2- Editing arch/x86/Makefile with
KBUILD_LDFLAGS := -m --emit-relocs elf_$(UTS_MACHINE)
Thanks for your help.
Regards,
Mahmood
Powered by blists - more mailing lists