Skip to content
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

Missing assembly files on iOS #76

Closed
theodelrieu opened this issue Mar 12, 2018 · 2 comments
Closed

Missing assembly files on iOS #76

theodelrieu opened this issue Mar 12, 2018 · 2 comments

Comments

@theodelrieu
Copy link
Contributor

Hello,

I had some trouble building this library on iOS (armv7/armv7s/x86/x86_64/armv8) and had to patch the build system files in order to add the relevant missing files.

I found this SO thread that saved me days of research, and I came up with the following patches:
patches.zip

Having no notion of Boost.Build, I monkey-patched the file once per arch, and have to apply the correct patch each time (not doing it by hand though).

I was thinking that you would have a better fix than me, and having it fixed upstream would be great!

@olk
Copy link
Member

olk commented Oct 28, 2018

Could you provide a pull-request, please?

@theodelrieu
Copy link
Contributor Author

I'd really like to, but I'm stuck at incorporating a single patch into my fork, even after reading the entire Boost.Build manual I don't understand what I'm doing wrong...

Here are the changes I've made to libs/context/build/Jamfile.v2:

actions gasarm64
{
    cpp -x assembler-with-cpp "$(>)" | as -arch arm64 -o "$(<)"
}

alias asm_sources
   : [ make asm/make_arm64_aapcs_macho_gas.o : asm/make_arm64_aapcs_macho_gas.S : @gasarm64 ]
     [ make asm/jump_arm64_aapcs_macho_gas.o : asm/jump_arm64_aapcs_macho_gas.S : @gasarm64 ]
     [ make asm/ontop_arm64_aapcs_macho_gas.o : asm/ontop_arm64_aapcs_macho_gas.S : @gasarm64 ]
   : <abi>aapcs
     <address-model>64
     <architecture>arm
     <binary-format>mach-o
     <toolset>clang
   ;

Here is the error I get (one for every assembly file):

Jamfile</Users/theo/Projects/boost/libs/context/build>.gasarm64 bin.v2/libs/context/build/asm/make_arm64_aapcs_macho_gas.o
clang: error: no input files
Jamfile</Users/theo/Projects/boost/libs/context/build>.gasarm64 bin.v2/libs/context/build/asm/jump_arm64_aapcs_macho_gas.o
clang: error: no input files
Jamfile</Users/theo/Projects/boost/libs/context/build>.gasarm64 bin.v2/libs/context/build/asm/ontop_arm64_aapcs_macho_gas.o
clang: error: no input files

If you could help me getting the first one right, I might be able to do the others in a sweep.

In the SO thread I've mentioned in the first post, there is a alias asm_context_sources. I have no idea how it made things work on my machine, nor why simply patching alias asm_sources instead did not...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants