cc & ld extra flags
Mark Lentczner
mark.lentczner at gmail.com
Sat Jun 28 15:31:41 UTC 2014
I'd like to build GHC, and all the base libs, with an extra flag supplied
to cc (well gcc) and ld commands:
I thought I could just add this to mk/build.mk:
SRC_CC_OPTS = -mmacos-version-min=10.7
SRC_LD_OPTS = -mmacos-version-min=10.7
But this seems very inconsistently applied. For example:
This part of the build of the RTS gets it:
"inplace/bin/ghc-stage1" -optc-m64 -optc-fno-stack-protector
*-optc-mmacosx-version-min=10.7* -optc-Wall -optc-Wextra
-optc-Wstrict-prototypes -optc-Wmissing-prototypes
-optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return
-optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs
-optc-Wredundant-decls -optc-Iincludes -optc-Iincludes/dist
-optc-Iincludes/dist-derivedconstants/header
-optc-Iincludes/dist-ghcconstants/header -optc-Irts -optc-Irts/dist/build
-optc-DCOMPILING_RTS -optc-fno-strict-aliasing -optc-fno-common
-optc-DBE_CONSERVATIVE -optc-DDTRACE -optc-O2 -optc-fomit-frame-pointer
-optc-DRtsWay=\"rts_v\" -static -H32m -O -Iincludes -Iincludes/dist
-Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header
-Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -dcmm-lint
-DDTRACE -i -irts -irts/dist/build -irts/dist/build/autogen
-Irts/dist/build -Irts/dist/build/autogen -O2 -c rts/Hash.c -o
rts/dist/build/Hash.o
But this part doesn't:
"inplace/bin/ghc-stage2" -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -fPIC
-dynamic -H32m -O -hide-all-packages -i -iutils/haddock/driver
-iutils/haddock/src -iutils/haddock/vendor/attoparsec-0.10.4.0
-iutils/haddock/dist/build -iutils/haddock/dist/build/autogen
-Iutils/haddock/dist/build -Iutils/haddock/dist/build/autogen
-optP-DIN_GHC_TREE -optP-include
-optPutils/haddock/dist/build/autogen/cabal_macros.h -package
Cabal-1.18.1.3 -package array-0.5.0.0 -package base-4.7.0.1 -package
bytestring-0.10.4.0 -package containers-0.5.5.1 -package deepseq-1.3.0.2
-package directory-1.2.1.0 -package filepath-1.3.0.2 -package
ghc-7.8.2.20140623 -package xhtml-3000.2.1 -funbox-strict-fields -Wall
-fwarn-tabs -O2 -XHaskell2010 -no-user-package-db -rtsopts -odir
utils/haddock/dist/build -hidir utils/haddock/dist/build -stubdir
utils/haddock/dist/build -c utils/haddock/src/Haddock/Utf8.hs -o
utils/haddock/dist/build/Haddock/Utf8.dyn_o
I think it might have to do with the dyn_o and thr_o targets?
So - Is there a better way to ensure these flags are applied? I suppose I
could wrap gcc (clang) and ld.... but that seems ham-handed.
- Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140628/98cece39/attachment.html>
More information about the ghc-devs
mailing list