File: no-make-in-extconf.patch

package info (click to toggle)
grpc 1.59.5-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 154,304 kB
  • sloc: cpp: 1,130,928; python: 91,228; ansic: 44,612; objc: 12,369; ruby: 11,884; sh: 8,043; php: 7,588; makefile: 3,927; xml: 3,620; cs: 2,160; java: 465; pascal: 286; awk: 132; javascript: 89
file content (45 lines) | stat: -rw-r--r-- 1,621 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--- a/src/ruby/ext/grpc/extconf.rb
+++ b/src/ruby/ext/grpc/extconf.rb
@@ -99,33 +99,6 @@ ENV['BUILDDIR'] = output_dir
 strip_tool = RbConfig::CONFIG['STRIP']
 strip_tool += ' -x' if apple_toolchain
 
-unless windows
-  puts 'Building internal gRPC into ' + grpc_lib_dir
-  nproc = 4
-  nproc = Etc.nprocessors if Etc.respond_to? :nprocessors
-  nproc_override = ENV['GRPC_RUBY_BUILD_PROCS']
-  unless nproc_override.nil? or nproc_override.size == 0
-    nproc = nproc_override
-    puts "Overriding make parallelism to #{nproc}"
-  end
-  make = bsd ? 'gmake' : 'make'
-  cmd = "#{make} -j#{nproc} -C #{grpc_root} #{grpc_lib_dir}/libgrpc.a CONFIG=#{grpc_config} Q="
-  puts "Building grpc native library: #{cmd}"
-  system(cmd)
-  exit 1 unless $? == 0
-
-  if grpc_config == 'opt'
-    rm_obj_cmd = "rm -rf #{File.join(output_dir, 'objs')}"
-    puts "Removing grpc object files: #{rm_obj_cmd}"
-    system(rm_obj_cmd)
-    exit 1 unless $? == 0
-    strip_cmd = "#{strip_tool} #{grpc_lib_dir}/*.a"
-    puts "Stripping grpc native library: #{strip_cmd}"
-    system(strip_cmd)
-    exit 1 unless $? == 0
-  end
-end
-
 $CFLAGS << ' -DGRPC_RUBY_WINDOWS_UCRT' if windows_ucrt
 $CFLAGS << ' -I' + File.join(grpc_root, 'include')
 
@@ -163,7 +136,7 @@ if apple_toolchain
   $LDFLAGS << ' -Wl,-exported_symbols_list,"' + ext_export_file + '.clang"'
 end
 
-$LDFLAGS << ' ' + File.join(grpc_lib_dir, 'libgrpc.a') unless windows
+$LDFLAGS << ' ' + '-Wl,-wrap,memcpy -lgrpc' unless windows
 if grpc_config == 'gcov'
   $CFLAGS << ' -O0 -fprofile-arcs -ftest-coverage'
   $LDFLAGS << ' -fprofile-arcs -ftest-coverage -rdynamic'