[Crash-utility] target compilation?

Jun Koi junkoi2004 at gmail.com
Mon Sep 22 10:27:29 UTC 2008


Hi,

I looked at configure.c, and find some code like this:

void
get_current_configuration(void)
{
    FILE *fp;
    static char buf[512];
    char *p;

#ifdef __alpha__
        target_data.target = ALPHA;
#endif
#ifdef __i386__
        target_data.target = X86;
#endif
#ifdef __powerpc__
        target_data.target = PPC;
#endif
#ifdef __ia64__
        target_data.target = IA64;
#endif
....
}

I have few questions:
- Is it correct that the above code want to find out the architecture
(means target here) we are compiling our code on?

- Who defined those architectures in the above code, like "__i386__"
(in the check "#ifdef __i386__")? I guessed that the architecture is
defined in a particular prototype file in /usr/include, but cannot
find anything there. So I think that those macros are defined by
compilation process of crash, but again I dont see anywhere in the
source doing that.

Thanks,
J
target we want




More information about the Crash-utility mailing list