Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Alex D
GHC
Commits
dc392652
Commit
dc392652
authored
Jul 17, 2007
by
Clemens Fruhwirth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add hardwire-lib-paths option and make it default for inplace invocations
parent
d55027c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
compiler/Makefile
compiler/Makefile
+1
-1
compiler/main/DriverPipeline.hs
compiler/main/DriverPipeline.hs
+4
-2
compiler/main/StaticFlags.hs
compiler/main/StaticFlags.hs
+3
-0
No files found.
compiler/Makefile
View file @
dc392652
...
...
@@ -725,7 +725,7 @@ endif
$(INPLACE_HS)
:
Makefile $(FPTOOLS_TOP)/mk/config.mk
echo
"import System.Cmd; import
$(EnvImport)
; import System.Exit"
>
$@
echo
"main = do args <-
$(GetArgs)
; rawSystem
\"
$(TOP_ABS)
/
$(GHC_COMPILER_DIR_REL)
/
$(GHC_PROG)
\"
(
\"
-B
$(TOP_ABS)
\"
:args) >>= exitWith"
>>
$@
echo
"main = do args <-
$(GetArgs)
; rawSystem
\"
$(TOP_ABS)
/
$(GHC_COMPILER_DIR_REL)
/
$(GHC_PROG)
\"
(
\"
-B
$(TOP_ABS)
\"
:
\"
-fhardwire-lib-paths
\"
:
args) >>= exitWith"
>>
$@
$(INPLACE_PROG)
:
$(INPLACE_HS)
$(HC)
--make
$<
-o
$@
...
...
compiler/main/DriverPipeline.hs
View file @
dc392652
...
...
@@ -35,7 +35,7 @@ import Module
import
UniqFM
(
eltsUFM
)
import
ErrUtils
import
DynFlags
import
StaticFlags
(
v_Ld_inputs
,
opt_Static
,
WayName
(
..
)
)
import
StaticFlags
(
v_Ld_inputs
,
opt_Static
,
opt_HardwireLibPaths
,
WayName
(
..
)
)
import
Config
import
Panic
import
Util
...
...
@@ -1173,7 +1173,9 @@ linkBinary dflags o_files dep_packages = do
-- dependencies, and eliminating duplicates.
pkg_lib_paths
<-
getPackageLibraryPath
dflags
dep_packages
let
pkg_lib_path_opts
=
map
(
"-L"
++
)
pkg_lib_paths
let
pkg_lib_path_opts
=
concat
(
map
get_pkg_lib_path_opts
pkg_lib_paths
)
get_pkg_lib_path_opts
l
|
opt_HardwireLibPaths
=
[
"-L"
++
l
,
"-Wl,-rpath"
,
"-Wl,"
++
l
]
|
otherwise
=
[
"-L"
++
l
]
let
lib_paths
=
libraryPaths
dflags
let
lib_path_opts
=
map
(
"-L"
++
)
lib_paths
...
...
compiler/main/StaticFlags.hs
View file @
dc392652
...
...
@@ -57,6 +57,7 @@ module StaticFlags (
-- Related to linking
opt_PIC
,
opt_Static
,
opt_HardwireLibPaths
,
-- misc opts
opt_IgnoreDotGhci
,
...
...
@@ -328,6 +329,7 @@ opt_PIC = True
opt_PIC
=
lookUp
FSLIT
(
"-fPIC"
)
#
endif
opt_Static
=
lookUp
FSLIT
(
"-static"
)
opt_HardwireLibPaths
=
lookUp
FSLIT
(
"-fhardwire-lib-paths"
)
opt_Unregisterised
=
lookUp
FSLIT
(
"-funregisterised"
)
-- Derived, not a real option. Determines whether we will be compiling
...
...
@@ -368,6 +370,7 @@ isStaticFlag f =
"fexcess-precision"
,
"funfolding-update-in-place"
,
"static"
,
"fhardwire-lib-paths"
,
"funregisterised"
,
"fext-core"
,
"fcpr-off"
,
...
...
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