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

libgcc.a not built #21

Open
ChrisPVille opened this issue Aug 20, 2020 · 0 comments · May be fixed by #22
Open

libgcc.a not built #21

ChrisPVille opened this issue Aug 20, 2020 · 0 comments · May be fixed by #22

Comments

@ChrisPVille
Copy link

ChrisPVille commented Aug 20, 2020

When doing certain built-in operations, like casting between float and long long, the compiler will emit calls to helper functions from libgcc (such as __floatdisf). For example, in the otherwise completely unmodified helloworld, I added:

volatile long long test; //Volatile to make sure it doesn't get removed by optimizer
volatile float test2;
test2 = (float) test;

Which won't link as a reference to __floatdisf is generated to handle the cast, and that function is undefined.

It looks like libgcc was never built during the cross compiler make. That library is a little different than the rest of the standard C ones as it has the functions the compiler will emit automatically and is generally required for all platforms.

@ChrisPVille ChrisPVille changed the title Casting floats generates __floatundidf (and related) library calls libgcc.a not built Aug 21, 2020
ChrisPVille added a commit to ChrisPVille/n64chain that referenced this issue Aug 21, 2020
ChrisPVille added a commit to ChrisPVille/n64chain that referenced this issue Aug 21, 2020
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

Successfully merging a pull request may close this issue.

1 participant