ring-native 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGES.md +7 -0
- data/Makefile +5 -0
- data/README.md +12 -5
- data/Rakefile +4 -0
- data/ext/ring/extconf.rb +4 -5
- data/lib/ring/native.rb +3 -1
- data/lib/ring/native/version.rb +5 -1
- data/ring-native.gemspec +6 -6
- data/vendor/ring-ffi/Cargo.lock +26 -0
- data/vendor/ring-ffi/Cargo.toml +45 -0
- data/vendor/ring-ffi/LICENSE +16 -0
- data/vendor/ring-ffi/README.md +59 -0
- data/vendor/ring-ffi/src/lib.rs +79 -0
- metadata +10 -255
- data/vendor/ring/BUILDING.md +0 -40
- data/vendor/ring/Cargo.toml +0 -43
- data/vendor/ring/LICENSE +0 -185
- data/vendor/ring/Makefile +0 -35
- data/vendor/ring/PORTING.md +0 -163
- data/vendor/ring/README.md +0 -113
- data/vendor/ring/STYLE.md +0 -197
- data/vendor/ring/appveyor.yml +0 -27
- data/vendor/ring/build.rs +0 -108
- data/vendor/ring/crypto/aes/aes.c +0 -1142
- data/vendor/ring/crypto/aes/aes_test.Windows.vcxproj +0 -25
- data/vendor/ring/crypto/aes/aes_test.cc +0 -93
- data/vendor/ring/crypto/aes/asm/aes-586.pl +0 -2368
- data/vendor/ring/crypto/aes/asm/aes-armv4.pl +0 -1249
- data/vendor/ring/crypto/aes/asm/aes-x86_64.pl +0 -2246
- data/vendor/ring/crypto/aes/asm/aesni-x86.pl +0 -1318
- data/vendor/ring/crypto/aes/asm/aesni-x86_64.pl +0 -2084
- data/vendor/ring/crypto/aes/asm/aesv8-armx.pl +0 -675
- data/vendor/ring/crypto/aes/asm/bsaes-armv7.pl +0 -1364
- data/vendor/ring/crypto/aes/asm/bsaes-x86_64.pl +0 -1565
- data/vendor/ring/crypto/aes/asm/vpaes-x86.pl +0 -841
- data/vendor/ring/crypto/aes/asm/vpaes-x86_64.pl +0 -1116
- data/vendor/ring/crypto/aes/internal.h +0 -87
- data/vendor/ring/crypto/aes/mode_wrappers.c +0 -61
- data/vendor/ring/crypto/bn/add.c +0 -394
- data/vendor/ring/crypto/bn/asm/armv4-mont.pl +0 -694
- data/vendor/ring/crypto/bn/asm/armv8-mont.pl +0 -1503
- data/vendor/ring/crypto/bn/asm/bn-586.pl +0 -774
- data/vendor/ring/crypto/bn/asm/co-586.pl +0 -287
- data/vendor/ring/crypto/bn/asm/rsaz-avx2.pl +0 -1882
- data/vendor/ring/crypto/bn/asm/x86-mont.pl +0 -592
- data/vendor/ring/crypto/bn/asm/x86_64-gcc.c +0 -599
- data/vendor/ring/crypto/bn/asm/x86_64-mont.pl +0 -1393
- data/vendor/ring/crypto/bn/asm/x86_64-mont5.pl +0 -3507
- data/vendor/ring/crypto/bn/bn.c +0 -352
- data/vendor/ring/crypto/bn/bn_asn1.c +0 -74
- data/vendor/ring/crypto/bn/bn_test.Windows.vcxproj +0 -25
- data/vendor/ring/crypto/bn/bn_test.cc +0 -1696
- data/vendor/ring/crypto/bn/cmp.c +0 -200
- data/vendor/ring/crypto/bn/convert.c +0 -433
- data/vendor/ring/crypto/bn/ctx.c +0 -311
- data/vendor/ring/crypto/bn/div.c +0 -594
- data/vendor/ring/crypto/bn/exponentiation.c +0 -1335
- data/vendor/ring/crypto/bn/gcd.c +0 -711
- data/vendor/ring/crypto/bn/generic.c +0 -1019
- data/vendor/ring/crypto/bn/internal.h +0 -316
- data/vendor/ring/crypto/bn/montgomery.c +0 -516
- data/vendor/ring/crypto/bn/mul.c +0 -888
- data/vendor/ring/crypto/bn/prime.c +0 -829
- data/vendor/ring/crypto/bn/random.c +0 -334
- data/vendor/ring/crypto/bn/rsaz_exp.c +0 -262
- data/vendor/ring/crypto/bn/rsaz_exp.h +0 -53
- data/vendor/ring/crypto/bn/shift.c +0 -276
- data/vendor/ring/crypto/bytestring/bytestring_test.Windows.vcxproj +0 -25
- data/vendor/ring/crypto/bytestring/bytestring_test.cc +0 -421
- data/vendor/ring/crypto/bytestring/cbb.c +0 -399
- data/vendor/ring/crypto/bytestring/cbs.c +0 -227
- data/vendor/ring/crypto/bytestring/internal.h +0 -46
- data/vendor/ring/crypto/chacha/chacha_generic.c +0 -140
- data/vendor/ring/crypto/chacha/chacha_vec.c +0 -323
- data/vendor/ring/crypto/chacha/chacha_vec_arm.S +0 -1447
- data/vendor/ring/crypto/chacha/chacha_vec_arm_generate.go +0 -153
- data/vendor/ring/crypto/cipher/cipher_test.Windows.vcxproj +0 -25
- data/vendor/ring/crypto/cipher/e_aes.c +0 -390
- data/vendor/ring/crypto/cipher/e_chacha20poly1305.c +0 -208
- data/vendor/ring/crypto/cipher/internal.h +0 -173
- data/vendor/ring/crypto/cipher/test/aes_128_gcm_tests.txt +0 -543
- data/vendor/ring/crypto/cipher/test/aes_128_key_wrap_tests.txt +0 -9
- data/vendor/ring/crypto/cipher/test/aes_256_gcm_tests.txt +0 -475
- data/vendor/ring/crypto/cipher/test/aes_256_key_wrap_tests.txt +0 -23
- data/vendor/ring/crypto/cipher/test/chacha20_poly1305_old_tests.txt +0 -422
- data/vendor/ring/crypto/cipher/test/chacha20_poly1305_tests.txt +0 -484
- data/vendor/ring/crypto/cipher/test/cipher_test.txt +0 -100
- data/vendor/ring/crypto/constant_time_test.Windows.vcxproj +0 -25
- data/vendor/ring/crypto/constant_time_test.c +0 -304
- data/vendor/ring/crypto/cpu-arm-asm.S +0 -32
- data/vendor/ring/crypto/cpu-arm.c +0 -199
- data/vendor/ring/crypto/cpu-intel.c +0 -261
- data/vendor/ring/crypto/crypto.c +0 -151
- data/vendor/ring/crypto/curve25519/asm/x25519-arm.S +0 -2118
- data/vendor/ring/crypto/curve25519/curve25519.c +0 -4888
- data/vendor/ring/crypto/curve25519/x25519_test.cc +0 -128
- data/vendor/ring/crypto/digest/md32_common.h +0 -181
- data/vendor/ring/crypto/ec/asm/p256-x86_64-asm.pl +0 -2725
- data/vendor/ring/crypto/ec/ec.c +0 -193
- data/vendor/ring/crypto/ec/ec_curves.c +0 -61
- data/vendor/ring/crypto/ec/ec_key.c +0 -228
- data/vendor/ring/crypto/ec/ec_montgomery.c +0 -114
- data/vendor/ring/crypto/ec/example_mul.Windows.vcxproj +0 -25
- data/vendor/ring/crypto/ec/internal.h +0 -243
- data/vendor/ring/crypto/ec/oct.c +0 -253
- data/vendor/ring/crypto/ec/p256-64.c +0 -1794
- data/vendor/ring/crypto/ec/p256-x86_64-table.h +0 -9548
- data/vendor/ring/crypto/ec/p256-x86_64.c +0 -509
- data/vendor/ring/crypto/ec/simple.c +0 -1007
- data/vendor/ring/crypto/ec/util-64.c +0 -183
- data/vendor/ring/crypto/ec/wnaf.c +0 -508
- data/vendor/ring/crypto/ecdh/ecdh.c +0 -155
- data/vendor/ring/crypto/ecdsa/ecdsa.c +0 -304
- data/vendor/ring/crypto/ecdsa/ecdsa_asn1.c +0 -193
- data/vendor/ring/crypto/ecdsa/ecdsa_test.Windows.vcxproj +0 -25
- data/vendor/ring/crypto/ecdsa/ecdsa_test.cc +0 -327
- data/vendor/ring/crypto/header_removed.h +0 -17
- data/vendor/ring/crypto/internal.h +0 -495
- data/vendor/ring/crypto/libring.Windows.vcxproj +0 -101
- data/vendor/ring/crypto/mem.c +0 -98
- data/vendor/ring/crypto/modes/asm/aesni-gcm-x86_64.pl +0 -1045
- data/vendor/ring/crypto/modes/asm/ghash-armv4.pl +0 -517
- data/vendor/ring/crypto/modes/asm/ghash-x86.pl +0 -1393
- data/vendor/ring/crypto/modes/asm/ghash-x86_64.pl +0 -1741
- data/vendor/ring/crypto/modes/asm/ghashv8-armx.pl +0 -422
- data/vendor/ring/crypto/modes/ctr.c +0 -226
- data/vendor/ring/crypto/modes/gcm.c +0 -1206
- data/vendor/ring/crypto/modes/gcm_test.Windows.vcxproj +0 -25
- data/vendor/ring/crypto/modes/gcm_test.c +0 -348
- data/vendor/ring/crypto/modes/internal.h +0 -299
- data/vendor/ring/crypto/perlasm/arm-xlate.pl +0 -170
- data/vendor/ring/crypto/perlasm/readme +0 -100
- data/vendor/ring/crypto/perlasm/x86_64-xlate.pl +0 -1164
- data/vendor/ring/crypto/perlasm/x86asm.pl +0 -292
- data/vendor/ring/crypto/perlasm/x86gas.pl +0 -263
- data/vendor/ring/crypto/perlasm/x86masm.pl +0 -200
- data/vendor/ring/crypto/perlasm/x86nasm.pl +0 -187
- data/vendor/ring/crypto/poly1305/poly1305.c +0 -331
- data/vendor/ring/crypto/poly1305/poly1305_arm.c +0 -301
- data/vendor/ring/crypto/poly1305/poly1305_arm_asm.S +0 -2015
- data/vendor/ring/crypto/poly1305/poly1305_test.Windows.vcxproj +0 -25
- data/vendor/ring/crypto/poly1305/poly1305_test.cc +0 -80
- data/vendor/ring/crypto/poly1305/poly1305_test.txt +0 -52
- data/vendor/ring/crypto/poly1305/poly1305_vec.c +0 -892
- data/vendor/ring/crypto/rand/asm/rdrand-x86_64.pl +0 -75
- data/vendor/ring/crypto/rand/internal.h +0 -32
- data/vendor/ring/crypto/rand/rand.c +0 -189
- data/vendor/ring/crypto/rand/urandom.c +0 -219
- data/vendor/ring/crypto/rand/windows.c +0 -56
- data/vendor/ring/crypto/refcount_c11.c +0 -66
- data/vendor/ring/crypto/refcount_lock.c +0 -53
- data/vendor/ring/crypto/refcount_test.Windows.vcxproj +0 -25
- data/vendor/ring/crypto/refcount_test.c +0 -58
- data/vendor/ring/crypto/rsa/blinding.c +0 -462
- data/vendor/ring/crypto/rsa/internal.h +0 -108
- data/vendor/ring/crypto/rsa/padding.c +0 -300
- data/vendor/ring/crypto/rsa/rsa.c +0 -450
- data/vendor/ring/crypto/rsa/rsa_asn1.c +0 -261
- data/vendor/ring/crypto/rsa/rsa_impl.c +0 -944
- data/vendor/ring/crypto/rsa/rsa_test.Windows.vcxproj +0 -25
- data/vendor/ring/crypto/rsa/rsa_test.cc +0 -437
- data/vendor/ring/crypto/sha/asm/sha-armv8.pl +0 -436
- data/vendor/ring/crypto/sha/asm/sha-x86_64.pl +0 -2390
- data/vendor/ring/crypto/sha/asm/sha256-586.pl +0 -1275
- data/vendor/ring/crypto/sha/asm/sha256-armv4.pl +0 -735
- data/vendor/ring/crypto/sha/asm/sha256-armv8.pl +0 -14
- data/vendor/ring/crypto/sha/asm/sha256-x86_64.pl +0 -14
- data/vendor/ring/crypto/sha/asm/sha512-586.pl +0 -911
- data/vendor/ring/crypto/sha/asm/sha512-armv4.pl +0 -666
- data/vendor/ring/crypto/sha/asm/sha512-armv8.pl +0 -14
- data/vendor/ring/crypto/sha/asm/sha512-x86_64.pl +0 -14
- data/vendor/ring/crypto/sha/sha1.c +0 -271
- data/vendor/ring/crypto/sha/sha256.c +0 -204
- data/vendor/ring/crypto/sha/sha512.c +0 -355
- data/vendor/ring/crypto/test/file_test.cc +0 -326
- data/vendor/ring/crypto/test/file_test.h +0 -181
- data/vendor/ring/crypto/test/malloc.cc +0 -150
- data/vendor/ring/crypto/test/scoped_types.h +0 -95
- data/vendor/ring/crypto/test/test.Windows.vcxproj +0 -35
- data/vendor/ring/crypto/test/test_util.cc +0 -46
- data/vendor/ring/crypto/test/test_util.h +0 -41
- data/vendor/ring/crypto/thread_none.c +0 -55
- data/vendor/ring/crypto/thread_pthread.c +0 -165
- data/vendor/ring/crypto/thread_test.Windows.vcxproj +0 -25
- data/vendor/ring/crypto/thread_test.c +0 -200
- data/vendor/ring/crypto/thread_win.c +0 -282
- data/vendor/ring/examples/checkdigest.rs +0 -103
- data/vendor/ring/include/openssl/aes.h +0 -121
- data/vendor/ring/include/openssl/arm_arch.h +0 -129
- data/vendor/ring/include/openssl/base.h +0 -156
- data/vendor/ring/include/openssl/bn.h +0 -794
- data/vendor/ring/include/openssl/buffer.h +0 -18
- data/vendor/ring/include/openssl/bytestring.h +0 -235
- data/vendor/ring/include/openssl/chacha.h +0 -37
- data/vendor/ring/include/openssl/cmac.h +0 -76
- data/vendor/ring/include/openssl/cpu.h +0 -184
- data/vendor/ring/include/openssl/crypto.h +0 -43
- data/vendor/ring/include/openssl/curve25519.h +0 -88
- data/vendor/ring/include/openssl/ec.h +0 -225
- data/vendor/ring/include/openssl/ec_key.h +0 -129
- data/vendor/ring/include/openssl/ecdh.h +0 -110
- data/vendor/ring/include/openssl/ecdsa.h +0 -156
- data/vendor/ring/include/openssl/err.h +0 -201
- data/vendor/ring/include/openssl/mem.h +0 -101
- data/vendor/ring/include/openssl/obj_mac.h +0 -71
- data/vendor/ring/include/openssl/opensslfeatures.h +0 -68
- data/vendor/ring/include/openssl/opensslv.h +0 -18
- data/vendor/ring/include/openssl/ossl_typ.h +0 -18
- data/vendor/ring/include/openssl/poly1305.h +0 -51
- data/vendor/ring/include/openssl/rand.h +0 -70
- data/vendor/ring/include/openssl/rsa.h +0 -399
- data/vendor/ring/include/openssl/thread.h +0 -133
- data/vendor/ring/include/openssl/type_check.h +0 -71
- data/vendor/ring/mk/Common.props +0 -63
- data/vendor/ring/mk/Windows.props +0 -42
- data/vendor/ring/mk/WindowsTest.props +0 -18
- data/vendor/ring/mk/appveyor.bat +0 -62
- data/vendor/ring/mk/bottom_of_makefile.mk +0 -54
- data/vendor/ring/mk/ring.mk +0 -266
- data/vendor/ring/mk/top_of_makefile.mk +0 -214
- data/vendor/ring/mk/travis.sh +0 -40
- data/vendor/ring/mk/update-travis-yml.py +0 -229
- data/vendor/ring/ring.sln +0 -153
- data/vendor/ring/src/aead.rs +0 -682
- data/vendor/ring/src/agreement.rs +0 -248
- data/vendor/ring/src/c.rs +0 -129
- data/vendor/ring/src/constant_time.rs +0 -37
- data/vendor/ring/src/der.rs +0 -96
- data/vendor/ring/src/digest.rs +0 -690
- data/vendor/ring/src/digest_tests.txt +0 -57
- data/vendor/ring/src/ecc.rs +0 -28
- data/vendor/ring/src/ecc_build.rs +0 -279
- data/vendor/ring/src/ecc_curves.rs +0 -117
- data/vendor/ring/src/ed25519_tests.txt +0 -2579
- data/vendor/ring/src/exe_tests.rs +0 -46
- data/vendor/ring/src/ffi.rs +0 -29
- data/vendor/ring/src/file_test.rs +0 -187
- data/vendor/ring/src/hkdf.rs +0 -153
- data/vendor/ring/src/hkdf_tests.txt +0 -59
- data/vendor/ring/src/hmac.rs +0 -414
- data/vendor/ring/src/hmac_tests.txt +0 -97
- data/vendor/ring/src/input.rs +0 -312
- data/vendor/ring/src/lib.rs +0 -41
- data/vendor/ring/src/pbkdf2.rs +0 -265
- data/vendor/ring/src/pbkdf2_tests.txt +0 -113
- data/vendor/ring/src/polyfill.rs +0 -57
- data/vendor/ring/src/rand.rs +0 -28
- data/vendor/ring/src/signature.rs +0 -314
- data/vendor/ring/third-party/NIST/README.md +0 -9
- data/vendor/ring/third-party/NIST/SHAVS/SHA1LongMsg.rsp +0 -263
- data/vendor/ring/third-party/NIST/SHAVS/SHA1Monte.rsp +0 -309
- data/vendor/ring/third-party/NIST/SHAVS/SHA1ShortMsg.rsp +0 -267
- data/vendor/ring/third-party/NIST/SHAVS/SHA224LongMsg.rsp +0 -263
- data/vendor/ring/third-party/NIST/SHAVS/SHA224Monte.rsp +0 -309
- data/vendor/ring/third-party/NIST/SHAVS/SHA224ShortMsg.rsp +0 -267
- data/vendor/ring/third-party/NIST/SHAVS/SHA256LongMsg.rsp +0 -263
- data/vendor/ring/third-party/NIST/SHAVS/SHA256Monte.rsp +0 -309
- data/vendor/ring/third-party/NIST/SHAVS/SHA256ShortMsg.rsp +0 -267
- data/vendor/ring/third-party/NIST/SHAVS/SHA384LongMsg.rsp +0 -519
- data/vendor/ring/third-party/NIST/SHAVS/SHA384Monte.rsp +0 -309
- data/vendor/ring/third-party/NIST/SHAVS/SHA384ShortMsg.rsp +0 -523
- data/vendor/ring/third-party/NIST/SHAVS/SHA512LongMsg.rsp +0 -519
- data/vendor/ring/third-party/NIST/SHAVS/SHA512Monte.rsp +0 -309
- data/vendor/ring/third-party/NIST/SHAVS/SHA512ShortMsg.rsp +0 -523
- data/vendor/ring/third-party/NIST/sha256sums.txt +0 -1
data/vendor/ring/mk/ring.mk
DELETED
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
# Copyright 2015 Brian Smith.
|
|
2
|
-
#
|
|
3
|
-
# Permission to use, copy, modify, and/or distribute this software for any
|
|
4
|
-
# purpose with or without fee is hereby granted, provided that the above
|
|
5
|
-
# copyright notice and this permission notice appear in all copies.
|
|
6
|
-
#
|
|
7
|
-
# THE SOFTWARE IS PROVIDED "AS IS" AND BRIAN SMITH AND THE AUTHORS DISCLAIM
|
|
8
|
-
# ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
|
9
|
-
# OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL BRIAN SMITH OR THE AUTHORS
|
|
10
|
-
# BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
|
|
11
|
-
# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
|
12
|
-
# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
13
|
-
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
|
|
15
|
-
RING_PREFIX ?= ring/
|
|
16
|
-
|
|
17
|
-
RING_CPPFLAGS = $(RING_THREAD_FLAGS) -I$(RING_PREFIX)include -I$(GENERATED_CODE_DIR) -D_XOPEN_SOURCE=700
|
|
18
|
-
|
|
19
|
-
RING_LDLIBS = $(RING_THREAD_FLAGS) -L$(dir $(RING_LIB)) -lring-core
|
|
20
|
-
|
|
21
|
-
RING_SRCS = $(addprefix $(RING_PREFIX), \
|
|
22
|
-
crypto/aes/aes.c \
|
|
23
|
-
crypto/aes/mode_wrappers.c \
|
|
24
|
-
crypto/bn/add.c \
|
|
25
|
-
crypto/bn/asm/x86_64-gcc.c \
|
|
26
|
-
crypto/bn/bn.c \
|
|
27
|
-
crypto/bn/bn_asn1.c \
|
|
28
|
-
crypto/bn/cmp.c \
|
|
29
|
-
crypto/bn/convert.c \
|
|
30
|
-
crypto/bn/ctx.c \
|
|
31
|
-
crypto/bn/div.c \
|
|
32
|
-
crypto/bn/exponentiation.c \
|
|
33
|
-
crypto/bn/gcd.c \
|
|
34
|
-
crypto/bn/generic.c \
|
|
35
|
-
crypto/bn/montgomery.c \
|
|
36
|
-
crypto/bn/mul.c \
|
|
37
|
-
crypto/bn/prime.c \
|
|
38
|
-
crypto/bn/random.c \
|
|
39
|
-
crypto/bn/rsaz_exp.c \
|
|
40
|
-
crypto/bn/shift.c \
|
|
41
|
-
crypto/bytestring/cbb.c \
|
|
42
|
-
crypto/bytestring/cbs.c \
|
|
43
|
-
crypto/chacha/chacha_generic.c \
|
|
44
|
-
crypto/chacha/chacha_vec.c \
|
|
45
|
-
crypto/cipher/e_aes.c \
|
|
46
|
-
crypto/cipher/e_chacha20poly1305.c \
|
|
47
|
-
crypto/cpu-arm.c \
|
|
48
|
-
crypto/cpu-intel.c \
|
|
49
|
-
crypto/crypto.c \
|
|
50
|
-
crypto/curve25519/curve25519.c \
|
|
51
|
-
crypto/ec/ec.c \
|
|
52
|
-
crypto/ec/ec_curves.c \
|
|
53
|
-
crypto/ec/ec_key.c \
|
|
54
|
-
crypto/ec/ec_montgomery.c \
|
|
55
|
-
crypto/ec/oct.c \
|
|
56
|
-
crypto/ec/p256-64.c \
|
|
57
|
-
crypto/ec/p256-x86_64.c \
|
|
58
|
-
crypto/ec/simple.c \
|
|
59
|
-
crypto/ec/util-64.c \
|
|
60
|
-
crypto/ec/wnaf.c \
|
|
61
|
-
crypto/ecdh/ecdh.c \
|
|
62
|
-
crypto/ecdsa/ecdsa.c \
|
|
63
|
-
crypto/ecdsa/ecdsa_asn1.c \
|
|
64
|
-
crypto/mem.c \
|
|
65
|
-
crypto/modes/ctr.c \
|
|
66
|
-
crypto/modes/gcm.c \
|
|
67
|
-
crypto/poly1305/poly1305.c \
|
|
68
|
-
crypto/poly1305/poly1305_arm.c \
|
|
69
|
-
crypto/poly1305/poly1305_vec.c \
|
|
70
|
-
crypto/rand/rand.c \
|
|
71
|
-
crypto/rand/urandom.c \
|
|
72
|
-
crypto/refcount_c11.c \
|
|
73
|
-
crypto/refcount_lock.c \
|
|
74
|
-
crypto/rsa/blinding.c \
|
|
75
|
-
crypto/rsa/padding.c \
|
|
76
|
-
crypto/rsa/rsa.c \
|
|
77
|
-
crypto/rsa/rsa_asn1.c \
|
|
78
|
-
crypto/rsa/rsa_impl.c \
|
|
79
|
-
crypto/sha/sha1.c \
|
|
80
|
-
crypto/sha/sha256.c \
|
|
81
|
-
crypto/sha/sha512.c \
|
|
82
|
-
$(NULL))
|
|
83
|
-
|
|
84
|
-
# TODO: make all .a files depend on these too.
|
|
85
|
-
RING_x86_SRCS = $(addprefix $(RING_PREFIX), \
|
|
86
|
-
crypto/aes/asm/aes-586.pl \
|
|
87
|
-
crypto/aes/asm/aesni-x86.pl \
|
|
88
|
-
crypto/aes/asm/vpaes-x86.pl \
|
|
89
|
-
crypto/bn/asm/bn-586.pl \
|
|
90
|
-
crypto/bn/asm/co-586.pl \
|
|
91
|
-
crypto/bn/asm/x86-mont.pl \
|
|
92
|
-
crypto/modes/asm/ghash-x86.pl \
|
|
93
|
-
crypto/sha/asm/sha256-586.pl \
|
|
94
|
-
crypto/sha/asm/sha512-586.pl \
|
|
95
|
-
$(NULL))
|
|
96
|
-
|
|
97
|
-
RING_x86_64_SRCS = $(addprefix $(RING_PREFIX), \
|
|
98
|
-
crypto/aes/asm/aes-x86_64.pl \
|
|
99
|
-
crypto/aes/asm/aesni-x86_64.pl \
|
|
100
|
-
crypto/aes/asm/bsaes-x86_64.pl \
|
|
101
|
-
crypto/aes/asm/vpaes-x86_64.pl \
|
|
102
|
-
crypto/bn/asm/rsaz-avx2.pl \
|
|
103
|
-
crypto/bn/asm/x86_64-mont.pl \
|
|
104
|
-
crypto/bn/asm/x86_64-mont5.pl \
|
|
105
|
-
crypto/ec/asm/p256-x86_64-asm.pl \
|
|
106
|
-
crypto/modes/asm/aesni-gcm-x86_64.pl \
|
|
107
|
-
crypto/modes/asm/ghash-x86_64.pl \
|
|
108
|
-
crypto/rand/asm/rdrand-x86_64.pl \
|
|
109
|
-
crypto/sha/asm/sha256-x86_64.pl \
|
|
110
|
-
crypto/sha/asm/sha512-x86_64.pl \
|
|
111
|
-
$(NULL))
|
|
112
|
-
|
|
113
|
-
RING_ARM_SHARED_SRCS = \
|
|
114
|
-
crypto/aes/asm/aesv8-armx.pl \
|
|
115
|
-
crypto/cpu-arm-asm.S \
|
|
116
|
-
$(NULL)
|
|
117
|
-
|
|
118
|
-
RING_arm_SRCS = $(addprefix $(RING_PREFIX), \
|
|
119
|
-
crypto/aes/asm/aes-armv4.pl \
|
|
120
|
-
crypto/aes/asm/bsaes-armv7.pl \
|
|
121
|
-
crypto/bn/asm/armv4-mont.pl \
|
|
122
|
-
crypto/modes/asm/ghash-armv4.pl \
|
|
123
|
-
crypto/sha/asm/sha256-armv4.pl \
|
|
124
|
-
crypto/sha/asm/sha512-armv4.pl \
|
|
125
|
-
$(RING_ARM_SHARED_SRCS) \
|
|
126
|
-
$(NULL))
|
|
127
|
-
|
|
128
|
-
# TODO
|
|
129
|
-
RING_CPPFLAGS += -D__ARM_MAX_ARCH__=7
|
|
130
|
-
|
|
131
|
-
RING_arm_SRCS += $(addprefix $(RING_PREFIX), \
|
|
132
|
-
crypto/chacha/chacha_vec_arm.S \
|
|
133
|
-
crypto/poly1305/poly1305_arm_asm.S \
|
|
134
|
-
$(NULL))
|
|
135
|
-
|
|
136
|
-
RING_aarch64_SRCS = $(addprefix $(RING_PREFIX), \
|
|
137
|
-
crypto/bn/asm/armv8-mont.pl \
|
|
138
|
-
crypto/modes/asm/ghashv8-armx.pl \
|
|
139
|
-
crypto/sha/asm/sha256-armv8.pl \
|
|
140
|
-
crypto/sha/asm/sha512-armv8.pl \
|
|
141
|
-
$(RING_ARM_SHARED_SRCS) \
|
|
142
|
-
$(NULL))
|
|
143
|
-
|
|
144
|
-
ifeq ($(TARGET_SYS),none)
|
|
145
|
-
RING_THREAD_FLAGS += -DOPENSSL_TRUSTY=1 -DOPENSSL_NO_THREADS=1
|
|
146
|
-
RING_SRCS += $(addprefix $(RING_PREFIX), crypto/thread_none.c)
|
|
147
|
-
else
|
|
148
|
-
RING_THREAD_FLAGS += -pthread
|
|
149
|
-
RING_SRCS += $(addprefix $(RING_PREFIX), crypto/thread_pthread.c)
|
|
150
|
-
endif
|
|
151
|
-
|
|
152
|
-
RING_ASM_OBJS = \
|
|
153
|
-
$(addprefix $(OBJ_PREFIX), \
|
|
154
|
-
$(patsubst %.pl, %.o, \
|
|
155
|
-
$(patsubst %.S, %.o, $(RING_$(TARGET_ARCH_NORMAL)_SRCS))))
|
|
156
|
-
|
|
157
|
-
$(RING_ASM_OBJS): CPPFLAGS += -I$(RING_PREFIX)crypto
|
|
158
|
-
|
|
159
|
-
RING_OBJS = $(addprefix $(OBJ_PREFIX), $(patsubst %.c, %.o, $(RING_SRCS)))
|
|
160
|
-
|
|
161
|
-
ifeq ($(NO_ASM),)
|
|
162
|
-
RING_OBJS += $(RING_ASM_OBJS)
|
|
163
|
-
else
|
|
164
|
-
RING_CPPFLAGS += -DOPENSSL_NO_ASM=1
|
|
165
|
-
endif
|
|
166
|
-
|
|
167
|
-
RING_LIB = $(LIB_PREFIX)libring-core.a
|
|
168
|
-
|
|
169
|
-
# Recent versions of Linux have the D flag for deterministic builds, but Darwin
|
|
170
|
-
# (at least) doesn't. Accroding to Debian's documentation, binutils is built
|
|
171
|
-
# with --enable-determnistic-archives by default and we shouldn't need to
|
|
172
|
-
# worry about it.
|
|
173
|
-
$(RING_LIB): ARFLAGS = crs
|
|
174
|
-
$(RING_LIB): $(RING_OBJS) $(RING_PREFIX)mk/ring.mk
|
|
175
|
-
$(RM) $@
|
|
176
|
-
$(AR) $(ARFLAGS) $@ $(filter-out $(RING_PREFIX)mk/ring.mk, $^)
|
|
177
|
-
|
|
178
|
-
RING_TEST_LIB_SRCS = \
|
|
179
|
-
crypto/test/file_test.cc \
|
|
180
|
-
crypto/test/malloc.cc \
|
|
181
|
-
crypto/test/test_util.cc \
|
|
182
|
-
$(NULL)
|
|
183
|
-
|
|
184
|
-
RING_TEST_LIB_OBJS = $(addprefix $(OBJ_PREFIX), \
|
|
185
|
-
$(patsubst %.c, %.o, \
|
|
186
|
-
$(patsubst %.cc, %.o, \
|
|
187
|
-
$(RING_TEST_LIB_SRCS))))
|
|
188
|
-
|
|
189
|
-
RING_TEST_MAIN_SRCS = $(addprefix $(RING_PREFIX), \
|
|
190
|
-
crypto/aes/aes_test.cc \
|
|
191
|
-
crypto/bn/bn_test.cc \
|
|
192
|
-
crypto/bytestring/bytestring_test.cc \
|
|
193
|
-
crypto/constant_time_test.c \
|
|
194
|
-
crypto/ecdsa/ecdsa_test.cc \
|
|
195
|
-
crypto/modes/gcm_test.c \
|
|
196
|
-
crypto/poly1305/poly1305_test.cc \
|
|
197
|
-
crypto/refcount_test.c \
|
|
198
|
-
crypto/rsa/rsa_test.cc \
|
|
199
|
-
crypto/thread_test.c \
|
|
200
|
-
$(NULL))
|
|
201
|
-
|
|
202
|
-
RING_TEST_MAIN_OBJS = $(addprefix $(OBJ_PREFIX), \
|
|
203
|
-
$(patsubst %.c, %.o, \
|
|
204
|
-
$(patsubst %.cc, %.o, \
|
|
205
|
-
$(RING_TEST_MAIN_SRCS))))
|
|
206
|
-
|
|
207
|
-
RING_TEST_EXES = $(RING_TEST_MAIN_OBJS:$(OBJ_PREFIX)%.o=$(EXE_PREFIX)%)
|
|
208
|
-
|
|
209
|
-
ifeq ($(TARGET_SYS),none)
|
|
210
|
-
$(RING_TEST_EXES): LDLIBS += --specs=rdimon.specs
|
|
211
|
-
endif
|
|
212
|
-
$(RING_TEST_EXES): LDLIBS += $(RING_LDLIBS)
|
|
213
|
-
$(RING_TEST_EXES): $(EXE_PREFIX)% : \
|
|
214
|
-
$(OBJ_PREFIX)%.o \
|
|
215
|
-
$(RING_LIB) \
|
|
216
|
-
$(RING_TEST_LIB_OBJS) \
|
|
217
|
-
$(NULL)
|
|
218
|
-
$(CXX) $(filter-out $(RING_LIB),$^) $(LDFLAGS) $(LDLIBS) $(TARGET_ARCH) -o $@
|
|
219
|
-
|
|
220
|
-
# TODO: Fix the code so -Wno- overrides are not needed.
|
|
221
|
-
$(RING_OBJS) \
|
|
222
|
-
$(RING_TEST_LIB_OBJS) \
|
|
223
|
-
$(RING_TEST_MAIN_OBJS) \
|
|
224
|
-
$(NULL): CPPFLAGS += $(RING_CPPFLAGS) \
|
|
225
|
-
-DBORINGSSL_IMPLEMENTATION \
|
|
226
|
-
-Wno-cast-qual \
|
|
227
|
-
-Wno-pedantic \
|
|
228
|
-
-Wno-sign-compare \
|
|
229
|
-
-Wno-unused-parameter \
|
|
230
|
-
-Wno-cast-align \
|
|
231
|
-
-Wno-format \
|
|
232
|
-
-Wno-format-nonliteral \
|
|
233
|
-
-Wno-type-limits \
|
|
234
|
-
$(NULL)
|
|
235
|
-
$(RING_OBJS) \
|
|
236
|
-
$(RING_TEST_LIB_OBJS) \
|
|
237
|
-
$(RING_TEST_MAIN_OBJS) \
|
|
238
|
-
$(NULL): CFLAGS += -Wno-bad-function-cast \
|
|
239
|
-
-Wno-nested-externs \
|
|
240
|
-
$(NULL)
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
PERLASM_LIB_SRCS = $(addprefix $(RING_PREFIX), \
|
|
244
|
-
crypto/perlasm/arm-xlate.pl \
|
|
245
|
-
crypto/perlasm/x86asm.pl \
|
|
246
|
-
crypto/perlasm/x86gas.pl \
|
|
247
|
-
crypto/perlasm/x86masm.pl \
|
|
248
|
-
crypto/perlasm/x86nasm.pl \
|
|
249
|
-
crypto/perlasm/x86_64-xlate.pl \
|
|
250
|
-
$(NULL))
|
|
251
|
-
|
|
252
|
-
PERL_EXECUTABLE ?= perl
|
|
253
|
-
|
|
254
|
-
# The British spelling "flavour" is used for consistency with perlasm's code.
|
|
255
|
-
ifeq ($(findstring darwin,$(TARGET_SYS)),darwin)
|
|
256
|
-
PERLASM_FLAVOUR ?= macosx
|
|
257
|
-
else
|
|
258
|
-
PERLASM_FLAVOUR ?= elf
|
|
259
|
-
endif
|
|
260
|
-
|
|
261
|
-
PERLASM_x86_ARGS = $(PERLASM_FLAVOUR) -fPIC -DOPENSSL_IA32_SSE2
|
|
262
|
-
PERLASM_x86_64_ARGS = $(PERLASM_FLAVOUR)
|
|
263
|
-
PERLASM_ARGS = $(PERLASM_$(TARGET_ARCH_NORMAL)_ARGS)
|
|
264
|
-
|
|
265
|
-
$(OBJ_PREFIX)%.S: %.pl $(PERLASM_LIB_SRCS)
|
|
266
|
-
${PERL_EXECUTABLE} $< $(PERLASM_ARGS) > $@
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
# Copyright 2015 Brian Smith.
|
|
2
|
-
#
|
|
3
|
-
# Permission to use, copy, modify, and/or distribute this software for any
|
|
4
|
-
# purpose with or without fee is hereby granted, provided that the above
|
|
5
|
-
# copyright notice and this permission notice appear in all copies.
|
|
6
|
-
#
|
|
7
|
-
# THE SOFTWARE IS PROVIDED "AS IS" AND BRIAN SMITH AND THE AUTHORS DISCLAIM
|
|
8
|
-
# ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
|
9
|
-
# OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL BRIAN SMITH OR THE AUTHORS
|
|
10
|
-
# BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
|
|
11
|
-
# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
|
12
|
-
# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
13
|
-
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
|
|
15
|
-
.DEFAULT_GOAL := all
|
|
16
|
-
|
|
17
|
-
# $(TARGET) must be of the form <arch>-<vendor>-<sys>-<abi>, except <abi> can
|
|
18
|
-
# omitted on Mac OS X (Darwin).
|
|
19
|
-
TARGET_WORDS = $(subst -, ,$(TARGET))
|
|
20
|
-
TARGET_ARCH_BASE = $(word 1,$(TARGET_WORDS))
|
|
21
|
-
TARGET_ARCH_NORMAL = \
|
|
22
|
-
$(strip $(if $(findstring arm, $(TARGET_ARCH_BASE)),arm, \
|
|
23
|
-
$(if $(filter i386 i486 i586 i686, \
|
|
24
|
-
$(TARGET_ARCH_BASE)),x86,$(TARGET_ARCH_BASE))))
|
|
25
|
-
|
|
26
|
-
TARGET_VENDOR = $(word 2,$(TARGET_WORDS))
|
|
27
|
-
TARGET_SYS = $(word 3,$(TARGET_WORDS))
|
|
28
|
-
TARGET_ABI = $(word 4,$(TARGET_WORDS))
|
|
29
|
-
|
|
30
|
-
# Cargo doesn't pass the ABI as part of TARGET on Mac OS X.
|
|
31
|
-
ifeq ($(TARGET_ABI),)
|
|
32
|
-
ifeq ($(findstring apple-darwin,$(TARGET_VENDOR)-$(TARGET_SYS)),apple-darwin)
|
|
33
|
-
TARGET_ABI = macho
|
|
34
|
-
else
|
|
35
|
-
define NEWLINE
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
endef
|
|
39
|
-
$(error TARGET must be of the form \
|
|
40
|
-
<arch>[<sub>]-<vendor>-<sys>-<abi>.$(NEWLINE)\
|
|
41
|
-
\
|
|
42
|
-
\ Exceptions: <abi> defaults to "macho" on Mac OS X.\
|
|
43
|
-
\
|
|
44
|
-
Linux x86 example: TARGET=i586-pc-linux-gnu $(NEWLINE)\
|
|
45
|
-
Mac OS X x64 example: TARGET=x86_64-apple-darwin $(NEWLINE)\
|
|
46
|
-
\
|
|
47
|
-
NOTE: Use "i586" instead of "x86".)
|
|
48
|
-
endif
|
|
49
|
-
endif
|
|
50
|
-
|
|
51
|
-
# XXX: Apple's toolchain fails to link when the |-target| arch is "x86_64",
|
|
52
|
-
# so just skip -target on Darwin for now.
|
|
53
|
-
ifneq ($(TARGET_ARCH_NORMAL)-$(findstring darwin,$(TARGET_SYS)),x86_64-darwin)
|
|
54
|
-
ifeq ($(findstring clang,$(CC)),clang)
|
|
55
|
-
DEFAULT_TARGET_ARCH = -target "$(TARGET)"
|
|
56
|
-
endif
|
|
57
|
-
endif
|
|
58
|
-
|
|
59
|
-
ifeq ($(TARGET_ARCH_NORMAL),x86)
|
|
60
|
-
MARCH = pentium
|
|
61
|
-
MINSTR = 32
|
|
62
|
-
else ifeq ($(TARGET_ARCH_NORMAL),x86_64)
|
|
63
|
-
MARCH = x86-64
|
|
64
|
-
MINSTR = 64
|
|
65
|
-
else
|
|
66
|
-
MARCH = $(subst _,-,$(TARGET_ARCH_BASE))
|
|
67
|
-
endif
|
|
68
|
-
|
|
69
|
-
ifeq ($(TARGET_ABI),eabi)
|
|
70
|
-
MABI = aapcs
|
|
71
|
-
endif
|
|
72
|
-
|
|
73
|
-
# Cortex-M0, Cortex-M0+, Cortex-M1: armv6_m
|
|
74
|
-
# Cortex-M3: armv7_m
|
|
75
|
-
# Cortex-M4, Cortex-M7: armv7e_m
|
|
76
|
-
ifeq ($(filter-out armv6_m armv7_m armv7e_m,$(TARGET_ARCH_BASE)),)
|
|
77
|
-
MINSTR = thumb
|
|
78
|
-
endif
|
|
79
|
-
|
|
80
|
-
# Although it isn't mentioned in the GNU Make manual, GNU Make passes
|
|
81
|
-
# $(TARGET_ARCH) in its implicit rules.
|
|
82
|
-
TARGET_ARCH += $(if $(MCPU),-mcpu=$(MCPU)) \
|
|
83
|
-
$(if $(MARCH),-march=$(MARCH)) \
|
|
84
|
-
$(if $(MABI),-mabi=$(MABI)) \
|
|
85
|
-
$(if $(MINSTR),-m$(MINSTR)) \
|
|
86
|
-
$(NULL)
|
|
87
|
-
|
|
88
|
-
ifeq ($(CC),)
|
|
89
|
-
$(error You must specify CC)
|
|
90
|
-
endif
|
|
91
|
-
ifeq ($(CXX),)
|
|
92
|
-
$(error You must specify CXX)
|
|
93
|
-
endif
|
|
94
|
-
|
|
95
|
-
# e.g. "clang-3.6"
|
|
96
|
-
COMPILER_NAME ?= $(notdir $(CC))
|
|
97
|
-
|
|
98
|
-
# Generate output to a directory like build/x86_64-unknown-linux-elf-clang-3.6.
|
|
99
|
-
BUILD_PREFIX_PRIMARY ?= build
|
|
100
|
-
BUILD_PREFIX_SUB ?= $(TARGET)-$(COMPILER_NAME)
|
|
101
|
-
BUILD_PREFIX ?= $(BUILD_PREFIX_PRIMARY)/$(BUILD_PREFIX_SUB)/
|
|
102
|
-
|
|
103
|
-
EXE_PREFIX ?= $(BUILD_PREFIX)test/ring/
|
|
104
|
-
OBJ_PREFIX ?= $(BUILD_PREFIX)obj/
|
|
105
|
-
LIB_PREFIX ?= $(BUILD_PREFIX)lib/
|
|
106
|
-
|
|
107
|
-
CFLAGS_STD ?= -std=c11
|
|
108
|
-
CXXFLAGS_STD ?= -std=c++11
|
|
109
|
-
|
|
110
|
-
CFLAGS += $(CFLAGS_STD)
|
|
111
|
-
CXXFLAGS += $(CXXFLAGS_STD)
|
|
112
|
-
|
|
113
|
-
# Always add full debug info and strip dead code.
|
|
114
|
-
CPPFLAGS += -fpic -fdata-sections -ffunction-sections
|
|
115
|
-
ifeq ($(findstring darwin,$(TARGET_SYS)),darwin)
|
|
116
|
-
# |-gfull| is required for Darwin's |-dead_strip|.
|
|
117
|
-
CPPFLAGS += -gfull
|
|
118
|
-
LDFLAGS += -fPIC -Wl,-dead_strip
|
|
119
|
-
else
|
|
120
|
-
CPPFLAGS += -g3
|
|
121
|
-
LDFLAGS += -Wl,--gc-sections
|
|
122
|
-
endif
|
|
123
|
-
|
|
124
|
-
# TODO: link-time optimization.
|
|
125
|
-
|
|
126
|
-
# Warnings
|
|
127
|
-
|
|
128
|
-
# TODO:
|
|
129
|
-
# -Wconversion \
|
|
130
|
-
# -Weverything -Wpessimizing-move, etc. \
|
|
131
|
-
# -Wsuggest-attribute \
|
|
132
|
-
# -Wstack-usage=n \
|
|
133
|
-
# -Wformat-signedness \
|
|
134
|
-
# -fsanitize=undefined \
|
|
135
|
-
# -Wnormalized \
|
|
136
|
-
# -fsized-deallocation \
|
|
137
|
-
# -Wmisleading-indentation \
|
|
138
|
-
# -Wmissing-declarations \
|
|
139
|
-
# -Wshadow \
|
|
140
|
-
# -Wsized-deallocation \
|
|
141
|
-
# -Wsuggest-final-types \
|
|
142
|
-
# -Wsuggest-final-methods \
|
|
143
|
-
# -Wsuggest-override \
|
|
144
|
-
# -Wzero-as-null-pointer-constant \
|
|
145
|
-
# -Wunsafe-loop-optimizations \
|
|
146
|
-
# -Wsign-conversion\
|
|
147
|
-
# -Wstrict-overflow=5 \
|
|
148
|
-
# -Wundef \
|
|
149
|
-
|
|
150
|
-
# TODO: clang-specific warnings
|
|
151
|
-
|
|
152
|
-
# TODO (not in clang):
|
|
153
|
-
# -Wmaybe-uninitialized \
|
|
154
|
-
# -Wtrampolines \
|
|
155
|
-
# -Wlogical-op \
|
|
156
|
-
|
|
157
|
-
# TODO (GCC 4.9+):
|
|
158
|
-
# -Wconditionally-supported
|
|
159
|
-
# -Wdate-time
|
|
160
|
-
|
|
161
|
-
CPPFLAGS += \
|
|
162
|
-
-pedantic -pedantic-errors \
|
|
163
|
-
\
|
|
164
|
-
-Wall -Werror \
|
|
165
|
-
-Wextra \
|
|
166
|
-
\
|
|
167
|
-
-Wcast-align \
|
|
168
|
-
-Wcast-qual \
|
|
169
|
-
-Wenum-compare \
|
|
170
|
-
-Wfloat-equal \
|
|
171
|
-
-Wformat=2 \
|
|
172
|
-
-Winvalid-pch \
|
|
173
|
-
-Wmissing-field-initializers \
|
|
174
|
-
-Wmissing-include-dirs \
|
|
175
|
-
-Wredundant-decls \
|
|
176
|
-
-Wsign-compare \
|
|
177
|
-
-Wuninitialized \
|
|
178
|
-
-Wwrite-strings \
|
|
179
|
-
$(NULL)
|
|
180
|
-
|
|
181
|
-
# XXX: Stack protector causes linking failures for armv7-*-none-eabi and
|
|
182
|
-
# it's use seems questionable for that kind of target anyway.
|
|
183
|
-
# The launchpad.net arm-none-eabi-gcc toolchain (at least) uses -fshort-enums.
|
|
184
|
-
ifneq ($(TARGET_SYS),none)
|
|
185
|
-
CPPFLAGS += -fstack-protector
|
|
186
|
-
endif
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
# TODO (not in clang):
|
|
190
|
-
# -Wjump-misses-init
|
|
191
|
-
# -Wold-style-declaration \
|
|
192
|
-
# -Wold-style-definition
|
|
193
|
-
CFLAGS += \
|
|
194
|
-
-Wbad-function-cast \
|
|
195
|
-
-Wmissing-field-initializers \
|
|
196
|
-
-Wnested-externs \
|
|
197
|
-
-Wstrict-prototypes \
|
|
198
|
-
$(NULL)
|
|
199
|
-
|
|
200
|
-
CMAKE_BUILD_TYPE ?= RELWITHDEBINFO
|
|
201
|
-
|
|
202
|
-
# Although we don't use CMake, we use a variable CMAKE_BUILD_TYPE with similar
|
|
203
|
-
# semantics to the CMake variable of that name.
|
|
204
|
-
ifeq ($(CMAKE_BUILD_TYPE),MINSIZEREL)
|
|
205
|
-
CPPFLAGS += -DNDEBUG -Os
|
|
206
|
-
else ifeq ($(CMAKE_BUILD_TYPE),RELEASE)
|
|
207
|
-
CPPFLAGS += -DNDEBUG -O3
|
|
208
|
-
else ifeq ($(CMAKE_BUILD_TYPE),RELWITHDEBINFO)
|
|
209
|
-
CPPFLAGS += -DNDEBUG -O3
|
|
210
|
-
else ifeq ($(CMAKE_BUILD_TYPE),DEBUG)
|
|
211
|
-
# Do nothing
|
|
212
|
-
else
|
|
213
|
-
$(error invalid value for CMAKE_BUILD_TYPE: $(CMAKE_BUILD_TYPE))
|
|
214
|
-
endif
|