~ubuntu-branches/ubuntu/vivid/oss4/vivid-proposed

« back to all changes in this revision

Viewing changes to .pc/arch_without_mregparm.patch/setup/srcconf_linux.inc

  • Committer: Package Import Robot
  • Author(s): Sebastien NOEL
  • Date: 2012-11-19 11:47:24 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20121119114724-svu8mq7x3pk64nez
Tags: 4.2-build2007-1
* New upstream release.
* Acknowledge NMU, thanks Michael Gilbert.
* Add debian/patches/110_ld-as-needed.patch: Rearrange order of linker
  arguments to fix building with "ld --as-needed" (closes: #630737).
* Add missing dependency on dpkg-dev to oss4-dkms and oss4-source
  (closes: #687086).
* Fix typo in the changelog (closes: #628876, #675933)
* Add debian/patches/002_fix-linux-oss_native_word.patch (closes: #693657).
  Thanks to Ben Hutchings.
* Add debian/patches/003_linux-error-logging-fixes.patch (closes: #693657).
  Thanks to Ben Hutchings.
* check for /lib/modules/${kernelver}/build in addition of
  /lib/modules/${kernelver}/source (closes: #587191).
* oss4-dkms.dkms.in: fix 'CLEAN' rules (closes: #653374).

Show diffs side-by-side

added added

removed removed

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