Oh, dammit. Yes you're totally right, code for a shared lib must be compiled with the "Position Independent Code" option (-fpic) and I there's no reason for BlitzMax to pass this option to gcc.
I seem to remember you managed to tweak the BlitzMax compiler front end to pass different options to gcc (or am I crazy...?), couldn't you try to add "-fPIC" ?
EDIT: Mmmm, I found a page on the net stating that on MacOS, -fPic is implied by default, so this should work out of the box.
EDIT2: Unless the problem occurs before the linker is even called. OK, enough of "maybe", I'll have to check by myself before throwing more hypotheses. I have too little knowledge about how BlitzMax ties everything together unde the hood.
EDIT3: now I get the feeling that you were really talking about the assembler *source code* that appeared to be not compilable with "-fPIC" after you precisely tried to add the option ... right ?
I seem to remember you managed to tweak the BlitzMax compiler front end to pass different options to gcc (or am I crazy...?), couldn't you try to add "-fPIC" ?
EDIT: Mmmm, I found a page on the net stating that on MacOS, -fPic is implied by default, so this should work out of the box.
EDIT2: Unless the problem occurs before the linker is even called. OK, enough of "maybe", I'll have to check by myself before throwing more hypotheses. I have too little knowledge about how BlitzMax ties everything together unde the hood.
EDIT3: now I get the feeling that you were really talking about the assembler *source code* that appeared to be not compilable with "-fPIC" after you precisely tried to add the option ... right ?