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

CMakeLists.txt: compile squirrel with -fPIC #1561

Merged
merged 1 commit into from
Oct 21, 2020
Merged

CMakeLists.txt: compile squirrel with -fPIC #1561

merged 1 commit into from
Oct 21, 2020

Conversation

ffontaine
Copy link
Contributor

Ensure that squirrel is compiled with -fPIC to allow linking the static
libraries with dynamically linked programs. This is not a requirement
for most architectures but is mandatory for ARM.

Fixes:
x86_64-buildroot-linux-musl/bin/ld: CMakeFiles/sq_static.dir/sq.c.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
x86_64-buildroot-linux-musl/bin/ld: final link failed: nonrepresentable section on output

Fix #1536

Signed-off-by: Romain Naour romain.naour@gmail.com
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/supertux/0001-CMakeLists.txt-compile-squirrel-with-fPIC.patch]
Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

Ensure that squirrel is compiled with -fPIC to allow linking the static
libraries with dynamically linked programs. This is not a requirement
for most architectures but is mandatory for ARM.

Fixes:
x86_64-buildroot-linux-musl/bin/ld: CMakeFiles/sq_static.dir/sq.c.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
x86_64-buildroot-linux-musl/bin/ld: final link failed: nonrepresentable section on output

Fix #1536

Signed-off-by: Romain Naour <romain.naour@gmail.com>
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/supertux/0001-CMakeLists.txt-compile-squirrel-with-fPIC.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
@tobbi tobbi merged commit b237571 into SuperTux:master Oct 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 this pull request may close these issues.

Build failure with RELRO due to squirrel being statically built
2 participants