1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
static char * fnsp = " -fno-stack-protector";
#define HAVE_SYSDEP
#define HAVE_KERNEL_FLAGS
static void
check_sysdep (conf_t * conf, struct utsname *un)
{
char *p;
char cmd[512];
#ifndef __arm__
vmix_mode = "FLOAT";
#else
exact_architectures = 1; /* Compile only the drivers with targetcpu=arm */
#endif
if ((p=getenv("CROSSCOMPILE"))!=NULL)
{
if (strcmp(p, "uclinux-blackfin")==0)
{
hostcc="cc";
targetcc="uclinux-blackfin-gcc";
}
#ifdef VXWORKS
else if (strcmp(p, "vxworks-x86")==0)
{
vxworks_setup(conf, "386");
}
#endif
}
/*
* Check if cc supports -fno-stack-protector
*/
sprintf (cmd, "%s -c -o srcconf.o -fno-stack-protector setup/srcconf.c >/dev/null 2>&1", targetcc);
if (system(cmd))
{
fnsp = "";
}
if (do_warning_checks)
strcpy(conf->OSflags, "-Wall");
strcpy (conf->ccomp, targetcc);
strcpy (conf->cplusplus, "g++ -fno-rtti -fno-exceptions -I.");
strcpy (conf->platform, "i86pc");
}
static void
add_kernel_flags (FILE * f)
{
# if defined(__x86_64__)
fprintf (f,
"CFLAGS += -O2 -fno-common -mcmodel=kernel -mno-red-zone -fno-tree-slp-vectorize -fno-pie -fno-asynchronous-unwind-tables -ffreestanding%s\n", fnsp);
# else
# if defined(__arm__) || defined(__sh__) || defined(__mips__) || defined(__sparc__) || defined(__ia64__) || defined(__alpha__) || defined(__s390__) || defined(__powerpc__) || defined(__hppa__)
fprintf (f, "CFLAGS += -O2 -fno-common -ffreestanding%s\n", fnsp);
# else
if (getenv ("NO_REGPARM") == NULL)
{
fprintf (f,
"CFLAGS += -O2 -fno-common -ffreestanding -mregparm=3 -DUSE_REGPARM%s\n", fnsp);
}
else
{
fprintf (f, "CFLAGS += -O2 -fno-common -ffreestanding -DNO_REGPARM%s\n", fnsp);
}
# endif
# endif
}
|