Skip to content

Commit

Permalink
ext(wip): don't set LIBPATH to avoid -Wl,-rpath linker args
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Feb 21, 2024
1 parent f690505 commit 74beb29
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ext/nokogiri/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ def configure

if zlib_recipe
append_cppflags("-I#{zlib_recipe.path}/include")
$LIBPATH = ["#{zlib_recipe.path}/lib"] | $LIBPATH
# $LIBPATH = ["#{zlib_recipe.path}/lib"] | $LIBPATH
ensure_package_configuration(
opt: "zlib",
pc: "zlib",
Expand All @@ -858,7 +858,7 @@ def configure

if libiconv_recipe
append_cppflags("-I#{libiconv_recipe.path}/include")
$LIBPATH = ["#{libiconv_recipe.path}/lib"] | $LIBPATH
# $LIBPATH = ["#{libiconv_recipe.path}/lib"] | $LIBPATH
ensure_package_configuration(
opt: "iconv",
pc: "iconv",
Expand Down Expand Up @@ -979,12 +979,12 @@ def configure
%x(sh #{config} --libs).strip.shellsplit.each do |arg|
case arg
when /\A-L(.+)\z/
# Prioritize ports' directories
$LIBPATH = if Regexp.last_match(1).start_with?(PACKAGE_ROOT_DIR + "/")
[Regexp.last_match(1)] | $LIBPATH
else
$LIBPATH | [Regexp.last_match(1)]
end
# # Prioritize ports' directories
# $LIBPATH = if Regexp.last_match(1).start_with?(PACKAGE_ROOT_DIR + "/")
# [Regexp.last_match(1)] | $LIBPATH
# else
# $LIBPATH | [Regexp.last_match(1)]
# end
when /\A-l./
libs.unshift(arg)
else
Expand Down Expand Up @@ -1078,7 +1078,7 @@ def compile
end
append_cppflags("-I#{File.join(libgumbo_recipe.path, "include")}")
$libs = $libs + " " + File.join(libgumbo_recipe.path, "lib", "libgumbo.a")
$LIBPATH = $LIBPATH | [File.join(libgumbo_recipe.path, "lib")]
# $LIBPATH = $LIBPATH | [File.join(libgumbo_recipe.path, "lib")]
ensure_func("gumbo_parse_with_options", "nokogiri_gumbo.h")

have_func("xmlHasFeature") || abort("xmlHasFeature() is missing.") # introduced in libxml 2.6.21
Expand Down

0 comments on commit 74beb29

Please sign in to comment.