Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
22423fc9
Commit
22423fc9
authored
May 02, 2011
by
dterei
Browse files
LLVM: Add support for 64bit OSX. (partial
#4210
)
parent
70280417
Changes
2
Hide whitespace changes
Inline
Side-by-side
compiler/llvmGen/LlvmMangler.hs
View file @
22423fc9
...
...
@@ -12,6 +12,8 @@
module
LlvmMangler
(
llvmFixupAsm
)
where
#
include
"HsVersions.h"
import
Control.Exception
import
qualified
Data.ByteString.Char8
as
B
import
Data.Char
...
...
@@ -23,14 +25,20 @@ infoSec, newInfoSec, newLine, spInst, jmpInst :: B.ByteString
infoSec
=
B
.
pack
"
\t
.section
\t
__STRIP,__me"
newInfoSec
=
B
.
pack
"
\n\t
.text"
newLine
=
B
.
pack
"
\n
"
spInst
=
B
.
pack
", %esp
\n
"
jmpInst
=
B
.
pack
"
\n\t
jmp"
infoLen
,
spFix
,
labelStart
::
Int
infoLen
=
B
.
length
infoSec
spFix
=
4
infoLen
,
labelStart
,
spFix
::
Int
infoLen
=
B
.
length
infoSec
labelStart
=
B
.
length
jmpInst
#
if
x86_64_TARGET_ARCH
spInst
=
B
.
pack
", %rsp
\n
"
spFix
=
8
#
else
spInst
=
B
.
pack
", %esp
\n
"
spFix
=
4
#
endif
-- Search Predicates
eolPred
,
dollarPred
,
commaPred
::
Char
->
Bool
eolPred
=
((
==
)
'
\n
'
)
...
...
compiler/main/DynFlags.hs
View file @
22423fc9
...
...
@@ -1103,12 +1103,13 @@ parseDynamicFlags_ dflags0 args pkg_flags = do
when
(
not
(
null
errs
))
$
ghcError
$
errorsToGhcException
errs
let
(
pic_warns
,
dflags2
)
|
not
(
cTargetArch
==
X86_64
&&
cTargetOS
==
Linux
)
&&
|
not
(
cTargetArch
==
X86_64
&&
(
cTargetOS
==
Linux
||
cTargetOS
==
OSX
)
)
&&
(
not
opt_Static
||
opt_PIC
)
&&
hscTarget
dflags1
==
HscLlvm
=
([
L
noSrcSpan
$
"Warning: -fllvm is incompatible with -fPIC and -"
++
"dynamic on this platform;
\n
"
++
" using "
++
showHscTargetFlag
defaultObjectTarget
++
" instead"
],
=
([
L
noSrcSpan
$
"Warning: -fllvm is incompatible with -fPIC and "
++
"-dynamic on this platform;
\n
"
++
" using "
++
showHscTargetFlag
defaultObjectTarget
++
" instead"
],
dflags1
{
hscTarget
=
defaultObjectTarget
})
|
otherwise
=
(
[]
,
dflags1
)
...
...
dterei
@trac-dterei
mentioned in issue
#4210 (closed)
·
Jul 23, 2010
mentioned in issue
#4210 (closed)
mentioned in issue #4210
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment