[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture



On 2 April 2015 at 17:18, Michal Marek <mmarek@suse.cz> wrote:
> On 2015-04-02 15:14, Riku Voipio wrote:
>> On 2 April 2015 at 15:01, Arnaud Patard <arnaud.patard@rtp-net.org> wrote:
>>> riku.voipio@linaro.org writes:
>>>> --- a/scripts/package/builddeb
>>>> +++ b/scripts/package/builddeb
>>>> @@ -45,7 +45,16 @@ create_package() {
>>>>       arm64)
>>>>               debarch=arm64 ;;
>>>>       arm*)
>>>> -             debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;;
>>>> +             if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
>>>> +                     if $CC -dM -E - < /dev/null|grep -q __ARM_PCS_VFP; then
>>>
>>> Actually, I guess there's nothing preventing you building a armhf kernel
>>> with a compiler not having __ARM_PCS_VFP defined by default, but I'm not sure
>>> we should take care of this case. One can always use KBUILD_DEBARCH=armhf.
>>
>> I think the common use cases would be a) native compilers or b)
>> cross-compiler targeting the same debian architecture as the rootfs.
>> This patch provides automatic detection for both cases.

> $CC should be used together with $KBUILD_CFLAGS to behave the same as
> when building the kernel.

I just tested and it won't work. $KBUILD_CFLAGS has -msoft-float so
__ARM_PCS_VFP wont be set. Which makes sense - we wouldn't want kernel
to pass anything in float registers. Given the constraint, would you
prefer Ben's original patch that checks CONFIG_VFP[1], or my version
using CC without KBUILD_CFLAGS?

[1] https://lists.debian.org/debian-arm/2014/06/msg00016.html

Riku


Reply to: