This patch set will make configure or build flexible for host environment,
in particular dealing with cross compiler.
Please consider about this proposal.
patch#1:
By declaring tables about target and host relationships,
cleanup corresponding code and the new build combination will be
adapted briefly.
Remaining patches:
Try to relieve cross compiler burden by using explicit host_cross option.
I'm using cross compiler environ host=x86 for target=ppc,
and might attempt target=<another arch> in the near future.
I stocked private patches to accomplish cross compiling
but I'd like to discard them permanently with your agreement.
Thanks,
Toshi
Toshikazu Nakayama (5):
configure: retake the way of host compiler detection
Makefile: wrap cc, gcc and ar with common make valiables
make: add host_cross option
build_data: handle CC valiable
configure: handle cross compile with target=ppc host_cross=x86
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
04-17-2012, 02:44 PM
Dave Anderson
let make flexible for multiple host
----- Original Message -----
> Hi Dave,
>
> This patch set will make configure or build flexible for host environment,
> in particular dealing with cross compiler.
> Please consider about this proposal.
>
> patch#1:
> By declaring tables about target and host relationships,
> cleanup corresponding code and the new build combination will be
> adapted briefly.
>
> Remaining patches:
> Try to relieve cross compiler burden by using explicit host_cross option.
> I'm using cross compiler environ host=x86 for target=ppc,
> and might attempt target=<another arch> in the near future.
> I stocked private patches to accomplish cross compiling
> but I'd like to discard them permanently with your agreement.
>
> Thanks,
> Toshi
I am presuming that you have successfully built a PPC binary on an
x86 or x86_64 host, and then you have copied the binary to a PPC host
that doesn't have a resident compiler? But then again, looking at your
patch as is, it looks like you can only allow "target=PPC" on a PPC64 host,
which is already supported?:
In any case, I would prefer that you specifically address your
particular PPC-on-X86 build issue, because I'm not sure what
other combinations would be particularly useful.
I'm not particularly interested in speculative changes. The only
future architecture support I can see on the horizon is 64-bit ARM,
and that is a few a few years away. And we are lucky that x86 and
ARM have the same endianness and data-type sizes, so we can continue
(hopefully) to build x86_64 binaries to analyze 64-bit ARM vmcores
on x86_64 hosts.
Also, note that your patch fails because it collides with Rabin's queued
fix for building SIAL for target=ARM and target=PPC builds:
[Crash-utility] [PATCH] build sial with TARGET_CFLAGS
https://www.redhat.com/archives/crash-utility/2012-March/msg00113.html
Dave
>
> Toshikazu Nakayama (5):
> configure: retake the way of host compiler detection
> Makefile: wrap cc, gcc and ar with common make valiables
> make: add host_cross option
> build_data: handle CC valiable
> configure: handle cross compile with target=ppc host_cross=x86
>
> Makefile | 144 +++++++++--------
> configure.c | 441
> ++++++++++++++++++++++-----------------------------
> extensions/Makefile | 10 +-
> extensions/sial.mk | 6 +-
> extensions/snap.mk | 6 +-
> 5 files changed, 289 insertions(+), 318 deletions(-)
>
>
>
>
>
>
>
> --
> Crash-utility mailing list
> Crash-utility@redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
>
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
04-18-2012, 08:14 AM
Toshikazu Nakayama
let make flexible for multiple host
(2012/04/17 23:44), Dave Anderson wrote:
>
>
> ----- Original Message -----
>> Hi Dave,
>>
>> This patch set will make configure or build flexible for host environment,
>> in particular dealing with cross compiler.
>> Please consider about this proposal.
>>
>> patch#1:
>> By declaring tables about target and host relationships,
>> cleanup corresponding code and the new build combination will be
>> adapted briefly.
>>
>> Remaining patches:
>> Try to relieve cross compiler burden by using explicit host_cross option.
>> I'm using cross compiler environ host=x86 for target=ppc,
>> and might attempt target=<another arch> in the near future.
>> I stocked private patches to accomplish cross compiling
>> but I'd like to discard them permanently with your agreement.
>>
>> Thanks,
>> Toshi
>
> I am presuming that you have successfully built a PPC binary on an
> x86 or x86_64 host, and then you have copied the binary to a PPC host
> that doesn't have a resident compiler? But then again, looking at your
Hi Dave,
I didn't explain about background issues.
I built a PPC binary on an x86 host cross compiler. When run it,
I have to ftp to PPC machine where dose not have self build tools.
Here is dumping my build environment info.
$ uname -m
x86_64
$ file gcc
gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped
$ ./gcc -dumpmachine
powerpc-linux-gnu
> patch as is, it looks like you can only allow "target=PPC" on a PPC64 host,
> which is already supported?:
>
> static struct host_table {
>
> ... [ cut ] ...
>
> }, ppc[] = {
> {
> .host = PPC64,
> .cflags = "-m32 -D_FILE_OFFSET_BITS=64 -fPIC",
> .gdb_conf_flags = "--target=ppc-elf-linux CFLAGS=-m32",
> }
> };
This "target=PPC" on a PPC64 host has been already supported
since I copied it into ppc[] table.
[Crash-utility] [PATCH v1 1/4] Support PPC32 Core analysis on PPC64 Host
https://www.redhat.com/archives/crash-utility/2011-November/msg00019.html
The purpose is to build ppc 32bit binary with compatible target CFLAGS "-m32"
of ppc64 compiler. This is similar idea with x86_64.
But I added new cross support(is_cross is TRUE) in patch#5 which is
distinct from original purpose.
> In any case, I would prefer that you specifically address your
> particular PPC-on-X86 build issue, because I'm not sure what
> other combinations would be particularly useful.
> I'm not particularly interested in speculative changes. The only
> future architecture support I can see on the horizon is 64-bit ARM,
> and that is a few a few years away. And we are lucky that x86 and
> ARM have the same endianness and data-type sizes, so we can continue
> (hopefully) to build x86_64 binaries to analyze 64-bit ARM vmcores
> on x86_64 hosts.
My issues are to arrange original crash package as compilable one with cross.
I edit package's Makefile or configure parameters --host/--target at spec file,
finally building with environment variables CC, AR, LD, etc.
By applying patches, I can build crash only with tiny spec update,
"make target=PPC host_cross=X86" without modification of released archive.
Then, I'll start mips architecture (seems to go toward embedded minority).
There are probably the similar considerations about cross compile.
I want to be done with "make target=MIPS host_cross=X86" by adding mips tables.
> Also, note that your patch fails because it collides with Rabin's queued
> fix for building SIAL for target=ARM and target=PPC builds:
>
> [Crash-utility] [PATCH] build sial with TARGET_CFLAGS
> https://www.redhat.com/archives/crash-utility/2012-March/msg00113.html
I haven't caught this update. I'd send updated portion.
Thanks,
Toshi
> Dave
>
>
>
>
>>
>> Toshikazu Nakayama (5):
>> configure: retake the way of host compiler detection
>> Makefile: wrap cc, gcc and ar with common make valiables
>> make: add host_cross option
>> build_data: handle CC valiable
>> configure: handle cross compile with target=ppc host_cross=x86
>>
>> Makefile | 144 +++++++++--------
>> configure.c | 441
>> ++++++++++++++++++++++-----------------------------
>> extensions/Makefile | 10 +-
>> extensions/sial.mk | 6 +-
>> extensions/snap.mk | 6 +-
>> 5 files changed, 289 insertions(+), 318 deletions(-)
>>
>>
>>
>>
>>
>>
>>
>> --
>> Crash-utility mailing list
>> Crash-utility@redhat.com
>> https://www.redhat.com/mailman/listinfo/crash-utility
>>
>
> --
> Crash-utility mailing list
> Crash-utility@redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
>
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
04-18-2012, 12:57 PM
Dave Anderson
let make flexible for multiple host
----- Original Message -----
> (2012/04/17 23:44), Dave Anderson wrote:
> >
> >
> > ----- Original Message -----
> >> Hi Dave,
> >>
> >> This patch set will make configure or build flexible for host environment,
> >> in particular dealing with cross compiler.
> >> Please consider about this proposal.
> >>
> >> patch#1:
> >> By declaring tables about target and host relationships,
> >> cleanup corresponding code and the new build combination will be
> >> adapted briefly.
> >>
> >> Remaining patches:
> >> Try to relieve cross compiler burden by using explicit
> >> host_cross option.
> >> I'm using cross compiler environ host=x86 for target=ppc,
> >> and might attempt target=<another arch> in the near future.
> >> I stocked private patches to accomplish cross compiling
> >> but I'd like to discard them permanently with your agreement.
> >>
> >> Thanks,
> >> Toshi
> >
> > I am presuming that you have successfully built a PPC binary on an
> > x86 or x86_64 host, and then you have copied the binary to a PPC host
> > that doesn't have a resident compiler? But then again, looking at
> > your
>
> Hi Dave,
>
> I didn't explain about background issues.
>
> I built a PPC binary on an x86 host cross compiler. When run it,
> I have to ftp to PPC machine where dose not have self build tools.
> Here is dumping my build environment info.
> $ uname -m
> x86_64
> $ file gcc
> gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
> dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped
> $ ./gcc -dumpmachine
> powerpc-linux-gnu
>
> > patch as is, it looks like you can only allow "target=PPC" on a
> > PPC64 host,
> > which is already supported?:
> >
> > static struct host_table {
> >
> > ... [ cut ] ...
> >
> > }, ppc[] = {
> > {
> > .host = PPC64,
> > .cflags = "-m32 -D_FILE_OFFSET_BITS=64 -fPIC",
> > .gdb_conf_flags = "--target=ppc-elf-linux
> > CFLAGS=-m32",
> > }
> > };
>
> This "target=PPC" on a PPC64 host has been already supported
> since I copied it into ppc[] table.
> [Crash-utility] [PATCH v1 1/4] Support PPC32 Core analysis on PPC64 Host
> https://www.redhat.com/archives/crash-utility/2011-November/msg00019.html
>
> The purpose is to build ppc 32bit binary with compatible target CFLAGS "-m32"
> of ppc64 compiler. This is similar idea with x86_64.
>
> But I added new cross support(is_cross is TRUE) in patch#5 which is
> distinct from original purpose.
>
> + {
> + .host = X86,
> + .cflags = "-D_FILE_OFFSET_BITS=64",
> + .gdb_conf_flags = "--host=i686-pc-linux-gnu "
> + "--target=powerpc-elf-linux",
> + .is_cross = TRUE,
> + },
>
> > In any case, I would prefer that you specifically address your
> > particular PPC-on-X86 build issue, because I'm not sure what
> > other combinations would be particularly useful.
>
> > I'm not particularly interested in speculative changes. The only
> > future architecture support I can see on the horizon is 64-bit ARM,
> > and that is a few a few years away. And we are lucky that x86 and
> > ARM have the same endianness and data-type sizes, so we can continue
> > (hopefully) to build x86_64 binaries to analyze 64-bit ARM vmcores
> > on x86_64 hosts.
>
> My issues are to arrange original crash package as compilable one with cross.
> I edit package's Makefile or configure parameters --host/--target at spec file,
> finally building with environment variables CC, AR, LD, etc.
>
> By applying patches, I can build crash only with tiny spec update,
> "make target=PPC host_cross=X86" without modification of released
> archive.
>
> Then, I'll start mips architecture (seems to go toward embedded minority).
> There are probably the similar considerations about cross compile.
> I want to be done with "make target=MIPS host_cross=X86" by adding
> mips tables.
Wait a minute -- how about putting the horse before the cart? There
is a significant amount of work involved with supporting MIPS as an
architecture, which would have to be accomplished first.
>
> > Also, note that your patch fails because it collides with Rabin's queued
> > fix for building SIAL for target=ARM and target=PPC builds:
> >
> > [Crash-utility] [PATCH] build sial with TARGET_CFLAGS
> > https://www.redhat.com/archives/crash-utility/2012-March/msg00113.html
>
> I haven't caught this update. I'd send updated portion.
>
> Thanks,
> Toshi
My hope was that you could accomplish the cross-compile automatically
without invoking the extra "host_cross=X86" option support. If
configure sees that you're trying a "target=PPC" on an x86 or x86_64,
then it could presume it's your unique cross-compile scenario, and
then do whatever it has to do from that point on.
I also was under the impression that a MIPS binary was not all that
beneficial to the embedded folks, because it is not a typical
situation where the crash analysis could take place *on* the embedded
MIPS platform.
Dave
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
04-19-2012, 08:06 AM
Toshikazu Nakayama
let make flexible for multiple host
(2012/04/18 21:57), Dave Anderson wrote:
>
>
> ----- Original Message -----
>> (2012/04/17 23:44), Dave Anderson wrote:
>> Then, I'll start mips architecture (seems to go toward embedded minority).
>> There are probably the similar considerations about cross compile.
>> I want to be done with "make target=MIPS host_cross=X86" by adding
>> mips tables.
>
> Wait a minute -- how about putting the horse before the cart? There
> is a significant amount of work involved with supporting MIPS as an
> architecture, which would have to be accomplished first.
>>
>>> Also, note that your patch fails because it collides with Rabin's queued
>>> fix for building SIAL for target=ARM and target=PPC builds:
>>>
>>> [Crash-utility] [PATCH] build sial with TARGET_CFLAGS
>>> https://www.redhat.com/archives/crash-utility/2012-March/msg00113.html
>>
>> I haven't caught this update. I'd send updated portion.
>>
>> Thanks,
>> Toshi
>
> My hope was that you could accomplish the cross-compile automatically
> without invoking the extra "host_cross=X86" option support. If
> configure sees that you're trying a "target=PPC" on an x86 or x86_64,
> then it could presume it's your unique cross-compile scenario, and
> then do whatever it has to do from that point on.
I investigated current configure's target definition.
I have to handle host type here, and toss it as gdb configure's --host.
This seems to be accomplished by switching compiler option.
$ echo | gcc -E -dM - | grep __x86_64__
#define __x86_64__ 1
$ echo | gcc -m32 -E -dM - | grep __i386__
#define __i386__ 1
By adding -m32 to configure.c build, configure becomes to handle i386 host.
I'm going to choose a gcc option for configure.c according by cross host type.
Incidentally, even if gdb was configured with --host=X86_64, there were
no obvious crash build problems in my cross environ.
I make respin which don't require option, also drop "is_cross" classification.
> I also was under the impression that a MIPS binary was not all that
> beneficial to the embedded folks, because it is not a typical
> situation where the crash analysis could take place *on* the embedded
> MIPS platform.
>
> Dave
I'm not sure about general MIPS platform fields yet, no experiences.
I just want to study about MIPS now, and I think implementing crash
is one of the faster approach to understand architecture parts in kernel.
Of course, I'm happy if MIPS crash analysis becomes beneficial to ...