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
arm-embedded: make gcc multi-lib (arm32 + thumb) #111321
base: master
Are you sure you want to change the base?
Conversation
db478ad
to
f9b2bc3
Compare
f9b2bc3
to
dee1df8
Compare
dee1df8
to
f053612
Compare
@@ -8,7 +8,7 @@ in lib.concatLists [ | |||
(lib.optional (p ? cpu) "--with-cpu=${p.cpu}") | |||
(lib.optional (p ? abi) "--with-abi=${p.abi}") | |||
(lib.optional (p ? fpu) "--with-fpu=${p.fpu}") | |||
(lib.optional (p ? float) "--with-float=${p.float}") | |||
(lib.optional (!targetPlatform.gcc.enableMultilib or false && (p ? float)) "--with-float=${p.float}") # --with-multilib-list conflicts with --with-float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(lib.optional (!targetPlatform.gcc.enableMultilib or false && (p ? float)) "--with-float=${p.float}") # --with-multilib-list conflicts with --with-float | |
(lib.optional (!enableMultilib && (p ? float)) "--with-float=${p.float}") # --with-multilib-list conflicts with --with-float |
I would make enableMultilib
another parameter so things work even if it is overridden from the target platform
I marked this as stale due to inactivity. → More info |
Do you still plan to move this PR forward? In particular, did you figure out a way to set the library search path automatically instead of using environment variables to set it? This change would also be useful for |
i do want to finish this PR, but i had forgotten about it for a while |
I marked this as stale due to inactivity. → More info |
Motivation for this change
gcc lacked a thumb version of
crtbegin.o
newlib lacked a thumb version of everything
Things done
tested the resulting binaries with the expr&commands in https://gist.github.com/cleverca22/9cb66a1182fba1d660bf1b970437fb7b
confirmed that its no longer leaking arm32 opcodes into an elf binary meant for a thumb-only cpu
todo:
get the newlib multilib build properly into the linker search path, i need to manually add a
-L
flag for it currently (see the above gist)i suspect this change will also break x86 32+64bit multilib
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)