Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 43177 | Differences between
and this patch

Collapse All | Expand All

(-)xorg-x11-6.7.0-r2.orig/xc/config/cf/xf86.tmpl (-2 / +10 lines)
Lines 53-67 Link Here
53
MODULE_GCC_FLAGS1 = -fno-stack-protector
53
MODULE_GCC_FLAGS1 = -fno-stack-protector
54
#endif 
54
#endif 
55
55
56
#ifndef HasGccPie
57
#define HasGccPie		NO
58
#endif
59
60
#if HasGccPie
61
MODULE_GCC_FLAGS2 = -fno-pie
62
#endif 
63
56
#ifndef HasGccMergeConstants
64
#ifndef HasGccMergeConstants
57
#define HasGccMergeConstants	NO
65
#define HasGccMergeConstants	NO
58
#endif
66
#endif
59
67
60
#if HasGccMergeConstants && DoLoadableServer && !MakeDllModules
68
#if HasGccMergeConstants && DoLoadableServer && !MakeDllModules
61
MODULE_GCC_FLAGS2 = -fno-merge-constants
69
MODULE_GCC_FLAGS3 = -fno-merge-constants
62
#endif
70
#endif
63
71
64
MODULE_GCC_FLAGS = $(MODULE_GCC_FLAGS1) $(MODULE_GCC_FLAGS2)
72
MODULE_GCC_FLAGS = $(MODULE_GCC_FLAGS1) $(MODULE_GCC_FLAGS2) $(MODULE_GCC_FLAGS3)
65
73
66
#if defined(IHaveModules) && MakeDllModules
74
#if defined(IHaveModules) && MakeDllModules
67
MODULE_PIC_FLAGS = $(PICFLAGS)
75
MODULE_PIC_FLAGS = $(PICFLAGS)
(-)xorg-x11-6.7.0-r2.orig/xc/config/cf/xorg.tmpl (-2 / +10 lines)
Lines 67-81 Link Here
67
MODULE_GCC_FLAGS1 = -fno-stack-protector
67
MODULE_GCC_FLAGS1 = -fno-stack-protector
68
#endif 
68
#endif 
69
69
70
#ifndef HasGccPie
71
#define HasGccPie		NO
72
#endif
73
74
#if HasGccPie
75
MODULE_GCC_FLAGS2 = -fno-pie
76
#endif 
77
70
#ifndef HasGccMergeConstants
78
#ifndef HasGccMergeConstants
71
#define HasGccMergeConstants	NO
79
#define HasGccMergeConstants	NO
72
#endif
80
#endif
73
81
74
#if HasGccMergeConstants && DoLoadableServer && !MakeDllModules
82
#if HasGccMergeConstants && DoLoadableServer && !MakeDllModules
75
MODULE_GCC_FLAGS2 = -fno-merge-constants
83
MODULE_GCC_FLAGS3 = -fno-merge-constants
76
#endif
84
#endif
77
85
78
MODULE_GCC_FLAGS = $(MODULE_GCC_FLAGS1) $(MODULE_GCC_FLAGS2)
86
MODULE_GCC_FLAGS = $(MODULE_GCC_FLAGS1) $(MODULE_GCC_FLAGS2) $(MODULE_GCC_FLAGS3)
79
87
80
#if defined(IHaveModules) && MakeDllModules
88
#if defined(IHaveModules) && MakeDllModules
81
MODULE_PIC_FLAGS = $(PICFLAGS)
89
MODULE_PIC_FLAGS = $(PICFLAGS)
(-)xorg-x11-6.7.0-r2.orig/xc/config/imake/imake.c (-13 / +6 lines)
Lines 1034-1059 Link Here
1034
static void
1034
static void
1035
get_stackprotector(FILE *inFile)
1035
get_stackprotector(FILE *inFile)
1036
{
1036
{
1037
  FILE *fp;
1038
  char *cc;
1037
  char *cc;
1039
  char command[1024], buf[1024];
1038
  char command[1024];
1040
  
1039
  
1041
  cc = getenv("CC");
1040
  cc = getenv("CC");
1042
  if (cc == NULL) {
1041
  if (cc == NULL) {
1043
    cc = "cc";
1042
    cc = "cc";
1044
  }
1043
  }
1045
  snprintf(command, sizeof(command), "%s -v 2>&1", cc);
1044
  snprintf(command, sizeof(command), "%s -fno-stack-protector -S -o /dev/null -xc /dev/null 2>&1", cc);
1046
  fp = popen(command, "r");
1045
  if (system(command)==0)
1047
  if (fp == NULL) 
1048
    abort();
1049
  while (fgets(buf, sizeof(buf), fp)) {
1050
    if (strstr(buf, "propolice") != NULL) {
1051
      fprintf(inFile, "#define HasGccStackProtector YES\n");
1046
      fprintf(inFile, "#define HasGccStackProtector YES\n");
1052
      break;
1047
  snprintf(command, sizeof(command), "%s -fno-pie -S -o /dev/null -xc /dev/null 2>&1", cc);
1053
    }
1048
  if (system(command)==0)
1054
  }
1049
      fprintf(inFile, "#define HasGccPie YES\n");
1055
  if (pclose(fp)) 
1056
    abort();
1057
}
1050
}
1058
	
1051
	
1059
1052

Return to bug 43177