Displaying 2 results from an estimated 2 matches for "obj_format_macho".
2008 Jan 05
0
Assembly on Mac OS needs to be relocatable
I'm trying to port flac 1.2.1 to OS X (I'm taking over maintainership
of the Fink package), and I'm running into some problems with
bitreader_asm.nasm. After adding the following to nasm.h:
+%elifdef OBJ_FORMAT_macho
+ %define FLAC__PUBLIC_NEEDS_UNDERSCORE
+ %idefine code_section section .text
+ %idefine data_section section .data
+ %idefine bss_section section .bss
I can get it compiling, but when it tries to link the libFLAC dylib,
it complains:
ld: warning codegen in
FLAC__bitreader_read_rice_signed_b...
2011 Feb 08
1
Build issues and fixes
...'t understand OSX's "macho" format. In src/libFLAC/ia32/nasm.h, I
replaced "%error unsupported object format!" with "%define
FLAC__PUBLIC_NEEDS_UNDERSCORE" and everything worked beautifully.
Obviously in a real situation you'd want to create an %elifdef
OBJ_FORMAT_macho block.
Unless I've completely botched my test program, which is always
possible, both builds now work flawlessly.
Hope this helps someone :)
-Ben