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

Looking for option to create non-thin archive for libc #195

Open
tdyjv opened this issue Jun 4, 2024 · 6 comments
Open

Looking for option to create non-thin archive for libc #195

tdyjv opened this issue Jun 4, 2024 · 6 comments

Comments

@tdyjv
Copy link

tdyjv commented Jun 4, 2024

I am looking for an option to create a non-thin archive for libc (and libcpp etc.). I assume arm-none-eabi-ar (or the system ar) is invoked for building ARM libc, but I can not find the correct location to change the command line switches to create a "normal" archive instead of a thin one. A poke in the right direction would be appreciated - thanks in advance.

@phillipjohnston
Copy link
Member

phillipjohnston commented Jun 4, 2024 via email

@tdyjv
Copy link
Author

tdyjv commented Jun 4, 2024

I'm not sure what LTO refers to, but the -T command line option on the archive "linker" command in $(BUILDRESULTS)/build.ninja makes the archive a thin one. The object files must go with libc.a for a link to succeed. I need to be use the libc.a file without a bunch of objects when linking our application.
The relevant lines in build.ninja contain "LINK_ARGS = csrDT". When I remove the "T" I get a libc.a which seems to be correct with the object files contained within the archive. So I'm looking for the source of the "csrDT" command line options so I can change how build.ninja is created.

@phillipjohnston
Copy link
Member

phillipjohnston commented Jun 4, 2024 via email

@tdyjv
Copy link
Author

tdyjv commented Jun 5, 2024

OK so for now I've added to the makefile to remove the 'T' after doing a meson setup. I'm off and running again

@phillipjohnston
Copy link
Member

Just curious how you're doing that - are you just post-processing the generated ninja file to remove the flag?

@tdyjv
Copy link
Author

tdyjv commented Jun 18, 2024 via email

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