Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opensslconf.h is correct for one architecture; and not the others #23

Closed
noloader opened this issue Jan 14, 2016 · 2 comments
Closed

opensslconf.h is correct for one architecture; and not the others #23

noloader opened this issue Jan 14, 2016 · 2 comments

Comments

@noloader
Copy link

opensslconf.h is generated anew for each configuration of OpenSSL. Its _not_ safe to use one opensslconf.h for all OpenSSL configurations. Also see Is it safe to build the cURL library as multi-arch? (same problem, different library).

From the looks of opensslconf.h located in include-ios/openssl, it appears the conf file is for i386 (i.e., iOS debugging):

/* Generate 80386 code? */
#undef I386_ONLY
...

The work around for fat binaries is to copy each opensslconf.h with a new name. I.e, the opensslconf.h generated with armv7 would be named opensslconf-armv7.h, the opensslconf.h generated with i386 would be named opensslconf-i386.h, and so on.

Then, you provide one opensslconf.h which gathers up the architecture dependent conf files:

/* opensslconf.h */

#if defined(__APPLE__) && defined (__i386__)
# include opensslconf-i386.h
#endif

#if defined(__APPLE__) && defined (__arm__)
# include opensslconf-armv7.h
#endif

#if defined(__APPLE__) && (defined (__arm64__) || defined (__aarch64__))
# include opensslconf-arm64.h
#endif

...

My apologies if I am parsing things incorrectly.

@krzyzanowskim
Copy link
Owner

opensslconf.h is generated for arm64, though I agree it's better if it would match to the architectures.
If you have some time you can try do changes to build script and generate it with such umbrella header.

@krzyzanowskim
Copy link
Owner

It's done now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants