We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Using gcc 4.9 and lto on armv7 leads to libstd's link failure:
gcc 4.9
lto
/usr/bin/ld.bfd.real: error: /tmp/cczYIjMC.ltrans0.ltrans.o: requires unsupported dynamic reloc R_ARM_THM_MOVW_ABS_NC; recompile with -fPIC error: linking with `cc` failed: exit code: 1 note: "cc" "-Wl,--as-needed" "-L" "/tmp/rustc-nightly/arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib" "arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib/std-ca1c970e.0.o" "-o" "arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libstd-ca1c970e.so" "arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib/std-ca1c970e.metadata.o" "-Wl,-O1" "-nodefaultlibs" "-L" "arm-unknown-linux-gnueabihf/rt" "-L" "/usr/lib/llvm-3.6/lib" "-L" "/tmp/rustc-nightly/arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "-l" "backtrace" "-Wl,--no-whole-archive" "-Wl,-Bdynamic" "-l" "dl" "-l" "pthread" "-l" "gcc_s" "-Wl,--whole-archive" "/tmp/rustc.K1iwqkGsmEEU/libcollections-ca1c970e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.K1iwqkGsmEEU/liballoc-ca1c970e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.K1iwqkGsmEEU/librustc_unicode-ca1c970e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.K1iwqkGsmEEU/liballoc_jemalloc-ca1c970e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.K1iwqkGsmEEU/liblibc-ca1c970e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.K1iwqkGsmEEU/librand-ca1c970e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.K1iwqkGsmEEU/libcore-ca1c970e.rlib" "-Wl,--no-whole-archive" "-l" "pthread" "-l" "c" "-l" "m" "-l" "rt" "-shared" "-l" "compiler-rt"
Andrew Pinski from gcc suggested adding -fPIC to the linker's command line which ultimately helped.
-fPIC
The text was updated successfully, but these errors were encountered:
gchp/termbox-sys#16
Sorry, something went wrong.
Adding -C link-args=-fPIC to RUSTFLAGS is enough to fix the issue. Strange that it still persists, though.
-C link-args=-fPIC
RUSTFLAGS
The size of the lib directory presently goes down from 180MB to 163MB thanks to -flto.
lib
-flto
No branches or pull requests
Using
gcc 4.9
andlto
on armv7 leads to libstd's link failure:Andrew Pinski from gcc suggested adding
-fPIC
to the linker's command line which ultimately helped.The text was updated successfully, but these errors were encountered: