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

ARM: Linking fails when compiled with optimization turned on #2

Open
florommel opened this issue Apr 28, 2017 · 0 comments
Open

ARM: Linking fails when compiled with optimization turned on #2

florommel opened this issue Apr 28, 2017 · 0 comments
Assignees

Comments

@florommel
Copy link
Member

florommel commented Apr 28, 2017

Compiling with multiverse plugin enabled and optimization (-O1, -O2, -O3, -Os, -Og) causes an undefined reference to '.LANCHOR1' during linking.
[GCC version: 6.3.1, arch: armv6l]

I removed the -O2 option in tests/Makefile as a temporary workaround.

Reproduce: in directory tests (note that option -O2 is specified):

$ gcc -o commit-refs.o -c commit-refs.c -fplugin=../gcc-plugin/multiverse.so -I../libmultiverse -O2 -Wextra -MT commit-refs.o -MMD -MP -MF .d/commit-refs.Td
...
$ gcc -L../libmultiverse -o commit-refs commit-refs.o  -lmultiverse
commit-refs.o: In function `_GLOBAL__sub_I_65535_0_func_a':
commit-refs.c:(.text.startup+0x1d8): undefined reference to `.LANCHOR1'
collect2: error: ld returned 1 exit status
@florommel florommel self-assigned this Apr 28, 2017
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

No branches or pull requests

1 participant