Skip to content

Commit bfe40a2

Browse files
committed
ext(wip): don't set LIBPATH to avoid -Wl,-rpath linker args
1 parent f690505 commit bfe40a2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

ext/nokogiri/extconf.rb

+9-9
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ def configure
846846

847847
if zlib_recipe
848848
append_cppflags("-I#{zlib_recipe.path}/include")
849-
$LIBPATH = ["#{zlib_recipe.path}/lib"] | $LIBPATH
849+
# $LIBPATH = ["#{zlib_recipe.path}/lib"] | $LIBPATH
850850
ensure_package_configuration(
851851
opt: "zlib",
852852
pc: "zlib",
@@ -858,7 +858,7 @@ def configure
858858

859859
if libiconv_recipe
860860
append_cppflags("-I#{libiconv_recipe.path}/include")
861-
$LIBPATH = ["#{libiconv_recipe.path}/lib"] | $LIBPATH
861+
# $LIBPATH = ["#{libiconv_recipe.path}/lib"] | $LIBPATH
862862
ensure_package_configuration(
863863
opt: "iconv",
864864
pc: "iconv",
@@ -979,12 +979,12 @@ def configure
979979
%x(sh #{config} --libs).strip.shellsplit.each do |arg|
980980
case arg
981981
when /\A-L(.+)\z/
982-
# Prioritize ports' directories
983-
$LIBPATH = if Regexp.last_match(1).start_with?(PACKAGE_ROOT_DIR + "/")
984-
[Regexp.last_match(1)] | $LIBPATH
985-
else
986-
$LIBPATH | [Regexp.last_match(1)]
987-
end
982+
# # Prioritize ports' directories
983+
# $LIBPATH = if Regexp.last_match(1).start_with?(PACKAGE_ROOT_DIR + "/")
984+
# [Regexp.last_match(1)] | $LIBPATH
985+
# else
986+
# $LIBPATH | [Regexp.last_match(1)]
987+
# end
988988
when /\A-l./
989989
libs.unshift(arg)
990990
else
@@ -1078,7 +1078,7 @@ def compile
10781078
end
10791079
append_cppflags("-I#{File.join(libgumbo_recipe.path, "include")}")
10801080
$libs = $libs + " " + File.join(libgumbo_recipe.path, "lib", "libgumbo.a")
1081-
$LIBPATH = $LIBPATH | [File.join(libgumbo_recipe.path, "lib")]
1081+
# $LIBPATH = $LIBPATH | [File.join(libgumbo_recipe.path, "lib")]
10821082
ensure_func("gumbo_parse_with_options", "nokogiri_gumbo.h")
10831083

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

0 commit comments

Comments
 (0)