[Buildroot] [PATCH] syslinux: Builds with the target toolchain

Benoît Allard benoit.allard at greenbone.net
Wed Apr 5 13:38:59 UTC 2017


On Wed, 5 Apr 2017 13:02:27 +0200
Thomas Petazzoni <thomas.petazzoni at free-electrons.com> wrote:
> > diff --git a/boot/syslinux/syslinux.mk b/boot/syslinux/syslinux.mk
> > index 5b7906c..50feea3 100644
> > --- a/boot/syslinux/syslinux.mk
> > +++ b/boot/syslinux/syslinux.mk
> > @@ -51,8 +51,10 @@ SYSLINUX_POST_PATCH_HOOKS += SYSLINUX_CLEANUP
> >  # and the internal zlib should take precedence so -I shouldn't
> >  # be used.
> >  define SYSLINUX_BUILD_CMDS
> > -	$(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter
> > $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \
> > -		AR="$(HOSTAR)" $(SYSLINUX_EFI_ARGS) -C $(@D)
> > $(SYSLINUX_TARGET)
> > +        $(TARGET_MAKE_ENV) $(MAKE1) \
> > +            CC="$(TARGET_CC)" LD="$(TARGET_LD)"
> > NASM="$(HOST_DIR)/usr/bin/nasm" \
> > +            HOSTCC="$(HOSTCC)" HOST_CFLAGS="$(HOST_CFLAGS)"
> > HOST_LDFLAGS="$(HOST_LDFLAGS)" \
> 
> In fact, it would have been better to use CC_FOR_BUILD,
> CFLAGS_FOR_BUILD, LDFLAGS_FOR_BUILD in the syslinux Makefile. If you
> do this, then you can simplify this to:
> 
> 	$(TARGET_MAKE_ENV) $(MAKE1) $(TARGET_CONFIGURE_OPTS) \
> 		NASM=... $(SYSLINUX_EFI_ARGS) -C $(@D)
> $(SYSLINUX_TARGET)
> 

I didn't addressed this in my version 2 of the patch as somehow, when
using $(TARGET_CONFIGURE_OPTS) instead of the various variables, the
Makefiles from syslinux were not able to define CFLAGS on their own, or
somehow, they didn't used their version of it.

Regards,
Ben.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170405/6d7b9aff/attachment-0002.asc>


More information about the buildroot mailing list