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

tests/CMakeLists.txt: Drop hardcoded -no-pie linker flags #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OPNA2608
Copy link

These cause the build to fail when… the compiler expects PIE usage: NixOS/nixpkgs#372768

[ 99%] Linking CXX executable test-gactionmuxer
/nix/store/j7p46r8v9gcpbxx89pbqlh61zhd33gzv-binutils-2.43.1/bin/ld: /nix/store/l89iqc7am6i60y8vk507zwrzxf0wcd3v-gcc-14-20241116/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/crtbegin.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a PIE object
/nix/store/j7p46r8v9gcpbxx89pbqlh61zhd33gzv-binutils-2.43.1/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [tests/CMakeFiles/test-gactionmuxer.dir/build.make:102: tests/test-gactionmuxer] Error 1

Is there a reason for these being there? They were introduced 4y ago, together with all of the CMake code. Building with & without PIE & running the resulting binaries seems to work fine once these are removed, at least in Nixpkgs.

Copy link

@FliegendeWurst FliegendeWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm that the PIE-enabled build passes the test suite.

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.

2 participants