Comments (6)
I'm sorry, but Isn't that a bug of the compiler? I mean, it's generating a symbol it can't resolve, and all x84_64 CPUs have 128-bits integer division, so there is not reason for the compiler not to support it. Besides, it works great with other versions of Clang on Linux (3.4 on my development machine, and 3.0 I believe on our buildbot x86_64 machine).
Did you try to bug Clang/Apple about it and/or ask on a Clang mailing list? What do they think about that?
from mbedtls.
I agree - this is more of a compiler bug, and a bug in polarssl proper. And
I think this issue may already be fixed in the clang mainline.
But Apple has bundled a particular version of the compiler with the latest
OsX. So as of right now the PolarSSL code will not build on a standard
install of Mavericks with the latest Xcode. I don't know when Apple will
update the compiler in Xcode - but they don't do it very often.
To support standard OsX mavericks builds you may need to put in a work
around this compiler bug.
On Tue, Mar 11, 2014 at 4:53 AM, Manuel Pégourié-Gonnard <
[email protected]> wrote:
I'm sorry, but Isn't that a bug of the compiler? I mean, it's generating a
symbol it can't resolve, and all x84_64 CPUs have 128-bits integer
division, so there is not reason for the compiler not to support it.
Besides, it works great with other versions of Clang on Linux (3.4 on my
development machine, and 3.0 I believe on our buildbot x86_64 machine).Did you try to bug Clang/Apple about it and/or ask on a Clang mailing
list? What do they think about that?Reply to this email directly or view it on GitHubhttps://github.com//issues/67#issuecomment-37274251
.
from mbedtls.
I'm afraid you're right. Thanks for the info that Apple doesn't update often.
I'd like to activate the workaround only with this specific version of the compiler. Would you mind showing me the output of clang -E -dM -x c /dev/null
on the affected machine, so that I can know which exact values of the macros to check for? That would be very appreciated.
from mbedtls.
Ok, so I just disabled 128-bit division on the following condition:
defined(__x86_64__) && defined(__clang__) && defined(__APPLE__)
which is not as specific as I'd like but should be safe. The output of clang -E -dM -x c /dev/null
would really help selecting only the affected version, if you can provide it.
from mbedtls.
Sorry I missed getting this to you sooner:
~: clang -E -dM -x c /dev/null
#define OBJC_NEW_PROPERTIES 1
#define _LP64 1
#define APPLE_CC 5621
#define APPLE 1
#define __ATOMIC_ACQUIRE 2
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_CONSUME 1
#define __ATOMIC_RELAXED 0
#define __ATOMIC_RELEASE 3
#define __ATOMIC_SEQ_CST 5
#define BLOCKS 1
#define BYTE_ORDER ORDER_LITTLE_ENDIAN
#define CHAR16_TYPE unsigned short
#define CHAR32_TYPE unsigned int
#define CHAR_BIT 8
#define CONSTANT_CFSTRINGS 1
#define DBL_DENORM_MIN 4.9406564584124654e-324
#define DBL_DIG 15
#define DBL_EPSILON 2.2204460492503131e-16
#define DBL_HAS_DENORM 1
#define DBL_HAS_INFINITY 1
#define DBL_HAS_QUIET_NAN 1
#define DBL_MANT_DIG 53
#define DBL_MAX_10_EXP 308
#define DBL_MAX_EXP 1024
#define DBL_MAX 1.7976931348623157e+308
#define DBL_MIN_10_EXP (-307)
#define DBL_MIN_EXP (-1021)
#define DBL_MIN 2.2250738585072014e-308
#define DECIMAL_DIG 21
#define DYNAMIC 1
#define ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED 1090
#define FINITE_MATH_ONLY 0
#define FLT_DENORM_MIN 1.40129846e-45F
#define FLT_DIG 6
#define FLT_EPSILON 1.19209290e-7F
#define FLT_EVAL_METHOD 0
#define FLT_HAS_DENORM 1
#define FLT_HAS_INFINITY 1
#define FLT_HAS_QUIET_NAN 1
#define FLT_MANT_DIG 24
#define FLT_MAX_10_EXP 38
#define FLT_MAX_EXP 128
#define FLT_MAX 3.40282347e+38F
#define FLT_MIN_10_EXP (-37)
#define FLT_MIN_EXP (-125)
#define FLT_MIN 1.17549435e-38F
#define FLT_RADIX 2
#define __GCC_ATOMIC_BOOL_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR_LOCK_FREE 2
#define __GCC_ATOMIC_INT_LOCK_FREE 2
#define __GCC_ATOMIC_LLONG_LOCK_FREE 2
#define __GCC_ATOMIC_LONG_LOCK_FREE 2
#define __GCC_ATOMIC_POINTER_LOCK_FREE 2
#define __GCC_ATOMIC_SHORT_LOCK_FREE 2
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
#define GNUC_MINOR 2
#define GNUC_PATCHLEVEL 1
#define GNUC_STDC_INLINE 1
#define GNUC 4
#define __GXX_ABI_VERSION 1002
#define __GXX_RTTI 1
#define INT16_TYPE short
#define INT32_TYPE int
#define INT64_C_SUFFIX LL
#define INT64_TYPE long long int
#define INT8_TYPE char
#define INTMAX_MAX 9223372036854775807L
#define INTMAX_TYPE long int
#define INTMAX_WIDTH 64
#define INTPTR_TYPE long int
#define INTPTR_WIDTH 64
#define INT_MAX 2147483647
#define LDBL_DENORM_MIN 3.64519953188247460253e-4951L
#define LDBL_DIG 18
#define LDBL_EPSILON 1.08420217248550443401e-19L
#define LDBL_HAS_DENORM 1
#define LDBL_HAS_INFINITY 1
#define LDBL_HAS_QUIET_NAN 1
#define LDBL_MANT_DIG 64
#define LDBL_MAX_10_EXP 4932
#define LDBL_MAX_EXP 16384
#define LDBL_MAX 1.18973149535723176502e+4932L
#define LDBL_MIN_10_EXP (-4931)
#define LDBL_MIN_EXP (-16381)
#define LDBL_MIN 3.36210314311209350626e-4932L
#define LITTLE_ENDIAN 1
#define LONG_LONG_MAX 9223372036854775807LL
#define LONG_MAX 9223372036854775807L
#define LP64 1
#define MACH 1
#define MMX 1
#define NO_INLINE 1
#define __NO_MATH_INLINES 1
#define ORDER_BIG_ENDIAN 4321
#define ORDER_LITTLE_ENDIAN 1234
#define ORDER_PDP_ENDIAN 3412
#define PIC 2
#define POINTER_WIDTH 64
#define __PRAGMA_REDEFINE_EXTNAME 1
#define PTRDIFF_TYPE long int
#define PTRDIFF_WIDTH 64
#define REGISTER_PREFIX
#define SCHAR_MAX 127
#define SHRT_MAX 32767
#define SIG_ATOMIC_WIDTH 32
#define SIZEOF_DOUBLE 8
#define SIZEOF_FLOAT 4
#define SIZEOF_INT128 16
#define SIZEOF_INT 4
#define SIZEOF_LONG_DOUBLE 16
#define SIZEOF_LONG_LONG 8
#define SIZEOF_LONG 8
#define SIZEOF_POINTER 8
#define SIZEOF_PTRDIFF_T 8
#define SIZEOF_SHORT 2
#define SIZEOF_SIZE_T 8
#define SIZEOF_WCHAR_T 4
#define SIZEOF_WINT_T 4
#define SIZE_TYPE long unsigned int
#define SIZE_WIDTH 64
#define SSE2_MATH 1
#define SSE2 1
#define SSE3 1
#define SSE_MATH 1
#define SSE 1
#define SSP 1
#define SSSE3 1
#define STDC_HOSTED 1
#define STDC_VERSION 199901L
#define STDC 1
#define UINTMAX_TYPE long unsigned int
#define USER_LABEL_PREFIX _
#define VERSION "4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)"
#define WCHAR_MAX 2147483647
#define WCHAR_TYPE int
#define WCHAR_WIDTH 32
#define WINT_TYPE int
#define WINT_WIDTH 32
#define __amd64 1
#define amd64 1
#define apple_build_version 5000279
#define block __attribute((blocks(byref)))
#define clang 1
#define clang_major 5
#define clang_minor 0
#define clang_patchlevel 0
#define clang_version "5.0 (clang-500.2.79)"
#define __core2 1
#define core2 1
#define llvm 1
#define pic 2
#define __strong
#define tune_core2 1
#define __unsafe_unretained
#define weak __attribute((objc_gc(weak)))
#define __x86_64 1
#define x86_64 1
On Fri, Mar 14, 2014 at 4:28 AM, Manuel Pégourié-Gonnard <
[email protected]> wrote:
Reply to this email directly or view it on GitHubhttps://github.com//issues/67
.
from mbedtls.
Thanks a lot! No problem that you didn't reply sooner, it's just that we're planning a release in the next few days, so I was eager to include this early :) Thanks for your help again.
from mbedtls.
Related Issues (20)
- Make sure accel list stays up-to-date in user-config-for-tests.h HOT 1
- Redefinition warnings depending on available curves HOT 1
- Install is not disabled when MbedTLS is used as subproject
- `MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK` is not used when TLS 1.3 is enabled (even with TLS 1.2 support) HOT 1
- [RSA2048-PSS ] mbedtls and openssl failed to verify signature generate by each other
- TLS 1.3 requirements are misleading HOT 1
- Using PSA Crypto without updating the git commit tree of mbedtls submodule HOT 4
- Parse a public key in PEM format error HOT 2
- mbedtls hangs after NewSessionTicket
- Missing ASN1 functions in a build with RSA_C
- Rename interruptible ECC sign hash in line with PSA Spec
- Design PSA interfaces for interruptible Ephemeral ECDH
- psa_generate_key() returned -27648 (-0x6c00) HOT 2
- SSL debug reports translated PSA error codes
- PSA only supports byte-aligned RSA key sizes
- Remove mbedtls_ssl_conf_rng()
- Reporting Bugs in Certificate Chain Validation
- error: "_GNU_SOURCE" redefined
- mbedtls_md_hmac does not work as expected on Mac M2 HOT 2
- Make certificate fields of pkcs7 data structures publicly available
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mbedtls.