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
Native code compiler for 32-bit OS X #6900
Comments
Comment author: @damiendoligez This patch looks good except for the "-read_only_relocs suppress" part. This option has caused a fair amount of trouble in the past: see #4863, #4867, #5012. My guess is that we'll have to determine which versions of MacOS don't like this option, and if they are old enough, explicitly drop support for them. |
Comment author: @damiendoligez Also, out of curiosity why do you need to compile 32-bit MacOS programs? |
Comment author: mansourmoufid Sorry, I was confusing two separate issues. The first was the warning about PIE. The second is an "illegal text-relocation" error when building the native code compiler:
The "-read_only_relocs suppress" options stops this error, but you are right that it is not good for x86_64. I tried using the same build options as for i[3456]86--darwin[89]. and everything works fine now:
I do still see the PIE warning but that's not a big deal. My original reason for compiling for i386 is that I am using pkgsrc on OS X and some other packages only work with the 32-bit ABI. |
Comment author: gerd I just also ran into the "illegal text-relocation" issue, for ocaml-4.02.2 on OSX 10.10. Fortunately, I do not need shared library support for my application (building a cross-compiler for armv7), so -no-shared-libs is an applicable workaround. |
Comment author: @damiendoligez See also MP#692 ( #692 ) |
I am very far from being an expert on the platform, but some users of the 32bit compiler in OSX did report that support for 32 binaries is deprecated in newer OSX developer tools. Does that mean that 32bit OSX support is going to disappear [forced by upstream]? |
Yes. Support for this architecture has already been removed from |
Original bug ID: 6900
Reporter: mansourmoufid
Assigned to: @shindere
Status: assigned (set by @shindere on 2016-12-13T09:06:57Z)
Resolution: open
Priority: normal
Severity: minor
Platform: x86_64
OS: OS X
OS Version: 10.9
Version: 4.02.1
Category: configure and build/install
Tags: patch
Related to: #4863 #4867 #5012 #5105
Monitored by: gerd
Bug description
I would like to build OCaml with native code compiler for i386 on OS X x86_64.
I get the linker error:
I modified the configure script to set natdynlink to true for i[3456]86--darwin, add the "-fPIC" compiler flag, and add the "-read_only_relocs suppress" option for the linker.
The native code compiler builds find now.
File attachments
The text was updated successfully, but these errors were encountered: