Re: [PATCH v2 1/1] Support cross-compilation

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

 



Bhupesh Sharma <bhsharma@xxxxxxxxxx> writes:

> On Wed, Oct 28, 2020 at 11:56 PM Alexander Egorenkov
> <egorenar@xxxxxxxxxx> wrote:
>>
>> Bhupesh Sharma <bhsharma@xxxxxxxxxx> writes:
>>
>> >
>> > ifneq ($(CROSS_COMPILE),)
>> > SUBARCH := $(shell echo $(CROSS_COMPILE) | cut -d- -f1 | sed 's:^.*/::g')
>> > else
>> > SUBARCH := $(shell uname -m)
>> > endif
>> > SUBARCH := $(shell echo $(SUBARCH) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
>> >                      -e s/arm.*/arm/ -e s/sa110/arm/ \
>> >                      -e s/s390x/s390/ -e s/parisc64/parisc/ \
>> >                      -e s/ppc.*/powerpc/ -e s/mips.*/mips/ )
>> >
>> > ARCH ?= $(SUBARCH)
>>
>> Hmm,
>>
>> but the Makefile needs to differentiate between 64 and 32bit archs, e.g. in
>>
>> if [ "${ARCH}" = "ppc64le" ]
>>
>> So "-e s/ppc.*/powerpc/" won't cut it, i think.
>
> Sure, that was just an example, not a complete code blob :)
>
>> Furthermore, we have to convert ARCH to TARGET to pass it to configure.c which also
>> differentiates between 32 and 64 bit archs.
>>
>> Need to think about it more.
>
> Sure, but I think we don't need to reinvent the wheel there.
> CROSS_COMPILING user-space tools
> and kernel bits have been standardized since some time and in the
> respective Makefiles (you can refer to the Busybox and Linux kernel
> Makefile) you can find helpful logic already existing for the same.
>
> Thanks,
> Bhupesh

Thanks for feedback.
I posted a new version of the patch.
But after thinking more about it, i have doubts that this is the proper
way to do it, it seems to me very odd, that we execute the configure
executable which then sets the same passed variables back in the
Makefile. I'm not very familiar with crash-utility configuration
and might be wrong but it's seems like a huge mess to me.

Regards
Alex

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux