@@ -88,9 +88,15 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
88
88
'-msoft-float' : (0 , ArgumentListFilter .compileUnaryCallback ),
89
89
'-m3dnow' : (0 , ArgumentListFilter .compileUnaryCallback ),
90
90
'-mno-3dnow' : (0 , ArgumentListFilter .compileUnaryCallback ),
91
+ '-m16' : (0 , ArgumentListFilter .compileUnaryCallback ),
91
92
'-m32' : (0 , ArgumentListFilter .compileUnaryCallback ),
93
+ '-mx32' : (0 , ArgumentListFilter .compileUnaryCallback ),
92
94
'-m64' : (0 , ArgumentListFilter .compileUnaryCallback ),
95
+ '-miamcu' : (0 , ArgumentListFilter .compileUnaryCallback ),
93
96
'-mstackrealign' : (0 , ArgumentListFilter .compileUnaryCallback ),
97
+ '-mretpoline-external-thunk' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
98
+ '-mno-fp-ret-in-387' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
99
+ '-mskip-rax-setup' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
94
100
95
101
# Preprocessor assertion
96
102
'-A' : (1 , ArgumentListFilter .compileBinaryCallback ),
@@ -194,6 +200,14 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
194
200
'-coverage' : (0 , ArgumentListFilter .compileLinkUnaryCallback ),
195
201
'--coverage' : (0 , ArgumentListFilter .compileLinkUnaryCallback ),
196
202
203
+ # ian's additions while building the linux kernel
204
+
205
+ '/dev/null' : (0 , ArgumentListFilter .inputFileCallback ),
206
+ '-mno-80387' : (0 , ArgumentListFilter .compileUnaryCallback ), #gcc Don't generate output containing 80387 instructions for floating point.
207
+ "-mregparm=3"
208
+ "-march=i386"
209
+
210
+
197
211
#
198
212
# BD: need to warn the darwin user that these flags will rain on their parade
199
213
# (the Darwin ld is a bit single minded)
@@ -209,6 +223,8 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
209
223
# calling ld -r.
210
224
#
211
225
'-Wl,-dead_strip' : (0 , ArgumentListFilter .darwinWarningLinkUnaryCallback ),
226
+ '-Oz' : (0 , ArgumentListFilter .compileUnaryCallback ), #did not find this in the GCC options.
227
+ '-mno-global-merge' : (0 , ArgumentListFilter .compileUnaryCallback ), #clang (do not merge globals)
212
228
213
229
}
214
230
@@ -242,6 +258,14 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
242
258
r'^-std=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ),
243
259
r'^-stdlib=.+$' : (0 , ArgumentListFilter .compileLinkUnaryCallback ),
244
260
r'^-mtune=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ),
261
+ r'^-mstack-alignment=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
262
+ r'^-march=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
263
+ r'^-mregparm=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
264
+ r'^-mcmodel=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
265
+ r'^-mpreferred-stack-boundary=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
266
+ r'^-mindirect-branch=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
267
+
268
+
245
269
#iam: mac stuff...
246
270
r'-mmacosx-version-min=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ),
247
271
@@ -315,13 +339,21 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
315
339
316
340
def skipBitcodeGeneration (self ):
317
341
if os .environ .get ('WLLVM_CONFIGURE_ONLY' , False ):
318
- return True
319
- if not self .inputFiles or self .isEmitLLVM or self .isAssembly or self .isAssembleOnly :
320
- return True
321
- if self .isPreprocessOnly or self .isStandardIn or (self .isDependencyOnly and not self .isCompileOnly ):
322
- return True
323
- return False
324
-
342
+ return (True , "CFG Only" )
343
+ if not self .inputFiles :
344
+ return (True , "No input files" )
345
+ if self .isEmitLLVM :
346
+ return (True , "Emit LLVM" )
347
+ if self .isAssembly or self .isAssembleOnly :
348
+ return (True , "Assembly" )
349
+ if self .isPreprocessOnly :
350
+ return (True , "Preprocess Only" )
351
+ if self .isStandardIn :
352
+ return (True , "Standard In" )
353
+ if (self .isDependencyOnly and not self .isCompileOnly ):
354
+ return (True , "Dependency Only" )
355
+ return (False , "" )
356
+
325
357
def _shiftArgs (self , nargs ):
326
358
ret = []
327
359
while nargs > 0 :
0 commit comments