File tree 6 files changed +108
-28
lines changed
6 files changed +108
-28
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,26 @@ install_bundler() {
29
29
"$PREFIX_PATH"/bin/gem install bundler -v 1.17.3
30
30
}
31
31
32
- # Clang errors on warnings. Tell it to ignore this one.
33
- if cc -v 2>&1 | grep clang >/dev/null; then
34
- export RUBY_CFLAGS="$RUBY_CFLAGS -Wno-error=implicit-int -Wno-error=int-conversion -Wno-error=implicit-function-declaration -Wno-error=incompatible-function-pointer-types"
35
- fi
32
+ RUBY_CFLAGS=""
33
+ case "$(cc -v 2>&1)" in
34
+ *gcc*)
35
+ RUBY_CFLAGS+=" -Wno-discarded-qualifiers"
36
+ RUBY_CFLAGS+=" -Wno-implicit-int"
37
+ RUBY_CFLAGS+=" -Wno-incompatible-pointer-types"
38
+ RUBY_CFLAGS+=" -Wno-int-conversion"
39
+ RUBY_CFLAGS+=" -Wno-return-type"
40
+ ;;
41
+ *clang*)
42
+ RUBY_CFLAGS+=" -Wno-compound-token-split-by-macro"
43
+ RUBY_CFLAGS+=" -Wno-implicit-function-declaration"
44
+ RUBY_CFLAGS+=" -Wno-implicit-int"
45
+ RUBY_CFLAGS+=" -Wno-incompatible-function-pointer-types"
46
+ RUBY_CFLAGS+=" -Wno-int-conversion"
47
+ RUBY_CFLAGS+=" -Wno-return-type"
48
+ ;;
49
+ esac
50
+ export RUBY_CFLAGS
51
+
36
52
37
53
# M1-compatible OpenSSL 1.0 from https://github.com/basecamp/homebrew-dev
38
54
if type -p brew >/dev/null; then
Original file line number Diff line number Diff line change @@ -10,10 +10,23 @@ install_bundler() {
10
10
"$PREFIX_PATH"/bin/gem install bundler -v 1.17.3
11
11
}
12
12
13
- # Clang errors on warnings. Tell it to ignore this one.
14
- if cc -v 2>&1 | grep clang >/dev/null; then
15
- export RUBY_CFLAGS="$RUBY_CFLAGS -Wno-error=int-conversion -Wno-error=implicit-function-declaration -Wno-error=incompatible-function-pointer-types"
16
- fi
13
+ RUBY_CFLAGS=""
14
+ case "$(cc -v 2>&1)" in
15
+ *gcc*)
16
+ RUBY_CFLAGS+=" -Wno-discarded-qualifiers"
17
+ RUBY_CFLAGS+=" -Wno-incompatible-pointer-types"
18
+ RUBY_CFLAGS+=" -Wno-int-conversion"
19
+ RUBY_CFLAGS+=" -Wno-return-type"
20
+ ;;
21
+ *clang*)
22
+ RUBY_CFLAGS+=" -Wno-compound-token-split-by-macro"
23
+ RUBY_CFLAGS+=" -Wno-implicit-function-declaration"
24
+ RUBY_CFLAGS+=" -Wno-incompatible-function-pointer-types"
25
+ RUBY_CFLAGS+=" -Wno-int-conversion"
26
+ RUBY_CFLAGS+=" -Wno-return-type"
27
+ ;;
28
+ esac
29
+ export RUBY_CFLAGS
17
30
18
31
# M1-compatible OpenSSL 1.0 from https://github.com/basecamp/homebrew-dev
19
32
if type -p brew >/dev/null; then
Original file line number Diff line number Diff line change @@ -10,10 +10,26 @@ install_bundler() {
10
10
"$PREFIX_PATH"/bin/gem install bundler:1.17.3
11
11
}
12
12
13
- # Suppress warnings we aren't going to address so they don't flood build output"
14
- if cc -v 2>&1 | grep clang >/dev/null; then
15
- export RUBY_CFLAGS="-Wno-implicit-function-declaration -Wno-compound-token-split-by-macro"
16
- fi
13
+ RUBY_CFLAGS=""
14
+ case "$(cc -v 2>&1)" in
15
+ *gcc*)
16
+ RUBY_CFLAGS+=" -Wno-discarded-qualifiers"
17
+ RUBY_CFLAGS+=" -Wno-implicit-int"
18
+ RUBY_CFLAGS+=" -Wno-incompatible-pointer-types"
19
+ RUBY_CFLAGS+=" -Wno-int-conversion"
20
+ RUBY_CFLAGS+=" -Wno-return-type"
21
+ ;;
22
+ *clang*)
23
+ RUBY_CFLAGS+=" -Wno-compound-token-split-by-macro"
24
+ RUBY_CFLAGS+=" -Wno-implicit-function-declaration"
25
+ RUBY_CFLAGS+=" -Wno-implicit-int"
26
+ RUBY_CFLAGS+=" -Wno-incompatible-function-pointer-types"
27
+ RUBY_CFLAGS+=" -Wno-int-conversion"
28
+ RUBY_CFLAGS+=" -Wno-return-type"
29
+ ;;
30
+ esac
31
+ export RUBY_CFLAGS
32
+
17
33
18
34
# M1-compatible OpenSSL 1.0 from https://github.com/basecamp/homebrew-dev
19
35
if type -p brew >/dev/null; then
Original file line number Diff line number Diff line change @@ -10,10 +10,25 @@ install_bundler() {
10
10
"$PREFIX_PATH"/bin/gem install bundler:1.17.3
11
11
}
12
12
13
- # Suppress warnings we aren't going to address so they don't flood build output"
14
- if cc -v 2>&1 | grep clang >/dev/null; then
15
- export RUBY_CFLAGS="-Wno-implicit-function-declaration -Wno-compound-token-split-by-macro"
16
- fi
13
+ RUBY_CFLAGS=""
14
+ case "$(cc -v 2>&1)" in
15
+ *gcc*)
16
+ RUBY_CFLAGS+=" -Wno-discarded-qualifiers"
17
+ RUBY_CFLAGS+=" -Wno-implicit-int"
18
+ RUBY_CFLAGS+=" -Wno-incompatible-pointer-types"
19
+ RUBY_CFLAGS+=" -Wno-int-conversion"
20
+ RUBY_CFLAGS+=" -Wno-return-type"
21
+ ;;
22
+ *clang*)
23
+ RUBY_CFLAGS+=" -Wno-compound-token-split-by-macro"
24
+ RUBY_CFLAGS+=" -Wno-implicit-function-declaration"
25
+ RUBY_CFLAGS+=" -Wno-implicit-int"
26
+ RUBY_CFLAGS+=" -Wno-incompatible-function-pointer-types"
27
+ RUBY_CFLAGS+=" -Wno-int-conversion"
28
+ RUBY_CFLAGS+=" -Wno-return-type"
29
+ ;;
30
+ esac
31
+ export RUBY_CFLAGS
17
32
18
33
# M1-compatible OpenSSL 1.0 from https://github.com/basecamp/homebrew-dev
19
34
if type -p brew >/dev/null; then
Original file line number Diff line number Diff line change @@ -2,15 +2,26 @@ install_bundler() {
2
2
"$PREFIX_PATH"/bin/gem install bundler:2.3.27
3
3
}
4
4
5
- export RUBY_CFLAGS="-O3 -march=native"
5
+ RUBY_CFLAGS="-O3 -march=native"
6
+ case "$(cc -v 2>&1)" in
7
+ *gcc*)
8
+ RUBY_CFLAGS+=" -Wno-discarded-qualifiers"
9
+ RUBY_CFLAGS+=" -Wno-incompatible-pointer-types"
10
+ RUBY_CFLAGS+=" -Wno-int-conversion"
11
+ RUBY_CFLAGS+=" -Wno-return-type"
12
+ ;;
13
+ *clang*)
14
+ RUBY_CFLAGS+=" -Wno-compound-token-split-by-macro"
15
+ RUBY_CFLAGS+=" -Wno-implicit-function-declaration"
16
+ RUBY_CFLAGS+=" -Wno-incompatible-function-pointer-types"
17
+ RUBY_CFLAGS+=" -Wno-int-conversion"
18
+ RUBY_CFLAGS+=" -Wno-return-type"
19
+ ;;
20
+ esac
21
+ export RUBY_CFLAGS
6
22
7
23
package_option ruby configure --with-out-ext=tcl --with-out-ext=tk --disable-install-doc
8
24
9
- # GCC will complain about unrecognized warnings
10
- if cc -v 2>&1 | grep clang >/dev/null; then
11
- export RUBY_CFLAGS="$RUBY_CFLAGS -Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion -Wno-error=compound-token-split-by-macro -Wno-error=implicit-function-declaration"
12
- fi
13
-
14
25
install_package "openssl-1.1.1w" "https://www.openssl.org/source/openssl-1.1.1w.tar.gz#cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8" openssl
15
26
install_package "ruby-2.5.9" "https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.9.tar.bz2#bebbe3fe7899acd3ca2f213de38158709555e88a13f85ba5dc95239654bcfeeb" enable_shared standard
16
27
install_bundler
Original file line number Diff line number Diff line change @@ -2,12 +2,21 @@ install_bundler() {
2
2
"$PREFIX_PATH"/bin/gem install bundler:2.4.22
3
3
}
4
4
5
- export RUBY_CFLAGS="-O3 -march=native"
6
-
7
- # GCC will complain about unrecognized warnings
8
- if cc -v 2>&1 | grep clang >/dev/null; then
9
- export RUBY_CFLAGS="$RUBY_CFLAGS -Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion"
10
- fi
5
+ RUBY_CFLAGS="-O3 -march=native"
6
+ case "$(cc -v 2>&1)" in
7
+ *gcc*)
8
+ RUBY_CFLAGS+=" -Wno-discarded-qualifiers"
9
+ RUBY_CFLAGS+=" -Wno-incompatible-pointer-types"
10
+ RUBY_CFLAGS+=" -Wno-int-conversion"
11
+ RUBY_CFLAGS+=" -Wno-return-type"
12
+ ;;
13
+ *clang*)
14
+ RUBY_CFLAGS+=" -Wno-incompatible-function-pointer-types"
15
+ RUBY_CFLAGS+=" -Wno-int-conversion"
16
+ RUBY_CFLAGS+=" -Wno-return-type"
17
+ ;;
18
+ esac
19
+ export RUBY_CFLAGS
11
20
12
21
package_option ruby configure --with-out-ext=tcl --with-out-ext=tk --disable-install-doc
13
22
You can’t perform that action at this time.
0 commit comments