Timothy B. Terriberry
2014-Mar-19 22:05 UTC
[opus] [PATCH 2/2] Make the arm2gnu.pl converter handle apple specific details
Martin Storsjo wrote:> + [AC_MSG_RESULT([yes]); ARM2GNU_PARAMS="-apple"],I'd prefer --apple instead of -apple, but otherwise these patches both look good to me. Does Apple have equivalent machinery to any of the pieces you disabled? Those were: - object size calculations so debuggers can tell what function they're in - architecture flags so an executable that gets linked with this object doesn't get tagged as requiring a later architecture than it really does (thanks to our runtime detection) - the non-executable stack flags Not insisting you add all those things in this patch if there is some way to do them, but it would be nice to know if they're impossible to do, unnecessary, or simply unimplemented for now.
Martin Storsjö
2014-Mar-20 10:47 UTC
[opus] [PATCH 2/2] Make the arm2gnu.pl converter handle apple specific details
On Wed, 19 Mar 2014, Timothy B. Terriberry wrote:> Does Apple have equivalent machinery to any of the pieces you disabled? > Those were: > - object size calculations so debuggers can tell what function they're inI'm not really aware of any equivalent directives that they'd support at least, and judging from the output from -S from their compiler, they don't include anything such there either.> - architecture flags so an executable that gets linked with this object > doesn't get tagged as requiring a later architecture than it really does > (thanks to our runtime detection)They do have something similar but not identicaly and I'm not sure if it can be overridden from within an assembly source file. They do have command line parameters -arch armv6/armv7/armv7s/arm64 which sets the flags on object files, but they don't work quite as .arch/.object_arch in ELF land, since the whole binary needs to be built with the same flags (these are what identifies different versions of the same object file in fat binaries). And there's not much need for the runtime detection on iOS since the armv7 binary variant always supports NEON (contrary to android), so it all gets taken care of by the OS picking the right version within a fat binary. Additionally, the armv6 variant is deprecated to the point that the latest SDKs don't even support compiling for that target any longer (and I doubt they allow submissions to appstore with binaries that contain support for it - it's at least explicitly disallowed if the app claims to support the new, wider screen for iPhone 5 and newer).> - the non-executable stack flagsNot that I'm aware of - didn't see anything relevant in the compiler -S output either. // Martin
Timothy B. Terriberry
2014-Mar-21 18:17 UTC
[opus] [PATCH 2/2] Make the arm2gnu.pl converter handle apple specific details
Martin Storsj? wrote:> I'm not really aware of any equivalent directives that they'd support at > least, and judging from the output from -S from their compiler, they > don't include anything such there either.Okay, thanks for the follow-up. W.r.t. the arch directives, it sounds like the best course is to leave them unspecified until someone a) complains and b) has a plan for doing something smarter.
Reasonably Related Threads
- [PATCH 2/2] Make the arm2gnu.pl converter handle apple specific details
- [PATCH 2/2] Make the arm2gnu.pl converter handle apple specific details
- [PATCH] Add ARM cpu detection for iDevices
- Building Opus (git master) ARM assembly for iOS
- [LLVMdev] LTO support on Mac