[systemd-devel] [PATCH 2/2] build: allow setting OBJCOPY
Marc-Antoine Perennou
Marc-Antoine at perennou.com
Wed Apr 8 13:33:08 PDT 2015
On 8 April 2015 at 22:24, Mike Gilbert <floppym at gentoo.org> wrote:
> On Wed, Apr 8, 2015 at 4:08 PM, Marc-Antoine Perennou
> <Marc-Antoine at perennou.com> wrote:
>> Signed-off-by: Marc-Antoine Perennou <Marc-Antoine at Perennou.com>
>> ---
>> Makefile.am | 4 ++--
>> configure.ac | 3 +++
>> 2 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index 9b769ee..397a71c 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -2596,7 +2596,7 @@ $(systemd_boot_solib): $(systemd_boot_objects)
>> nm -D -u $@ | grep ' U ' && exit 1 || :
>>
>> $(systemd_boot): $(systemd_boot_solib)
>> - $(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
>> + $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
>> -j .dynsym -j .rel -j .rela -j .reloc \
>> --target=efi-app-$(EFI_ARCH) $< $@
>>
>> @@ -2634,7 +2634,7 @@ $(stub_solib): $(stub_objects)
>> nm -D -u $@ | grep ' U ' && exit 1 || :
>>
>> $(stub): $(stub_solib)
>> - $(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
>> + $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
>> -j .dynsym -j .rel -j .rela -j .reloc \
>> --target=efi-app-$(EFI_ARCH) $< $@
>>
>> diff --git a/configure.ac b/configure.ac
>> index 0722841..faf1596 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -83,6 +83,9 @@ AC_PROG_AWK
>>
>> AC_PROG_CC_C99
>>
>> +AC_ARG_VAR(OBJCOPY, [The objcopy binary])
>> +test -z "$ac_cv_env_OBJCOPY_value" && OBJCOPY=objcopy
>
> Why not use AC_CHECK_TOOL here?
>
> https://www.gnu.org/software/autoconf/manual/autoconf.html#Generic-Programs
Heh, indeed, forgot about this one. Thanks!
More information about the systemd-devel
mailing list