Skip to content

Commit

Permalink
Ensure that header files in git's source code are found first
Browse files Browse the repository at this point in the history
This solves an issue that occurs when libarchive has been built
and installed and its archive.h header file in
#{install_dir}/embedded/include is accidentally picked up when
compiling git.

Signed-off-by: Jeremiah Snapp <jeremiah@chef.io>
  • Loading branch information
jeremiahsnapp committed Feb 26, 2021
1 parent 4f488e7 commit f27688e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/software/git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@
config_hash["NO_R_TO_GCC_LINKER"] = "YesPlease"
end

# ensure that header files in git's source code are found first before looking in other directories
# this solves an issue that occurs when libarchive has been built and installed and its archive.h header
# file in #{install_dir}/embedded/include is accidentally picked up when compiling git
env["CFLAGS"] = "-I. #{env["CFLAGS"]}"
env["CPPFLAGS"] = "-I. #{env["CPPFLAGS"]}"
env["CXXFLAGS"] = "-I. #{env["CXXFLAGS"]}"

erb source: "config.mak.erb",
dest: "#{project_dir}/config.mak",
mode: 0755,
Expand Down

0 comments on commit f27688e

Please sign in to comment.