On 05/09/12 12:41, Dmitry wrote:
[snip]
> +# This flag to configure should be per target architecture rather than> +# autodetected (or it will be per host architecture which may be> +# not the same as target).> +> +X86EMU = $(if $(BR2_i386),n,y)
This comment was not very clear to me. I guess you mean
# The configure script autodetects the host architecture, so we must
# pass the target architecture explicitly.
> +> +# v86d's configure script is not autoconf-based.> +# GENTARGETS macro will be used rather than AUTOTARGETS.> +> +define V86D_CONFIGURE_CMDS> + (cd $(@D) ; ./configure --with-debug=n --with-klibc=n --with-x86emu=$(X86EMU))> +endef> +> +# It is necessary to define __i386__ explicitly for successful compilation.> +> +define V86D_BUILD_CMDS> + $(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all> +endef
When you use GENTARGETS, you must also specify the install commands.
However, you can probably keep using AUTOTARGETS. Even when you use
AUTOTARGETS, it is possible to override the CONFIGURE_CMDS and BUILD_CMDS.
But you don't even need to override the BUILD_CMDS. Instead, you can
pass additional options to the MAKE call, by defining
V86D_MAKE_OPT += CC="$(TARGET_CC) -D__i386__"
(As Thomas mentioned, if you assign twice on the command line it is only
the last one that counts.)
I can't guarantee that what I'm saying is correct, though, so be sure to
test with a clean build before resending.
Regards,
Arnout
> +> +$(eval $(call GENTARGETS))

Arnout,
On Fri, May 11, 2012 at 6:39 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 05/09/12 12:41, Dmitry wrote:> [snip]>>> +# This flag to configure should be per target architecture rather than>> +# autodetected (or it will be per host architecture which may be>> +# not the same as target).>> +>> +X86EMU = $(if $(BR2_i386),n,y)>>> This comment was not very clear to me. I guess you mean> # The configure script autodetects the host architecture, so we must> # pass the target architecture explicitly.
Thanks for your feedback. Indeed, the configure script calls uname -m
by default, that is, assumes host architecture is same as target's.
>> When you use GENTARGETS, you must also specify the install commands.
And if I don't then standard "cd $(@D); make install" or anything
similar will be used? Somehow it works without explicit install
command specification.
> However, you can probably keep using AUTOTARGETS. Even when you use> AUTOTARGETS, it is possible to override the CONFIGURE_CMDS and BUILD_CMDS.
Due to the way v86d configure is written GENTARGETS seems to be more
proper - I got convinced.
> But you don't even need to override the BUILD_CMDS. Instead, you can> pass additional options to the MAKE call, by defining>> V86D_MAKE_OPT += CC="$(TARGET_CC) -D__i386__"
What I have in the patch I provided, was tested build-wise on i386 and
x86-64 targets (but the program itself was only tested in 32bit mode).
I tried that Thomas suggested (redefine CFLAGS), it did not work. I
don't see much sense in changing the working command from what is in
my patch.
Thanks.

On 05/12/12 07:01, Dmitry Golubovsky wrote:
> Arnout,>> On Fri, May 11, 2012 at 6:39 PM, Arnout Vandecappelle<arnout@mind.be> wrote:
[snip]
>> When you use GENTARGETS, you must also specify the install commands.>> And if I don't then standard "cd $(@D); make install" or anything> similar will be used? Somehow it works without explicit install> command specification.
No, with GENTARGETS the install commands are empty by default. Or you sure
it's not the old binary from a previous compilation that you see in your
target dir?
I tried it with a clean build and there's no v86d or testvbe in the target
dir.
>> However, you can probably keep using AUTOTARGETS. Even when you use>> AUTOTARGETS, it is possible to override the CONFIGURE_CMDS and BUILD_CMDS.>> Due to the way v86d configure is written GENTARGETS seems to be more> proper - I got convinced.
The non-existent MAKETARGETS would be even better :-)
>> But you don't even need to override the BUILD_CMDS. Instead, you can>> pass additional options to the MAKE call, by defining>>>> V86D_MAKE_OPT += CC="$(TARGET_CC) -D__i386__">> What I have in the patch I provided, was tested build-wise on i386 and> x86-64 targets (but the program itself was only tested in 32bit mode).> I tried that Thomas suggested (redefine CFLAGS), it did not work. I> don't see much sense in changing the working command from what is in> my patch.
Sure, it's OK as it is (except for the install target of course).
Merely pointing out an alternative.
Regards,
Arnout

Forgot to copy the list.
---------- Forwarded message ----------
From: Dmitry Golubovsky <golubovsky@gmail.com>
Date: Sun, May 13, 2012 at 11:52 PM
Subject: Re: [Buildroot] [PATCH] Added package v86d which provides a
real-mode helper for uvesafb driver.
To: Arnout Vandecappelle <arnout@mind.be>
Arnout,
On Sat, May 12, 2012 at 10:30 AM, Arnout Vandecappelle <arnout@mind.be> wrote:
> I tried it with a clean build and there's no v86d or testvbe in the target> dir.
Indeed, my omission. Thanks for pointing me out.
>>> But you don't even need to override the BUILD_CMDS. Instead, you can>>> pass additional options to the MAKE call, by defining>>>>>> V86D_MAKE_OPT += CC="$(TARGET_CC) -D__i386__"
> Sure, it's OK as it is (except for the install target of course).> Merely pointing out an alternative.
Thanks, but I'll stay with what I have.
I am resending the patch - hopefully it is good t go now.
--
Dmitry Golubovsky
Anywhere on the Web