Skip to content

Commit

Permalink
It has apparently become necessary to push gcc bin dir to path when b…
Browse files Browse the repository at this point in the history
…uilding sysimg. fix #29 (#30)
  • Loading branch information
dhoegh committed Jan 4, 2017
1 parent ef980c0 commit 9f16433
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/BuildExecutable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ function build_executable(exename, script_file, targetdir=nothing, cpu_target="n
emit_cmain(cfile, exename, targetdir != nothing)
emit_userimgjl(userimgjl, script_file)

empty_cmd_str = ``
println("running: $(julia) $(build_sysimg) $(sys.buildfile) $(cpu_target) $(userimgjl) --force" * (debug ? " --debug" : ""))
run(`$(julia) $(build_sysimg) $(sys.buildfile) $(cpu_target) $(userimgjl) --force $(debug ? "--debug" : empty_cmd_str)`)
println()

gcc = find_system_gcc()
win_arg = ``
# This argument is needed for the gcc, see issue #9973
Expand All @@ -130,6 +125,12 @@ function build_executable(exename, script_file, targetdir=nothing, cpu_target="n
push!(incs, "-I"*abspath(joinpath(dirname(gcc),"..","include")))
end
end

empty_cmd_str = ``
println("running: $(julia) $(build_sysimg) $(sys.buildfile) $(cpu_target) $(userimgjl) --force" * (debug ? " --debug" : ""))
cmd = setenv(`$(julia) $(build_sysimg) $(sys.buildfile) $(cpu_target) $(userimgjl) --force $(debug ? "--debug" : empty_cmd_str)`, ENV2)
run(cmd)
println()

println("running: $gcc -g $win_arg $(join(incs, " ")) $(cfile) -o $(exe_file.buildfile) -Wl,-rpath,$(sys.buildpath) -L$(sys.buildpath) $(exe_file.libjulia) -l$(exename)")
cmd = setenv(`$gcc -g $win_arg $(incs) $(cfile) -o $(exe_file.buildfile) -Wl,-rpath,$(sys.buildpath) -Wl,-rpath,$(sys.buildpath*"/julia") -L$(sys.buildpath) $(exe_file.libjulia) -l$(exename)`, ENV2)
Expand Down

0 comments on commit 9f16433

Please sign in to comment.