Skip to content

Commit 6b81ce1

Browse files
authored
ext: revert hacks for GNU/Musl compatibility (#3384)
**What problem is this PR intended to solve?** Over time, we've accumulated a couple of hacks specifically aimed at improving the compatibility of the `-linux` native gem on Musl systems. With #3375 we're building separate `-linux-gnu` and `-linux-musl` gems, so these hacks should no longer be needed. Let's remove them. **Have you included adequate test coverage?** We're testing on a matrix that includes Musl systems, so existing coverage should be adequate. **Does this change affect the behavior of either the C or the Java implementations?** N/A
2 parents e9a6291 + 74b1b98 commit 6b81ce1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ext/nokogiri/extconf.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ def configure
847847
# The libiconv configure script doesn't accept "arm64" host string but "aarch64"
848848
recipe.host = recipe.host.gsub("arm64-apple-darwin", "aarch64-apple-darwin")
849849

850-
cflags = concat_flags(ENV["CFLAGS"], "-O2", "-U_FORTIFY_SOURCE", "-g")
850+
cflags = concat_flags(ENV["CFLAGS"], "-O2", "-g")
851851

852852
recipe.configure_options += [
853853
"--disable-dependency-tracking",
@@ -911,7 +911,7 @@ def configure
911911
end
912912

913913
cppflags = concat_flags(ENV["CPPFLAGS"])
914-
cflags = concat_flags(ENV["CFLAGS"], "-O2", "-U_FORTIFY_SOURCE", "-g")
914+
cflags = concat_flags(ENV["CFLAGS"], "-O2", "-g")
915915

916916
if cross_build_p
917917
cppflags = concat_flags(cppflags, "-DNOKOGIRI_PRECOMPILED_LIBRARIES")
@@ -952,7 +952,6 @@ def configure
952952
"--with-c14n",
953953
"--with-debug",
954954
"--with-threads",
955-
"--without-tls", # see https://github.com/sparklemotion/nokogiri/issues/3031
956955
"CPPFLAGS=#{cppflags}",
957956
"CFLAGS=#{cflags}",
958957
]
@@ -971,7 +970,7 @@ def configure
971970
recipe.patch_files = Dir[File.join(PACKAGE_ROOT_DIR, "patches", "libxslt", "*.patch")].sort
972971
end
973972

974-
cflags = concat_flags(ENV["CFLAGS"], "-O2", "-U_FORTIFY_SOURCE", "-g")
973+
cflags = concat_flags(ENV["CFLAGS"], "-O2", "-g")
975974

976975
if darwin? && !cross_build_p
977976
recipe.configure_options << "RANLIB=/usr/bin/ranlib" unless ENV.key?("RANLIB")

0 commit comments

Comments
 (0)