[omniORB] Incorrect processor define on Apple M1

Michael Teske subscribe at teskor.de
Wed Nov 27 12:15:42 UTC 2024


Hi,

On 4/15/23 13:50, Duncan Grisby via omniORB-list wrote:
> Or is it that the definition of __arm__ somehow breaks some other code
> that is not in omniORB?


I had the exact same problem now, it took while to remember. The exact location is (on my system)

in the __config header (used by string)


#    if defined(__APPLE__)
#      if defined(__i386__) || defined(__x86_64__)
// use old string layout on x86_64 and i386
#      elif defined(__arm__)
// use old string layout on arm (which does not include aarch64/arm64), except on watch ABIs
#        if defined(__ARM_ARCH_7K__) && __ARM_ARCH_7K__ >= 2
#          define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
#        endif
#      else
#        define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
#      endif
#    endif


this leads to code which #includes omniconfig.h before <string> using a different std::string structure layout than code which does not,

with very strange effects, as you can assume.

Since it's all been fixed already there's nothing to do, but I thought I'd share it anyway.


Greetings, Michael







More information about the omniORB-list mailing list