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

Can't compile with --disable-optimize because compiler_builtins links agains memcpy without PIC #43411

Closed
TimNN opened this issue Jul 22, 2017 · 1 comment
Labels
C-bug Category: This is a bug.

Comments

@TimNN
Copy link
Contributor

TimNN commented Jul 22, 2017

When attempting to build rustc without optimzations, linking of std fails because:

  = note: /usr/local/bin/ld: /tmp/rustc.6VSDxArmnzqR/libcompiler_builtins-614d629936883e62.rlib(compiler_builtins-614d629936883e62.6.o): relocation R_X86_64_PC32 against symbol `memcpy@@GLIBC_2.14' can not be used when making a shared object; recompile with -fPIC
          /usr/local/bin/ld: final link failed: Bad value
          collect2: error: ld returned 1 exit status

full log

I guess this can be fixed by either compiling compiler_builtins as PIC or by making it not depend on memcpy. Which would be the correct fix? Intuitively I would say that compiler_builtins should not have any dependencies.

@TimNN
Copy link
Contributor Author

TimNN commented Jul 23, 2017

The submodule still needs to be updated

@TimNN TimNN reopened this Jul 23, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 26, 2017
bors pushed a commit that referenced this issue Aug 19, 2017
bors added a commit that referenced this issue Aug 20, 2017
Update the compiler_builtins submodule

Fixes #43411
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants