|
|
1.1 root 1: How to compile X11R5 (patch level 9) with GCC version 2:
2:
3: The patches include support for building the shared libraries with GCC 2 on
4: the Sparc and 68k machines.
5:
1.1.1.2 ! root 6: Sun forgot to include a static version of libdl.a with some versions
! 7: of SunOS (4.1 mainly). If you see undefined symbols _dlopen, _dlsym,
! 8: or _dlclose when linking with -lX11, compile and link against the file
! 9: mit/util/misc/dlsym.c in the MIT X11R5 distribution.
! 10:
1.1 root 11: mit/config/Imake.tmpl -- Do not set -fstrength-reduce if we have GCC 2. If
12: -fstrength-reduce (or any other -f option) is a major win, then it will
13: most likely be turned on by -O2 optimization.
14:
15: mit/config/sunLib.rules -- If HasGcc2 is defined, then use -fpic to
1.1.1.2 ! root 16: generate PIC code. Make sure that gcc does not use gas (the GNU assembler)
! 17: when compiling PIC code; gas does not assemble it correctly. If you
! 18: have gas installed where gcc uses it by default, you might have to add
! 19: -B/bin/ to the PositionIndependentCFlags.
1.1 root 20:
21: mit/config/site.def -- Define HasGcc2 to be YES.
22:
23: mit/config/sun.cf -- When compiling with GCC 2, use -O2 optimization.
24:
25: mit/rgb/Imakefile -- No longer need to compile some modules with
26: cc on the Sparc since GCC 2 produces proper -fpcc-struct-return code.
27:
28: mit/server/os/Imakefile -- Likewise.
29:
30: *** mit/config/Imake.tmpl.ORIG Tue Dec 31 11:07:56 1991
31: --- mit/config/Imake.tmpl Tue Dec 31 12:30:47 1991
32: ***************
33: *** 499,508 ****
34: --- 499,512 ----
35: #define HasGcc NO
36: #endif
37: #ifndef CcCmd
38: + #if HasGcc2
39: + #define CcCmd gcc -fpcc-struct-return
40: + #else
41: #if HasGcc
42: #define CcCmd gcc -fstrength-reduce -fpcc-struct-return
43: #else
44: #define CcCmd cc
45: + #endif
46: #endif
47: #endif
48: #if HasFortran
49: *** mit/config/sunLib.rules.ORIG Tue Dec 31 11:11:24 1991
50: --- mit/config/sunLib.rules Thu Jan 2 15:39:29 1992
51: ***************
52: *** 23,29 ****
53: --- 23,33 ----
54: #define SharedLibraryLoadFlags -assert pure-text
55: #endif
56: #ifndef PositionIndependentCFlags
57: + #if defined(HasGcc2)
58: + #define PositionIndependentCFlags -fpic
59: + #else
60: #define PositionIndependentCFlags -pic
61: + #endif
62: #endif
63:
64: /*
65: *** mit/config/site.def.ORIG Tue Dec 31 11:13:49 1991
66: --- mit/config/site.def Tue Dec 31 12:02:59 1991
67: ***************
68: *** 25,31 ****
69:
70: #ifdef BeforeVendorCF
71:
72: ! /* #define HasGcc YES */
73:
74: #endif /* BeforeVendorCF */
75:
76: --- 25,32 ----
77:
78: #ifdef BeforeVendorCF
79:
80: ! #define HasGcc YES
81: ! #define HasGcc2 YES
82:
83: #endif /* BeforeVendorCF */
84:
85: *** mit/config/sun.cf.ORIG Tue Dec 31 11:13:57 1991
86: --- mit/config/sun.cf Wed Jan 15 12:13:53 1992
87: ***************
88: *** 34,42 ****
89: --- 34,47 ----
90:
91: #if HasGcc
92:
93: + #define OptimizedCDebugFlags -O
94: + #if defined(HasGcc2)
95: + #define OptimizedCDebugFlags -O2
96: + #else
97: #define SharedLibraryCcCmd cc
98: #define ExtraLoadFlags -B/usr/bin/
99: #define AllocateLocalDefines /**/
100: + #endif
101:
102: .c.o:
103: $(CC) -c $(CFLAGS) $*.c
104:
105: *** mit/rgb/Imakefile.ORIG Wed Jan 15 16:43:18 1992
106: --- mit/rgb/Imakefile Thu Jan 2 13:34:09 1992
107: ***************
108: *** 17,23 ****
109: #if !(defined(SGIArchitecture) || SystemV4)
110: DBMLIB = -ldbm
111: #endif
112: ! #if defined(SparcArchitecture) && HasGcc
113: CC = cc
114: CCOPTIONS = /**/
115: EXTRA_LOAD_FLAGS = /**/
116: --- 17,23 ----
117: #if !(defined(SGIArchitecture) || SystemV4)
118: DBMLIB = -ldbm
119: #endif
120: ! #if defined(SparcArchitecture) && HasGcc && !defined(HasGcc2)
121: CC = cc
122: CCOPTIONS = /**/
123: EXTRA_LOAD_FLAGS = /**/
124: *** mit/server/os/Imakefile.ORIG Wed Jan 15 16:46:23 1992
125: --- mit/server/os/Imakefile Wed Jan 15 16:46:48 1992
126: ***************
127: *** 132,138 ****
128: SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES))
129: SpecialObjectRule(WaitFor.o,$(ICONFIGFILES),$(EXT_DEFINES))
130: SpecialObjectRule(fonttype.o,$(ICONFIGFILES),$(FONT_DEFINES))
131: ! #if defined(SparcArchitecture) && HasGcc
132: oscolor.o: $(ICONFIGFILES)
133: $(RM) $@
134: cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c
135: --- 132,138 ----
136: SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES))
137: SpecialObjectRule(WaitFor.o,$(ICONFIGFILES),$(EXT_DEFINES))
138: SpecialObjectRule(fonttype.o,$(ICONFIGFILES),$(FONT_DEFINES))
139: ! #if defined(SparcArchitecture) && HasGcc && !defined(HasGcc2)
140: oscolor.o: $(ICONFIGFILES)
141: $(RM) $@
142: cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c
143:
144:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.